Csillag, Kristof \(GE Healthcare, consultant\)
2006-Nov-09 10:58 UTC
[Xen-users] XEN sound emulation locks device exclusively
Hi there! My problem is the following: I am experimenting with virtualization with XEN. I am running WinXP in a HVM host with a Debian Gnu/Linux (Etch) dom0. I am also using audio emulation (sb16). This way, sounds from WinXP work fine. And here comes the problem: The HVM guest completely reserves the audio device; other software can not use it. (mplayer says this: alsa-init: using ALSA 1.0.13 alsa-init: setup for 1/2 channel(s) alsa-init: using device default alsa-lib: pcm_hw.c:1248:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy alsa-lib: pcm_dmix.c:864:(snd_pcm_dmix_open) unable to open slave alsa-init: playback open error: Device or resource busy ) This should not be like this; with alsa (including the dmix plugin) working fine on my system, different sounds sources could be mixed painlessly. The problem seems to be that the HVM guest does not use the device via the default device (which should go via the DMIX system), but directly. How can this be fixed? And where can I find more documentation about XEN audio emulation? Thank you for your help: Kristof Csillag _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ulrich Windl
2006-Nov-10 07:10 UTC
Re: [Xen-users] XEN sound emulation locks device exclusively
On 9 Nov 2006 at 11:58, Csillag, Kristof (GE Healthcare, consultan[Xen-users] XEN sound emulation locks device excl wrote: [...]> The HVM guest completely reserves the audio device; other software can not use it. >[...]> How can this be fixed? > > And where can I find more documentation about XEN audio emulation?As I think XEN has no "audio emulation", there''s probably no fix other than using VMware that has an audio emulation. What you are requesting is some magic driver in XEN that saves the state of the sound card before it reinitializes the card for the next VM''s sound state, preferrably without disturbing sound. As you can see, that''s rather impossible. You could either use the sound hardware from one VM only and let XEN ignore it, or make the other machines use some higher level sound server that''s hosted on one machine. Regards, Ulrich _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Kevin Fox
2006-Nov-10 16:41 UTC
Re: [Xen-users] XEN sound emulation locks device exclusively
You could use a sound server like pulseaudio. I believe it has a windows driver. On Thu, 2006-11-09 at 23:10 -0800, Ulrich Windl wrote:> On 9 Nov 2006 at 11:58, Csillag, Kristof (GE Healthcare, > consultan[Xen-users] XEN sound emulation locks device excl wrote: > > [...] > > The HVM guest completely reserves the audio device; other software > can not use it. > > > [...] > > How can this be fixed? > > > > And where can I find more documentation about XEN audio emulation? > > As I think XEN has no "audio emulation", there''s probably no fix other > than using > VMware that has an audio emulation. What you are requesting is some > magic driver > in XEN that saves the state of the sound card before it reinitializes > the card for > the next VM''s sound state, preferrably without disturbing sound. As > you can see, > that''s rather impossible. You could either use the sound hardware from > one VM only > and let XEN ignore it, or make the other machines use some higher > level sound > server that''s hosted on one machine. > > Regards, > Ulrich > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Csillag Kristof
2006-Nov-10 23:58 UTC
Re: [Xen-users] XEN sound emulation locks device exclusively
> As I think XEN has no "audio emulation", there''s probably no fix other than > using VMware that has an audio emulation.OK, so I have the wrong idea about how XEN handles sound. (I found no documentation on this, so it was basically a guess.) Here is what I know: - In the notebook computer there is and Intel HDA sound card. - In the configuration file for my HVM guest, I have "soundhw=''sb16''". - The WinXP running as HVM guest sees a Sound Blaster 16 sound device, and can use it. Here is what I thought: - Either the XEN hypervisor, or some user-space tool (probably the later) emulates the hardware interface of a SB16 for the HVM host, and - it relays the sound to the sound system of DOM0. If this is not how it goes, then what? I thought that since there is no real SB16 in the host in question, the SB16 interface must have been emulated, but from what you say I seem to be mistaken. Could someone please explain this, or give a link to the appropriate documentation? Thank you: Kristof Csillag _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Csillag, Kristof \(GE Healthcare, consultant\)
2006-Nov-13 07:41 UTC
[Xen-users] Re: XEN sound emulation locks device exclusively
> As I think XEN has no "audio emulation", there''s probably no fix other than > using VMware that has an audio emulation.OK, so I have the wrong idea about how XEN handles sound. (I found no documentation on this, so it was basically a guess.) Here is what I know: - In the notebook computer there is and Intel HDA sound card. - In the configuration file for my HVM guest, I have "soundhw=''sb16''". - The WinXP running as HVM guest sees a Sound Blaster 16 sound device, and can use it. Here is what I thought: - Either the XEN hypervisor, or some user-space tool (probably the later) emulates the hardware interface of a SB16 for the HVM host, and - it relays the sound to the sound system of DOM0. If this is not how it goes, then what? I thought that since there is no real SB16 in the host in question, the SB16 interface must have been emulated, but from what you say I seem to be mistaken. Could someone please explain this, or give a link to the appropriate documentation? Thank you: Kristof Csillag _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2006-Nov-13 15:15 UTC
RE: [Xen-users] Re: XEN sound emulation locks device exclusively
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of > Csillag, Kristof (GE Healthcare, consultant) > Sent: 13 November 2006 07:42 > To: xen-users@lists.xensource.com > Subject: [Xen-users] Re: XEN sound emulation locks device exclusively > > > As I think XEN has no "audio emulation", there''s probably > no fix other than > > using VMware that has an audio emulation. > > OK, so I have the wrong idea about how XEN handles sound. > (I found no documentation on this, so it was basically a guess.) > > Here is what I know: > > - In the notebook computer there is and Intel HDA sound card. > - In the configuration file for my HVM guest, I have "soundhw=''sb16''". > - The WinXP running as HVM guest sees a Sound Blaster 16 > sound device, and can use it. > > Here is what I thought: > > - Either the XEN hypervisor, or some user-space tool > (probably the later) emulates > the hardware interface of a SB16 for the HVM host, and > - it relays the sound to the sound system of DOM0. > > If this is not how it goes, then what? > I thought that since there is no real SB16 in the host in question, > the SB16 interface must have been emulated, > but from what you say I seem to be mistaken. > > Could someone please explain this, or give a link to the > appropriate documentation?If it''s a HVM guest, the sound emulation is done in QEMU-DM, the device model for the HVM mode. In fact, qemu-dm is responsible for ALL hardware emulation with a few exceptions (timer and interrupt controller functionality) that for performance reasons are in Xen itself. So, yes, qemu-dm will have a SB16 type emulation layer that then forwards the sound to be played to the real hardware. I would expect that this happens at a very low level, so it''s "bare samples" being sent to the hardware, which may mean that it needs to lock the device exclusively to prevent other streams from interacting. -- Mats> > Thank you: > > > Kristof Csillag > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Csillag, Kristof \(GE Healthcare, consultant\)
2006-Nov-14 08:28 UTC
RE: [Xen-users] Re: XEN sound emulation locks device exclusively
After checking the source code of ioemu (which is responsible for the audio emulation), I can see that there is a whole fully configurable audio system, with multiple output backands, including alsa output. (This whole stuff comes from QEMU.) So it should be possible to send the sound to alsa via the normal channels, using the dmix plugin. So the question is: how can I configure the audio sub-system in qemu-dm? How can I pass parameters to it? (If I can not, then there should be a mechanism for that.) Kristof Csillag -----Eredeti üzenet----- Feladó: Petersson, Mats [mailto:Mats.Petersson@amd.com] Küldve: 2006-11-13, H 16:15 Címzett: Csillag, Kristof (GE Healthcare, consultant); xen-users@lists.xensource.com Tárgy: RE: [Xen-users] Re: XEN sound emulation locks device exclusively> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of > Csillag, Kristof (GE Healthcare, consultant) > Sent: 13 November 2006 07:42 > To: xen-users@lists.xensource.com > Subject: [Xen-users] Re: XEN sound emulation locks device exclusively > > > As I think XEN has no "audio emulation", there''s probably > no fix other than > > using VMware that has an audio emulation. > > OK, so I have the wrong idea about how XEN handles sound. > (I found no documentation on this, so it was basically a guess.) > > Here is what I know: > > - In the notebook computer there is and Intel HDA sound card. > - In the configuration file for my HVM guest, I have "soundhw=''sb16''". > - The WinXP running as HVM guest sees a Sound Blaster 16 > sound device, and can use it. > > Here is what I thought: > > - Either the XEN hypervisor, or some user-space tool > (probably the later) emulates > the hardware interface of a SB16 for the HVM host, and > - it relays the sound to the sound system of DOM0. > > If this is not how it goes, then what? > I thought that since there is no real SB16 in the host in question, > the SB16 interface must have been emulated, > but from what you say I seem to be mistaken. > > Could someone please explain this, or give a link to the > appropriate documentation?If it''s a HVM guest, the sound emulation is done in QEMU-DM, the device model for the HVM mode. In fact, qemu-dm is responsible for ALL hardware emulation with a few exceptions (timer and interrupt controller functionality) that for performance reasons are in Xen itself. So, yes, qemu-dm will have a SB16 type emulation layer that then forwards the sound to be played to the real hardware. I would expect that this happens at a very low level, so it''s "bare samples" being sent to the hardware, which may mean that it needs to lock the device exclusively to prevent other streams from interacting. -- Mats> > Thank you: > > > Kristof Csillag > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
malc
2006-Nov-14 12:30 UTC
RE: [Xen-users] Re: XEN sound emulation locks device exclusively
On Tue, 14 Nov 2006, Csillag, Kristof (GE Healthcare, consultant) wrote:> After checking the source code of ioemu (which is responsible for the audio emulation), > I can see that there is a whole fully configurable audio system, with multiple output > backands, including alsa output. (This whole stuff comes from QEMU.) > > So it should be possible to send the sound to alsa via the normal channels, > using the dmix plugin. > > So the question is: how can I configure the audio sub-system in qemu-dm? > How can I pass parameters to it? > (If I can not, then there should be a mechanism for that.)<snip> Audio in vanilla QEMU takes audio fine-tuning parameters from environment, to use dmix: QEMU_ALSA_DAC_DEV=dmix qemu <params> -- vale _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
John McCullough
2006-Nov-14 18:53 UTC
Re: [Xen-users] XEN sound emulation locks device exclusively
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Csillag Kristof wrote:>> As I think XEN has no "audio emulation", there''s probably no fix other than >> using VMware that has an audio emulation. > > OK, so I have the wrong idea about how XEN handles sound. > (I found no documentation on this, so it was basically a guess.) > > Here is what I know: > > - In the notebook computer there is and Intel HDA sound card. > - In the configuration file for my HVM guest, I have "soundhw=''sb16''". > - The WinXP running as HVM guest sees a Sound Blaster 16 sound device, and can use it. > > Here is what I thought: > > - Either the XEN hypervisor, or some user-space tool (probably the later) emulates > the hardware interface of a SB16 for the HVM host, and > - it relays the sound to the sound system of DOM0. > > If this is not how it goes, then what? > I thought that since there is no real SB16 in the host in question, > the SB16 interface must have been emulated, > but from what you say I seem to be mistaken.Xen uses a stub version of qemu to emulate devices in hvm domains. Your best bet is probably searching with respect to qemu and sb16. - -John McCullough -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFWhCZ48DoLwhCPR0RAtevAKD9jTB/F+Zuq0fe4uDM73iiQoV7twCfb5du mdXIJyzMZc89XkwVnFTVT0Q=wj7O -----END PGP SIGNATURE----- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Maybe Matching Threads
- SoundBlaster 16 removal impending
- SoundBlaster 16 removal impending
- mainboard recommendations
- Bug#536176: xen-utils-3.4: trying xen-3.4 once breaks xen-3.2 (?)
- Error: Device 768 (vbd) could not be connected. Path closed or removed during hotplug add: backend/vbd/9/768 state: 1