You are not logged in.

#1 2012-03-31 19:54:48

B3NW
Member
Registered: 2012-03-30
Posts: 17

Problem with multiple applications using one audio output

Hey there, I'm having issues setting up my 5.1 headset seen here (http://www.sharkoon.com/?q=en/content/x-tatic-digital) to work with multiple applications.

Right now I have audio streaming from a flash video, when I try run "$ speaker-test -c 6" I get the following error:

speaker-test 1.0.25

Playback device is default
Stream parameters are 48000Hz, S16_LE, 6 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
Playback open error: -16,Device or resource busy

If I try open another application which uses this device, the first application has its sound cut off.
2 more things to note:
- My preference for setup would be audio output through S/PDIF and input through USB, with the USB output disabled (To not waste system resources).
- I unmuted all channels in ALSA, however when I ran the test only 2 channels seemed to be working (Front L&R), it may have been defaulting to the USB connection, in which case, that explains only 2 channels being in use, is there a method of setting the S/PDIF as default system wide?

Thanks in advance for any help given! smile

Offline

#2 2012-03-31 20:58:21

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Problem with multiple applications using one audio output

You open flash - default PCM, 2 speakers. Then try to open 6 speakers. Cannot.

Solution is to open 6 speakers originally, dmixed. See my ~/.asoundrc for example.

Offline

#3 2012-03-31 21:15:55

B3NW
Member
Registered: 2012-03-30
Posts: 17

Re: Problem with multiple applications using one audio output

brebs wrote:

You open flash - default PCM, 2 speakers. Then try to open 6 speakers. Cannot.

Solution is to open 6 speakers originally, dmixed. See my ~/.asoundrc for example.

Okay, so I trick the system into using 6 to start with and then only use 2, so that other programs can also use 6 channels?

Do I just copy that whole file and save to ~/.asoundrc, or do I need to do something more specific? Also, is this just to enable 6 channels or will this solve my problem of two applications using it at the same time?

EDIT:

Here's my ~/.asoundrc file: http://pastie.org/3705696

When I run "$ speaker-test -c 2 -D default" it works, in a second terminal I run "$ speaker-test -c 6 -D surround51 -t wav" it does not work while the first terminal is running; I get:
speaker-test 1.0.25

Playback device is surround51
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
ALSA lib conf.c:1686:(snd_config_load1) _toplevel_:11:13:Unexpected char
ALSA lib conf.c:3406:(config_file_open) /home/ben/.asoundrc may be old or corrupted: consider to remove or fix it
Playback open error: -16,Device or resource busy

When I run the 2nd terminal without the first, I have no audio at all.

Last edited by B3NW (2012-03-31 21:55:52)

Offline

#4 2012-03-31 22:41:27

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Problem with multiple applications using one audio output

It's put the comments on multiple lines - fix that.

Offline

#5 2012-03-31 23:05:52

B3NW
Member
Registered: 2012-03-30
Posts: 17

Re: Problem with multiple applications using one audio output

brebs wrote:

It's put the comments on multiple lines - fix that.

Woops, I guess my paste messed up, new .asoundrc: http://pastie.org/3706033


I can run both at the same time, however I cannot hear any audio. Do I somehow have to change the default device, if so how can I do that?

Edit:

Restarted system now I get:


speaker-test 1.0.25

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 8192
Period size range from 1024 to 1024
Using max buffer size 8192
Periods = 4
was set period_size = 1024
was set buffer_size = 8192
0 - Front Left
Segmentation fault


(That's with both commands)

EDIT 2:

Interesting, apparently 2 audio streams are working, however the console thing still doesn't work..?

EDIT 3:

Didn't last long, now flash crashes and html 5 doesn't work -.-

EDIT 4:

Flash only works when other audio is active, however it has constant popping sound. I went through the system logs to get the errors of when flash crashes, it's audio crashing it, here's the error:


Apr  1 02:04:15 localhost kernel: [ 7057.499787] AudioThread[6227]: segfault at 7f2e2f7a8008 ip 00007f2e413a2786 sp 00007f2e33614ae8 error 7 in libasound.so.2.0.0[7f2e4131e000+eb000]

Last edited by B3NW (2012-04-01 01:11:04)

Offline

#6 2014-09-11 07:51:48

Tofeeq
Member
Registered: 2014-09-01
Posts: 24

Re: Problem with multiple applications using one audio output

Solved my problem by following this link

-- url redacted - Trilby --

Offline

#7 2014-09-11 13:31:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Problem with multiple applications using one audio output

Closed: Both "necrobumping" and spamming are violations of forum etiquette.  Please read the whole guide here:

Forum ettiquette

EDIT: Tofeeq, I see all five of your posts on this forum are exactly the same spam which makes this seem much less like an innocent mistake.  Take this as your only warning.  The next spamming violation will incur a ban.

EDIT: scratch that, I see you'd already been warned.  7 days off may make the point more clearly - if upon the return you can't display that you are going to be a useful member to this community it will become permanent.

Last edited by Trilby (2014-09-11 13:39:31)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB