Skip to main content

Contention for Sound Card in Ubuntu

Problem:

Quite often with Ubuntu and a few other distros in Linux, I have had problems with programs not being able to share the sound card. For example, once Firefox gets a hold of my sound card, it would not give it up even when it is not using it. That means if XMMS wanted to access the sound card, it will fail because Firefox has a lock on the sound device.

The way I would deal with this problem is simply restarting the sound daemons (/etc/init.d/alsa-utils or /etc/init.d/esound ...) and hope that resolves the issue. Now might be the time to seek a more scientific solution.

Solution:

For most sound cards, hardware mixing only allows for only one program to have an exclusive lock over the sound device. To enable more than one program to access the sound card, a layer of virtual/software sound mixing is needed. KDE based distros like Kubuntu use aRts for audio management, but aRts has been known to be very buggy when dealing with non-KDE applications. The more popular and reliable option for virtual sound mixing and audio management is ALSA. So,checking your system sound settings and the audio output component of individual applications and insuring that they all use ALSA drivers should hopefully solve the issue of contention for audio resources.

Comments

Popular posts from this blog

Distribution of Wealth in the US

The rich get richer and the poor get poorer. I heard this statement quite a bit lately particularly in light of the sub-prime mortgage and general housing crisis in the US. The country has enjoyed significant economic prosperity and both Clinton and Bush boasted economic growth under their reign. Unfortunately, the beneficiaries of the economic boom are not people from all economic backgrounds, but rather the top 10%. To make things worse, Bush gave tax cuts mainly targeting the top 10%. Being more of a numbers guy, I always wanted showing the validity of the-rich-get-richer-n-the-poor-get-poorer statement. Thanks to Wikipedia , I have finally found it!! Both the mean and median net worth of families for the bottom 50% of the population has remained absolutely flat while the 75th-90th percentile see a decent growth and the top 10% enjoy the most appreciation on their net worth. So, if you factor in inflation, the-rich-get-richer-n-the-poor-get-poorer probably holds true. The g...

An Exercise in Obstinacy, Deception, and Self-Destruction

There is no other way to describe the policies of the current leadership in Eritrea. Please watch this appalling interview of the Eritrean President Isaias Afewerki with Riz Khan of Aljazeera and come up with your own series of adjectives to describe that incredible exchange. The fact that Eritreans are dying under the oppressive and misguided dictatorship of Isaias Afeworki frightens and saddens me very much. The fact that there is no immediate hope is downright depressing.

IPtables, SVN, and NMAP

I reviewed some material on IPtables, SVN, and NMAP just for the sake of keeping my mind busy. Here are some useful notes: IPtables - best resource found at HERE SVN - best, as in the quickest and simplest intro could be found HERE NMAP - I honestly don't see in using it for more than port-scanning in a few instances. Anyway, here are a few other options that might come in handy at some point. nmap -sT/sS/ sX/sF/...[-P0] IPADDRESS(range) == to check which ports are open nmap -sP IPADDRESS(range) == a simple ping scan for availability nmap -sO IPADDRESS(range) == check what IP protocols are available nmap -sV IPADDRESS(range) == a scan with version detection Other useful flags: -O == detects OS, part of -v (verbosity) flag as well -A == detects OS and versions -v == request high verbosity/detail -F == performs a fast scan of only a few common ports Installing Perl modules Perl modules may be installed using the CPAN module or from source. SOURCE...