alsa not allowing more than one sound application at once

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

alsa not allowing more than one sound application at once

#1 Post by 666philb »

hi,
in precise 5.7 pae i can play sound from more than one application at once, where as in precise 5.6 only one application can play sound at a time and the application needs to be closed to release the soundcard.

Is there a setting that controls this? or is it to do with how the kernel is compiled?

cheers
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Hello, 666philb

Why do you need this? Are you a composer or a DJ?

Regards.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#3 Post by 666philb »

hi musher0,

it's annoying if for example.... i have forgotten i have deadbeef open in the tray, then try playing a stream from the browser. the result is no sound from the browser until i close deadbeef... even though deadbeef isn't playing anything!

this only affects some builds of puppy and isn't supposed to happen anymore. it's more of a throw back to the oss days.

i'm hoping it's something than can be changed in a config... rather than a kernel problem
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#4 Post by Karl Godt »

Had such occurrences, too .

Maybe it is related to the applications (versions and compile options and dependencies ) and how they handle the device nodes , too .

Have not looked further into it and currently no idea about it .

Ubuntu may have some files in /usr/lib/alsa*/ , */ao/ , */asound/
or
/usr/share/alsa/cards/
that handle your sound card differently .

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#5 Post by mikeb »

Look out for apps set to OSS ..I found gnome-mplayer on one setup like that.

Also hw:0,0 gains exclusive access to the sound card... plughw:0,0 does not...so look out for that alsa device setting too.

Or the sound system may be crap lol

mike

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#6 Post by npierce »

I was curious about this, so booted up Precise 5.6 and installed deadbeef. (Not finding deadbeef in any of the default repositories, I searched the Additional Software forum and grabbed the first .pet I found: deadbeef-0.5.6-i686 compiled in precise 5.6.1.)

Basically, what I found simply confirms that mikeb is correct: When an application hogs the sound card, it could be because of the setting for the output device.

As installed, deadbeef had these settings:

Output plugin:
ALSA output plugin
Output device:
Default Audio Device

With those settings I had no problem playing a file in the browser (SeaMonkey 2.17.1 with the Gecko Media Player 1.0.3 plug-in as supplied in Precise 5.5), even when deadbeef was actually playing. Only when I started choosing other devices did I have problems.

The U.I. for deadbeef uses fancier names than the standard ALSA names mentioned by mikeb, and the actual names will depend upon your hardware.

Output device:
HDA Intel, STAC92xx Analog
Direct hardware device without any conversions

This device is equivalent to hw:0,0 (my Intel card is card 0). When using that driver for deadbeef, pressing the Play button in the browser caused the word "Play" to flash briefly before it gave up and returned to "Stopped".

The browser plug-in seems to be a bit flakey, though. Occasionally it would attempt to play when deadbeef was using hw:0,0. When that happened, the plug-in would freeze up, and the only way out was to close the browser tab and start over.

Your hardware may behave differently, but perhaps this will shed some light on your situation.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#7 Post by mikeb »

Yes as npierce points out when the card is named as a choice it may well be working in exclusive access mode..... using 'default' is the best way to avoid that...thanks for throwing that in there :)

Exclusive access is for example useful if you want to use sp/dif in/out to guarantee bit perfectness for 5 channel sound.

Mike

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#8 Post by 666philb »

sorry for the delay....

looking at both deadbeef & vlc, their audio settings were set to default and still only one would play at a time. This 'was' a remastered 5.6, so i tried a regular 5.6 and that was able to play sound from two sources at once!

so something must have gotten messed up in my remaster.

i have a new remaster now and it's fine.

thanks for the info on the 'default' audio setting in applications. i'll know what to look out for in the future...

cheers
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#9 Post by mikeb »

No problem

possibly something copied over from /etc during remaster or it may remain an unsolved mystery

mike

gcmartin

#10 Post by gcmartin »

This is an interesting discussion not just to address the problem of the OP, but because I could benefit from some document/thread/post sharing how to set up a system which has multiple sound sources.

I have just set up a desktop which has 3 sources of sound. They are
  • motherboard sound
  • USB camera with microphone
  • USB sound stick
I'm new at this kind of arrangement and could use guidance.

I know enough to understand that there is default sound use, OOTB, But, I have never had a system where multiple sound inputs could come as well as multiple sound outputs.

There is some understanding of how to change system's default sound device; and some general understanding needed on how to direct an application's attention to a sound device for recording or for playback.

Beginner questions
  • So, can I have my browser use a non-default output device?
  • And, how do I tell record software (like precord) which input to record from?
  • Should this post be on a separate thread?
Thanks, in advance, for any directions for "starter" understanding.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#11 Post by mikeb »

Hmm this is where the forum falls down in comparison to a wiki...there was a recent thread on multiple sound card usage but I am unable to locate it.

Quick andwers...
firefox sound card... unsure but would be handles by an .asoundrc file or a wrapper/launcher (I did the latter trying to use esd for network remote sound test) Actually you are likely dealing with flash rather than firefox so its config would be the one to look at.

precord If its as I remember should have a sound card selection option (or I added one...hmm)

alsamixer -c n shows controls for card n ...

One confusing area to me is getting one card to talk to another...I believe its done in software using a dummy sound devive/mixer.

A fresh thread might be good idea to refresh the subject so others more knowledgeble than I can contribute.

mike

User avatar
Q5sys
Posts: 1105
Joined: Thu 11 Dec 2008, 19:49
Contact:

Re: alsa not allowing more than one sound application at once

#12 Post by Q5sys »

666philb wrote:hi,
in precise 5.7 pae i can play sound from more than one application at once, where as in precise 5.6 only one application can play sound at a time and the application needs to be closed to release the soundcard.

Is there a setting that controls this? or is it to do with how the kernel is compiled?

cheers
Old Alsa Problem. Just google 'alsa only one program' to see.

It's usally one of the following issues.

1) default audio device needs to be set properly, and each program needs to be set properly as well.

2) something with the way the asound.conf is set up to allow multiple streams is messed up.

Try copying it from 5.7 to 5.6 to see if that resolves it. If not then you'll have to dig around in the hundreds of threads you'll find on the topic and see which addresses your problem.

Post Reply