[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sound Device Not Shared



On Thu, 5 Jan 2006 10:08:02 +1100
ankur.kumar@axa.com.au wrote:

> I'm using ALSA and the only issue is if an application is using Sound 
> device (/dev/dsp) and another
> application is trying to use it, it says "/dev/dsp" is already in use.
> 
> What can I do it share the sound device??

this is a problem I've struggled with for a long while. Basically, you can set up alsa to share the sound device by doing its own software mixing. If you google alsa and dmix you might get something, but I find it all really confusing. I basically copied someone else's post to put in my ~/.asoundrc file. I really don't know what this does, but it seems to work. ymmv.

pcm.!default {
    type plug
    slave.pcm "dmixer"
}
pcm.dsp0 {
    type plug
    slave.pcm "dmixer"
}
pcm.dmixer {
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:0,0"
        period_time 0
        period_size 1024
        buffer_size 8192
        #periods 128
        rate 44100
     }
     bindings {
        0 0
        1 1
     }
}
ctl.mixer0 {
    type hw
    card 0
}



Reply to: