Solution for exclusive sound card in UbuntuLinux System

Source: Internet
Author: User
Tags gstreamer
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.