[pve-devel] applied: [PATCH qemu-server] audio dev: specify qemu audio backend

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Jul 23 18:24:38 CEST 2019


On 7/23/19 5:04 PM, Aaron Lauterer wrote:
> On 7/22/19 7:26 PM, Thomas Lamprecht wrote:
>> On 7/22/19 12:33 PM, Aaron Lauterer wrote:> On 7/22/19 10:00 AM, Thomas Lamprecht wrote:
>>>> On 7/19/19 3:15 PM, Aaron Lauterer wrote:
>>  From the offending commit[0] adding this pesky audiodev I still interpret
>> that this is really to configure specific audio drivers (the intel-hda, et
>> al. stuff in QEMU speak), and normally to combine those and ID is needed,
>> that's the case with most devices + their configuration in QEMU. So I
>> /guess/ that the id has it's purpose and that this is it..
> 
> After some research and digging it seems that the added -audiodev cleaned up the old way of configuring audio backends in qemu (used env variables). Devices like intel-hda are the audio frontends as far as I understand it.

Yes, [0] mentioned that too, seems like a better interface for sure.

> 
>>
>> I guess that it here only still works because in the with QXL as display it
>> defaults here to it?
>>
>> Anyway, I'm not too happy with this all if we do not have an idea how it
>> works and what really is affected by this. Do you think you can ask around
>> in the IRC or user mailing list, CCing the patch author could be an option,
>> albeit a bit intrusive one..
>> I'd be much happier if we had a bit clarity here, not just guess-work,
>> that's no accusation, the docs really do not makes ones life easy here, and
>> while the code helps - I currently just do not have the time to make me
>> familiar with it and see what really happens and if that's OK..
>>
>> [0]: https://git.qemu.org/gitweb.cgi?p=qemu.git;a=commitdiff;h=71830221fb23388b32e6516c2fb7a698453a6c5a
>>
> 
> The current implementation of the audio backend allows only one backend and will throw errors if more than one audiodev is added.
> The id parameter also seems to not be used in any of the backend implementations (thanks fabian for helping me with that).
> 
> There is a patch series in the qemu-devel list to implement multiple audio backends [1].
> The way the usage will be is that the id of the audio backend (audiodev) has to be specified when creating the audio device/frontend:
> 
>> Example usage: -audiodev pa,id=foo -device AC97,audiodev=foo

A finally, some answers to the mysterious 'id', much thanks, to both
you and Fabian, for that :)

> 
> So I guess we should come up with a decent naming of the id. Once qemu supports multiple audio devices and we want to do so too we need some kind of mapping of audio frontend to audio backend.
> 
> What about "spice0-backend"? I'm not really sure though and open to suggestions.

I applied your patch, and followed up with doing "${driver}-backend${id}"
where driver can only be 'spice' and id only be '0', for now, but that
should be enough to not let us bite in the future - if we want to support
more.

> 
> [1]: https://lists.nongnu.org/archive/html/qemu-devel/2019-07/msg03583.html





More information about the pve-devel mailing list