Re: [Lxc-users] ALSA in a container
On 8 September 2010 10:35, Jon Nordby wrote: > On 8 September 2010 00:07, l...@jelmail.com wrote: >> If I have something on the host using ALSA then the guest complains: >> >> [r...@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 -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] ALSA in a container
On 8 September 2010 00:07, l...@jelmail.com wrote: > If I have something on the host using ALSA then the guest complains: > > [r...@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. -- Regards Jon Nordby - www.jonnor.com -- This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] ALSA in a container
Hi Jon, Apologies for late reply but an Arch update borked my sytem on Saturday ;) I am not running PulseAudio. I was hoping to get away without that but I fear that may be the only way I can get this to work. At the moment I am trying with just ALSA on a test machine with very little else. Here is a transcript showing how I set up a container with ALSA: http://starfry.pastebin.com/yjDMLppn If ALSA is not in use everything works: [r...@mycontainer ~]# aplay /usr/share/sounds/alsa/Front_Center.wav Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono If I have something on the host using ALSA then the guest complains: [r...@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 Likwise, if the container has ALSA in use nothing else can use it. The setup uses Dmix. Note that two users on one "machine" can use Alsa concrrently (i.e. two users on the host or in the same container). I don't know if any of that helps at all? I think the problem is to do with dmix not being "seen" across container/host boundary. I think the host's dmix needs to be exposed in the container but I am not sure how to do that. mail2web.com Enhanced email for the mobile individual based on Microsoft® Exchange - http://link.mail2web.com/Personal/EnhancedEmail -- This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] ALSA in a container
On 27 August 2010 13:57, l...@jelmail.com wrote: > Hi, here's an interesting one that I am stuck on... > > I have Alsa sound running fine and can use it by multiple users at the same > time in either the host or a container. > > As soon as it is used on either the host or the container the other one is > locked out. > > Has anyone else played with this? > > I am a little stuck, not sure what else to try... Are you running Pulseaudio or similar software that hogs the alsa device? lsof and friends can be useful to check this. If you want better help than that, explain how you have set this up and how it fails. -- Regards Jon Nordby - www.jonnor.com -- This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
[Lxc-users] ALSA in a container
Hi, here's an interesting one that I am stuck on... I have Alsa sound running fine and can use it by multiple users at the same time in either the host or a container. As soon as it is used on either the host or the container the other one is locked out. Has anyone else played with this? I am a little stuck, not sure what else to try... Thanks, John mail2web.com What can On Demand Business Solutions do for you? http://link.mail2web.com/Business/SharePoint -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users