You are not logged in.
I've recently had to switch from OSS4 to ALSA (due to some programs not supporting the former) and have since been unable to play sound from multiple applications at the same time. If I run speaker-test in two terminals, the first works fine while the second complains about the resource being busy:
speaker-test 1.0.24.2
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy
My sound card is Creative X-Fi Extreme Audio [SB0790], identified as CA0106. I do not think it does hardware mixing but I may well be mistaken. In any case, I was under the impression that software mixing was done by default.
I've read the wiki and searched the forums, but all the info I could find refers to editing /etc/asound.conf or ~/.asoundrc, which I believe is no longer relevant. In any case, trying to add some of the suggested additions to asound.conf produces no results. I'm currently using the followin asound.conf:
pcm.upmix51 {
type upmix
slave.pcm "surround51"
delay 15
channels 6
}
pcm.!default "plug:upmix51"
defaults.pcm.rate_converter "samplerate_best"
While it does seem to provide proper upmixing, the device locking problem exists regardless of whether I use it or not.
If anyone has any suggestions on how to fix it, I would be grateful!
Last edited by maxshaw (2011-05-07 03:02:03)
Offline
/etc/asound.conf is definitely relevant for me Key word here is 'dmix' - try find an example for your card with dmix.
EDIT. The idea is to redefine 'default' device with dmix plugin.
Last edited by student975 (2011-05-07 01:12:39)
"I exist" is the best myth I know..
Offline
Try my ~/.asoundrc
Offline
Thanks, brebs. Unfortunately my sound doesn't work at all with your config - speaker-test crashes claiming it couldn't initialize the card. Some more digging revealed an issue on the ALSA tracker that seems to apply. From there I found an asoundrc that seems to work properly for me, both mixing and expanding. For future reference, in case that link breaks, here's the code:
pcm.!default plug:both
ctl.!default {
type hw
card 0
}
pcm.both {
type route
slave.pcm {
type multi
slaves {
a.pcm "dfront"
a.channels 2
b.pcm "drear"
b.channels 2
c.pcm "dcenter"
c.channels 2
}
bindings {
0.slave a;
0.channel 0;
1.slave a;
1.channel 1;
2.slave b;
2.channel 0;
3.slave b;
3.channel 1;
4.slave c;
4.channel 0;
5.slave c;
5.channel 1;
}
}
ttable {
0.0 1;
1.1 1;
0.2 1;
1.3 1;
0.4 1;
1.5 1;
}
}
ctl.both {
type hw
card 0
}
pcm.dfront {
type dmix
ipc_key 1024
slave {
pcm "front"
period_time 0
period_size 1024
buffer_size 8192
rate 48000
}
}
ctl.dfront {
type hw
card 0
device 0
}
pcm.drear {
type dmix
ipc_key 2048
slave {
pcm "rear"
period_time 0
period_size 1024
buffer_size 8192
rate 48000
}
}
ctl.dfront {
type hw
card 0
device 1
}
pcm.dcenter {
type dmix
ipc_key 4096
slave {
pcm "center_lfe"
period_time 0
period_size 1024
buffer_size 8192
rate 48000
}
}
ctl.dcenter {
type hw
card 0
device 3
}
pcm.sblive {
type plug
slave {
pcm "hw:1,0"
rate 48000
}
}
Offline
couldn't initialize the card
Try 48000 instead of 44100. Some (cheapo) soundcards don't support 44100.
Offline