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

Re: Enable audio virtualization in Xen




On 12.08.22 12:27, SHARMA, JYOTIRMOY wrote:

[AMD Official Use Only - General]


Hello Christopher,

Hello Jyotirmoy, Christopher


Just spotted that libxenbe and snd_be were mentioned ...


Thank you so much for your reply. I will execute your steps and first try to enable pulse audio as you have mentioned.

Later I will try to enable ALSA which is my final requirement.

Meanwhile, I was reading up on virtio-snd and found some patches in the internet. However, those patches are not

present in the qemu source code (https://gitlab.com/qemu-project/qemu.git). Do you know

 1. If virtio-snd front end driver is another option to enable audio
    in HVM guest with Qemu/ALSA as backend in dom0?
 2. If yes, how is it different from xen front end drivers?

Also, regarding enabling Xen PV audio front end device drivers, you have mentioned that I need to enable backend using libxenbe and snd_be. Does it mean, in this case, Qemu is not involved in the audio backend? Any pointers to understand this overall architecture (Xen PV audio front end driver/snd_be/qemu/ALSA) will be extremely helpful.


   ... I am not familiar with sound internals, but have an overall understanding about Xen PV audio.


1. The backend (snd_be) is Xen PV backend, not a virtio. It is a standalone user-space application, so Qemu is not involved here if we are speaking about snd_be+libxenbe. The backend can work on top of Pulse or Alsa and supports playback and record.
   https://github.com/xen-troops/snd_be/commits/master
   Some details you can find at:
   https://github.com/xen-troops/snd_be/blob/master/README.md

2. The library (libxenbe) contains various Xen specific stuff, such as event channel, xenstore, grant table, etc needed for Xen PV backend to work, so it should be linked by snd_be.
   https://github.com/xen-troops/libxenbe/commits/master
   Both snd_be and libxenbe are written on C++, both are part of Yocto build, but I guess they can be built standalone.


3. The frontend is in upstream Linux and supported, the protocol is also there, toolstack also supports PV audio configuration (no extra patches are needed):
   https://elixir.bootlin.com/linux/v5.19.1/source/sound/xen
https://elixir.bootlin.com/linux/v5.19.1/source/include/xen/interface/io/sndif.h

   Also the guest should be built with CONFIG_SND_XEN_FRONTEND=y


Regards,

Jyotirmoy

--
Regards,

Oleksandr Tyshchenko




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.