[Lxc-users] ALSA in a container

Jon Nordby jononor at gmail.com
Sun Nov 21 19:05:10 UTC 2010


On 8 September 2010 10:35, Jon Nordby <jononor at gmail.com> wrote:
> On 8 September 2010 00:07, lxc at jelmail.com <lxc at jelmail.com> wrote:
>> If I have something on the host using ALSA then the guest complains:
>>
>> [root at mycontainer ~]# aplay /usr/share/sounds/alsa/Front_Center.wav
>> ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
>> aplay: main:654: audio open error: Device or resource busy
> This is when you use lsof/fuser to identify which process is hogging
> the device. For debugging you should use something dead simple like
> aplay in the host too. Also try configuring the programs/alsa to use a
> dmixed plug explicitly. Have you tried using the device from two
> containers (and not the host)?
>
> If neither of that leads to a solution, I would ask alsa people.
>
I recently realized that since ALSA does mixing in userspace one
probably cannot share an alsa device between containers (or
host+container) since they do not share userspace. OSSv4 on the other
hand does mixing in the kernel and might "just-work". If not, once
could use PulseAudio to share one soundcard with several containers.

-- 
Regards Jon Nordby - www.jonnor.com




More information about the lxc-users mailing list