Article Title: Solution for exclusive sound card in UbuntuLinux System. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
A much better way of getting esd to work with non-esd-aware apps is to make alsa use its software mixer.
Enable alsa to use its own software mixer to work together with applications that are not recognized by esd.
$ Sudo/etc/init. d/alsa-utils stop $ sudo gedit/var/lib/alsa/asound. state
(Add the following text verbatim to the start of this file)
$ Sudo/etc/init. d/alsa-utils start
# This text shoshould be added to the beginning
#/Var/lib/alsa/asound. state. You only need to add
# It once -- it is saved processing SS reboots.
Pcm. asymed {
Type asym
Playback. pcm dmix
Capture. pcm dsnoop
}
Pcm. default {
Type plug
Slave. pcm asymed
}
Pcm. dmix {
Type dmix
Ipc_key 5678293
Ipc_key_add_uid yes
Slave {
Pcm 'hw: 0, 0'
Period_time 0
Period_size 128
Buffer_size 2048
Format S16_LE
Rate 48000
}
}
Pcm. dsnoop {
Type dsnoop
Ipc_key 5778293
Ipc_key_add_uid yes
Slave {
Pcm 'hw: 0, 0'
Period_time 0
Period_size 128
Buffer_size 2048
Format S16_LE
Rate 48000
}
}
Now as your programs as you want can all use the sound card simultaneously, both the output and the microphone! ESD-aware apps can use ESD, other apps will still work fine.
Now, you can make all the software you want use the sound card at the same time, whether it is output or microphone! Applications recognized by ESD can use ESD, and other applications can work normally.
One notable misfeature of ESD is that it often ruins the/V sync when playing videos. after setting up the software mixer, you might find it useful to turn esd off altogether (in tthe Sound control panel uncheck "Enable Software Mixing "). Now, especially with GStreamer 0.10, your movies shoshould have perfect A/V sync.
An obvious bad feature of ESD is that it damages the synchronization of audio and video when playing a video. After setting the software mixer, you may find it helpful to disable the esd function (select "enable software mixing" in the audio control panel '). Now, especially in GStreamer 0.10, no audio or video synchronization occurs in your movie. It's a shame that software mixing isn' t enabled on Ubuntu by default. software mixing is not enabled in the ubuntu preset.
The setting does not take effect immediately.