On Mon, Jul 25, 2022 at 4:45 AM SHARMA, JYOTIRMOY
<jyotirmoy.sha...@amd.com> wrote:
>
> [AMD Official Use Only - General]
>
>
> Hi all,

Hi Jyotirmoy,

I have add the xen-users list to CC since this thread may be useful to
that forum.

> I am using ubuntu as dom 0 and also dom U (HVM). I want to play audio from 
> “dom U” Ubuntu.

I think that it should be possible to enable what you are attempting
to do. ie. audio output from a HVM Ubuntu guest VM.

Some questions to support assisting you:
* Does audio playback work OK from your Ubuntu dom0?
* Do you know which version of Ubuntu you are using? ('cat /etc/lsb-release')
* Do you know which version of Xen you are using? ('xl info' in dom0
should help)
* Do you know which version of Qemu you have installed in dom0?
* Did you build and install Xen from source code, or are you using
binary packages of Xen and its tools?
* Are you using the xl tools, or libvirt tools for configuring and
running your guest? -- ie. how do you start your domU VM?
* When your domU is running, please could you run 'ps auxwww' in dom0
and obtain the process information about the qemu instance that is
running, so that we can see what command line arguments have been
supplied to it

> I am new to Xen/virtualization in general.

Welcome! :-)

> From various reading I understood that I need to take following approach:
>
> 1. Use Xen front end ALSA driver in dom U

I'm not certain that this is necessary for your HVM guest. Instead of
using the Xen paravirtualized audio protocol, Qemu should be able to
present an emulated audio device to the HVM guest domU, and a standard
audio driver (hda or ac97) in domU should suffice.

> 2. Use Qemu to connect to the backend ALSA driver in Dom 0

I think if Qemu is started with the correct command line arguments, it
should be able to play sound on behalf of the guest, if sound is
correctly configured and working in dom0.

> Can you please let me know if this approach is fine? If yes, I have following 
> questions:
>
> 1. Do I need to recompile Ubuntu to support Xen front end ALSA driver? Or 
> will Ubuntu iso file already have it enabled?

I think the latter, that the Ubuntu installation ISO should already
contain a suitable audio device driver that is compatible with the
virtual audio device that is emulated by Qemu.

> 2. Ho do I configure Qemu to enable backend driver?

A little more information about what you're running will help with
providing guidance here. The xl man page indicates that there is a
"soundhw" option in the VM configuration file for passing sound
hardware configution through to qemu, so if you are using the xl
toolstack, you could try adding this to the config file: soundhw="hda"

Christopher

Reply via email to