* VirtIO sound device in qemu? @ 2021-06-07 4:41 Ethin Probst 2021-06-07 11:40 ` [edk2-devel] " Michael Brown 0 siblings, 1 reply; 12+ messages in thread From: Ethin Probst @ 2021-06-07 4:41 UTC (permalink / raw) To: devel For my audio output protocol (I wonder if we should abbreviate it as AOP?) I need to get access to VirtIO devices in PCIe configuration space. However, I can't seem to find a way of telling QEMU to use this device for audio output. Is there something I missed, or something that does support this? -- Signed, Ethin D. Probst ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] VirtIO sound device in qemu? 2021-06-07 4:41 VirtIO sound device in qemu? Ethin Probst @ 2021-06-07 11:40 ` Michael Brown 2021-06-07 15:16 ` Laszlo Ersek 0 siblings, 1 reply; 12+ messages in thread From: Michael Brown @ 2021-06-07 11:40 UTC (permalink / raw) To: devel, harlydavidsen On 07/06/2021 05:41, Ethin Probst wrote: > For my audio output protocol (I wonder if we should abbreviate it as > AOP?) I need to get access to VirtIO devices in PCIe configuration > space. However, I can't seem to find a way of telling QEMU to use this > device for audio output. Is there something I missed, or something > that does support this? Do you mean that you can't find a way to get QEMU to create a Virtio audio device visible to the guest, or that you can't find a way to get QEMU to connect this Virtio device to the host-side audio output? Michael ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] VirtIO sound device in qemu? 2021-06-07 11:40 ` [edk2-devel] " Michael Brown @ 2021-06-07 15:16 ` Laszlo Ersek 2021-06-07 18:54 ` Ethin Probst 2021-06-07 21:33 ` Leif Lindholm 0 siblings, 2 replies; 12+ messages in thread From: Laszlo Ersek @ 2021-06-07 15:16 UTC (permalink / raw) To: devel, mcb30, harlydavidsen On 06/07/21 13:40, Michael Brown wrote: > On 07/06/2021 05:41, Ethin Probst wrote: >> For my audio output protocol (I wonder if we should abbreviate it as >> AOP?) I need to get access to VirtIO devices in PCIe configuration >> space. However, I can't seem to find a way of telling QEMU to use this >> device for audio output. Is there something I missed, or something >> that does support this? > > Do you mean that you can't find a way to get QEMU to create a Virtio > audio device visible to the guest, or that you can't find a way to get > QEMU to connect this Virtio device to the host-side audio output? My latest (admittedly, quite old) information has been that QEMU does not implement a virtio-audio device yet. It's been work in progress. Best inquire on qemu-devel, CC'ing the audio subsys maintainers. Thanks Laszlo ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] VirtIO sound device in qemu? 2021-06-07 15:16 ` Laszlo Ersek @ 2021-06-07 18:54 ` Ethin Probst 2021-06-07 21:33 ` Leif Lindholm 1 sibling, 0 replies; 12+ messages in thread From: Ethin Probst @ 2021-06-07 18:54 UTC (permalink / raw) To: Laszlo Ersek; +Cc: devel, mcb30 Yeah, I was talking about presenting a virtio-sound device to the guest. On 6/7/21, Laszlo Ersek <lersek@redhat.com> wrote: > On 06/07/21 13:40, Michael Brown wrote: >> On 07/06/2021 05:41, Ethin Probst wrote: >>> For my audio output protocol (I wonder if we should abbreviate it as >>> AOP?) I need to get access to VirtIO devices in PCIe configuration >>> space. However, I can't seem to find a way of telling QEMU to use this >>> device for audio output. Is there something I missed, or something >>> that does support this? >> >> Do you mean that you can't find a way to get QEMU to create a Virtio >> audio device visible to the guest, or that you can't find a way to get >> QEMU to connect this Virtio device to the host-side audio output? > > My latest (admittedly, quite old) information has been that QEMU does > not implement a virtio-audio device yet. It's been work in progress. > Best inquire on qemu-devel, CC'ing the audio subsys maintainers. > > Thanks > Laszlo > > -- Signed, Ethin D. Probst ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] VirtIO sound device in qemu? 2021-06-07 15:16 ` Laszlo Ersek 2021-06-07 18:54 ` Ethin Probst @ 2021-06-07 21:33 ` Leif Lindholm 2021-06-08 18:52 ` Ethin Probst 1 sibling, 1 reply; 12+ messages in thread From: Leif Lindholm @ 2021-06-07 21:33 UTC (permalink / raw) To: devel, lersek; +Cc: mcb30, harlydavidsen On Mon, Jun 07, 2021 at 17:16:00 +0200, Laszlo Ersek wrote: > On 06/07/21 13:40, Michael Brown wrote: > > On 07/06/2021 05:41, Ethin Probst wrote: > >> For my audio output protocol (I wonder if we should abbreviate it as > >> AOP?) I need to get access to VirtIO devices in PCIe configuration > >> space. However, I can't seem to find a way of telling QEMU to use this > >> device for audio output. Is there something I missed, or something > >> that does support this? > > > > Do you mean that you can't find a way to get QEMU to create a Virtio > > audio device visible to the guest, or that you can't find a way to get > > QEMU to connect this Virtio device to the host-side audio output? > > My latest (admittedly, quite old) information has been that QEMU does > not implement a virtio-audio device yet. It's been work in progress. > Best inquire on qemu-devel, CC'ing the audio subsys maintainers. An RFC sent out end of April has not yet seen a PATCH, but some feedback: https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg06089.html / Leif ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] VirtIO sound device in qemu? 2021-06-07 21:33 ` Leif Lindholm @ 2021-06-08 18:52 ` Ethin Probst 2021-06-08 20:25 ` Leif Lindholm 0 siblings, 1 reply; 12+ messages in thread From: Ethin Probst @ 2021-06-08 18:52 UTC (permalink / raw) To: Leif Lindholm; +Cc: devel, lersek, mcb30 So I just might have to go with USB audio (the basic audio device class) since no code in QEMU for VirtIO audio has actually been committed upstream. Perusing the qemu code (specifically this: https://github.com/qemu/qemu/blob/master/hw/usb/dev-audio.c) it appears that Qemu implements v. 1.0 of the ADC specification. Section 5.3.3.1.2 of the USB basic audio device specification (v. 1.0) confirms that the bcdADC field should be set to 0100h. Will doing this violate any rules of GSoC or anything like that? I can implement VirtIO, but I will have no way of testing it until Qemu actually adds it in (unless there's another emulator that implements it). :-( On 6/7/21, Leif Lindholm <leif@nuviainc.com> wrote: > On Mon, Jun 07, 2021 at 17:16:00 +0200, Laszlo Ersek wrote: >> On 06/07/21 13:40, Michael Brown wrote: >> > On 07/06/2021 05:41, Ethin Probst wrote: >> >> For my audio output protocol (I wonder if we should abbreviate it as >> >> AOP?) I need to get access to VirtIO devices in PCIe configuration >> >> space. However, I can't seem to find a way of telling QEMU to use this >> >> device for audio output. Is there something I missed, or something >> >> that does support this? >> > >> > Do you mean that you can't find a way to get QEMU to create a Virtio >> > audio device visible to the guest, or that you can't find a way to get >> > QEMU to connect this Virtio device to the host-side audio output? >> >> My latest (admittedly, quite old) information has been that QEMU does >> not implement a virtio-audio device yet. It's been work in progress. >> Best inquire on qemu-devel, CC'ing the audio subsys maintainers. > > An RFC sent out end of April has not yet seen a PATCH, but some > feedback: > https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg06089.html > > / > Leif > -- Signed, Ethin D. Probst ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] VirtIO sound device in qemu? 2021-06-08 18:52 ` Ethin Probst @ 2021-06-08 20:25 ` Leif Lindholm 2021-06-08 23:29 ` Rafael Machado 2021-06-09 10:57 ` Laszlo Ersek 0 siblings, 2 replies; 12+ messages in thread From: Leif Lindholm @ 2021-06-08 20:25 UTC (permalink / raw) To: Ethin Probst; +Cc: devel, lersek, mcb30 Hi Ethin, Adapting and overcoming is very much the point of GSoC. The purpose of this project was always to bring portable audio support to EDK2, and longer-term the UEFI specification. Virtio was just the ideal means to that end. If it turns out not being the ideal way, that's just the way it is. *But*, I want to point out that there is no reason why we couldn't build this on top of a not-yet-upstream QEMU patchset - and help out by providing an eager real consumer for it. The virtio-snd RFC has been sent out, and it is very unlikely that it will not end up being merged, if in a modified form from what the first proof-of-concept looked like. Working with it would give you the opportunity to influence that implementation, as well as the virtio-snd standard. *However*, if the state of the QEMU virtio-snd RFC is not one that lends itself to basing other work on, then QEMU's usb-audio support is a close second - that should also be portable to other If we pick that route, you can always come back to virtio a bit later if you make good progress on USB Audio Device Class 1.0. / Leif On Tue, Jun 08, 2021 at 13:52:14 -0500, Ethin Probst wrote: > So I just might have to go with USB audio (the basic audio device > class) since no code in QEMU for VirtIO audio has actually been > committed upstream. Perusing the qemu code (specifically this: > https://github.com/qemu/qemu/blob/master/hw/usb/dev-audio.c) it > appears that Qemu implements v. 1.0 of the ADC specification. Section > 5.3.3.1.2 of the USB basic audio device specification (v. 1.0) > confirms that the bcdADC field should be set to 0100h. Will doing this > violate any rules of GSoC or anything like that? > I can implement VirtIO, but I will have no way of testing it until > Qemu actually adds it in (unless there's another emulator that > implements it). :-( > > On 6/7/21, Leif Lindholm <leif@nuviainc.com> wrote: > > On Mon, Jun 07, 2021 at 17:16:00 +0200, Laszlo Ersek wrote: > >> On 06/07/21 13:40, Michael Brown wrote: > >> > On 07/06/2021 05:41, Ethin Probst wrote: > >> >> For my audio output protocol (I wonder if we should abbreviate it as > >> >> AOP?) I need to get access to VirtIO devices in PCIe configuration > >> >> space. However, I can't seem to find a way of telling QEMU to use this > >> >> device for audio output. Is there something I missed, or something > >> >> that does support this? > >> > > >> > Do you mean that you can't find a way to get QEMU to create a Virtio > >> > audio device visible to the guest, or that you can't find a way to get > >> > QEMU to connect this Virtio device to the host-side audio output? > >> > >> My latest (admittedly, quite old) information has been that QEMU does > >> not implement a virtio-audio device yet. It's been work in progress. > >> Best inquire on qemu-devel, CC'ing the audio subsys maintainers. > > > > An RFC sent out end of April has not yet seen a PATCH, but some > > feedback: > > https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg06089.html > > > > / > > Leif > > > > > -- > Signed, > Ethin D. Probst ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] VirtIO sound device in qemu? 2021-06-08 20:25 ` Leif Lindholm @ 2021-06-08 23:29 ` Rafael Machado 2021-06-09 10:57 ` Laszlo Ersek 1 sibling, 0 replies; 12+ messages in thread From: Rafael Machado @ 2021-06-08 23:29 UTC (permalink / raw) To: devel, leif; +Cc: Ethin Probst, Laszlo Ersek, mcb30 [-- Attachment #1: Type: text/plain, Size: 3391 bytes --] That remembers me why did I do my mastering thesys using a real hardware :) Rafael Em ter, 8 de jun de 2021 17:25, Leif Lindholm <leif@nuviainc.com> escreveu: > Hi Ethin, > > Adapting and overcoming is very much the point of GSoC. > The purpose of this project was always to bring portable audio support > to EDK2, and longer-term the UEFI specification. Virtio was just the > ideal means to that end. > > If it turns out not being the ideal way, that's just the way it is. > *But*, I want to point out that there is no reason why we couldn't > build this on top of a not-yet-upstream QEMU patchset - and help out > by providing an eager real consumer for it. > The virtio-snd RFC has been sent out, and it is very unlikely that it > will not end up being merged, if in a modified form from what the > first proof-of-concept looked like. Working with it would give you the > opportunity to influence that implementation, as well as the > virtio-snd standard. > > *However*, if the state of the QEMU virtio-snd RFC is not one that > lends itself to basing other work on, then QEMU's usb-audio support is > a close second - that should also be portable to other > If we pick that route, you can always come back to virtio a bit later > if you make good progress on USB Audio Device Class 1.0. > > / > Leif > > On Tue, Jun 08, 2021 at 13:52:14 -0500, Ethin Probst wrote: > > So I just might have to go with USB audio (the basic audio device > > class) since no code in QEMU for VirtIO audio has actually been > > committed upstream. Perusing the qemu code (specifically this: > > https://github.com/qemu/qemu/blob/master/hw/usb/dev-audio.c) it > > appears that Qemu implements v. 1.0 of the ADC specification. Section > > 5.3.3.1.2 of the USB basic audio device specification (v. 1.0) > > confirms that the bcdADC field should be set to 0100h. Will doing this > > violate any rules of GSoC or anything like that? > > I can implement VirtIO, but I will have no way of testing it until > > Qemu actually adds it in (unless there's another emulator that > > implements it). :-( > > > > On 6/7/21, Leif Lindholm <leif@nuviainc.com> wrote: > > > On Mon, Jun 07, 2021 at 17:16:00 +0200, Laszlo Ersek wrote: > > >> On 06/07/21 13:40, Michael Brown wrote: > > >> > On 07/06/2021 05:41, Ethin Probst wrote: > > >> >> For my audio output protocol (I wonder if we should abbreviate it > as > > >> >> AOP?) I need to get access to VirtIO devices in PCIe configuration > > >> >> space. However, I can't seem to find a way of telling QEMU to use > this > > >> >> device for audio output. Is there something I missed, or something > > >> >> that does support this? > > >> > > > >> > Do you mean that you can't find a way to get QEMU to create a Virtio > > >> > audio device visible to the guest, or that you can't find a way to > get > > >> > QEMU to connect this Virtio device to the host-side audio output? > > >> > > >> My latest (admittedly, quite old) information has been that QEMU does > > >> not implement a virtio-audio device yet. It's been work in progress. > > >> Best inquire on qemu-devel, CC'ing the audio subsys maintainers. > > > > > > An RFC sent out end of April has not yet seen a PATCH, but some > > > feedback: > > > https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg06089.html > > > > > > / > > > Leif > > > > > > > > > -- > > Signed, > > Ethin D. Probst > > > > > > [-- Attachment #2: Type: text/html, Size: 4574 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] VirtIO sound device in qemu? 2021-06-08 20:25 ` Leif Lindholm 2021-06-08 23:29 ` Rafael Machado @ 2021-06-09 10:57 ` Laszlo Ersek 2021-06-09 12:25 ` Michael Brown 1 sibling, 1 reply; 12+ messages in thread From: Laszlo Ersek @ 2021-06-09 10:57 UTC (permalink / raw) To: Leif Lindholm, Ethin Probst; +Cc: devel, mcb30 On 06/08/21 22:25, Leif Lindholm wrote: > Hi Ethin, > > Adapting and overcoming is very much the point of GSoC. > The purpose of this project was always to bring portable audio support > to EDK2, and longer-term the UEFI specification. Virtio was just the > ideal means to that end. > > If it turns out not being the ideal way, that's just the way it is. > *But*, I want to point out that there is no reason why we couldn't > build this on top of a not-yet-upstream QEMU patchset - and help out > by providing an eager real consumer for it. > The virtio-snd RFC has been sent out, and it is very unlikely that it > will not end up being merged, if in a modified form from what the > first proof-of-concept looked like. Working with it would give you the > opportunity to influence that implementation, as well as the > virtio-snd standard. > > *However*, if the state of the QEMU virtio-snd RFC is not one that > lends itself to basing other work on, then QEMU's usb-audio support is > a close second - that should also be portable to other > If we pick that route, you can always come back to virtio a bit later > if you make good progress on USB Audio Device Class 1.0. SeaBIOS and OVMF patches are usually merged after the underlying QEMU device model is upstream. I'm uneducated about the "deliverables" in GSoC, but in general I'd suggest narrowing down the scope as much as possible. I don't know how hard it is to program USB audio, but if QEMU provides a good device model for that, out of the box, I would recommend basing the edk2 work on that device. Upstreaming QEMU patches can take very long, and it wouldn't be great if the usability (or "delivery") of the edk2 patch set depended on that. Especially if the authors of the QEMU and edk2 patches are different. Thanks Laszlo > > / > Leif > > On Tue, Jun 08, 2021 at 13:52:14 -0500, Ethin Probst wrote: >> So I just might have to go with USB audio (the basic audio device >> class) since no code in QEMU for VirtIO audio has actually been >> committed upstream. Perusing the qemu code (specifically this: >> https://github.com/qemu/qemu/blob/master/hw/usb/dev-audio.c) it >> appears that Qemu implements v. 1.0 of the ADC specification. Section >> 5.3.3.1.2 of the USB basic audio device specification (v. 1.0) >> confirms that the bcdADC field should be set to 0100h. Will doing this >> violate any rules of GSoC or anything like that? >> I can implement VirtIO, but I will have no way of testing it until >> Qemu actually adds it in (unless there's another emulator that >> implements it). :-( >> >> On 6/7/21, Leif Lindholm <leif@nuviainc.com> wrote: >>> On Mon, Jun 07, 2021 at 17:16:00 +0200, Laszlo Ersek wrote: >>>> On 06/07/21 13:40, Michael Brown wrote: >>>>> On 07/06/2021 05:41, Ethin Probst wrote: >>>>>> For my audio output protocol (I wonder if we should abbreviate it as >>>>>> AOP?) I need to get access to VirtIO devices in PCIe configuration >>>>>> space. However, I can't seem to find a way of telling QEMU to use this >>>>>> device for audio output. Is there something I missed, or something >>>>>> that does support this? >>>>> >>>>> Do you mean that you can't find a way to get QEMU to create a Virtio >>>>> audio device visible to the guest, or that you can't find a way to get >>>>> QEMU to connect this Virtio device to the host-side audio output? >>>> >>>> My latest (admittedly, quite old) information has been that QEMU does >>>> not implement a virtio-audio device yet. It's been work in progress. >>>> Best inquire on qemu-devel, CC'ing the audio subsys maintainers. >>> >>> An RFC sent out end of April has not yet seen a PATCH, but some >>> feedback: >>> https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg06089.html >>> >>> / >>> Leif >>> >> >> >> -- >> Signed, >> Ethin D. Probst > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] VirtIO sound device in qemu? 2021-06-09 10:57 ` Laszlo Ersek @ 2021-06-09 12:25 ` Michael Brown 2021-06-09 12:48 ` Leif Lindholm 0 siblings, 1 reply; 12+ messages in thread From: Michael Brown @ 2021-06-09 12:25 UTC (permalink / raw) To: Laszlo Ersek, Leif Lindholm, Ethin Probst; +Cc: devel On 09/06/2021 11:57, Laszlo Ersek wrote: > I'm uneducated about the "deliverables" in GSoC, but in general I'd > suggest narrowing down the scope as much as possible. I don't know how > hard it is to program USB audio, but if QEMU provides a good device > model for that, out of the box, I would recommend basing the edk2 work > on that device. QEMU also has good support for passing through a real USB device, which might be useful if you ever suspect that the QEMU device implementation is behaving incorrectly. (This is not implausible: I still have several bugfixes for the QEMU USB network device emulation sitting in an out-of-tree branch.) Michael ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] VirtIO sound device in qemu? 2021-06-09 12:25 ` Michael Brown @ 2021-06-09 12:48 ` Leif Lindholm 2021-06-09 13:43 ` Ethin Probst 0 siblings, 1 reply; 12+ messages in thread From: Leif Lindholm @ 2021-06-09 12:48 UTC (permalink / raw) To: Michael Brown; +Cc: Laszlo Ersek, Ethin Probst, devel On Wed, Jun 09, 2021 at 13:25:16 +0100, Michael Brown wrote: > On 09/06/2021 11:57, Laszlo Ersek wrote: > > I'm uneducated about the "deliverables" in GSoC, but in general I'd > > suggest narrowing down the scope as much as possible. I don't know how > > hard it is to program USB audio, but if QEMU provides a good device > > model for that, out of the box, I would recommend basing the edk2 work > > on that device. > > QEMU also has good support for passing through a real USB device, which > might be useful if you ever suspect that the QEMU device implementation is > behaving incorrectly. I have used the USB passthrough in anger, and sometimes it has been flawless, but other times it has been flaky. So, yes - it is worth cross-checking real and emulated hw when running into unexpected issues, but the passed-through hw is not automatically more reliable. / Leif > (This is not implausible: I still have several bugfixes for the QEMU USB > network device emulation sitting in an out-of-tree branch.) > > Michael ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] VirtIO sound device in qemu? 2021-06-09 12:48 ` Leif Lindholm @ 2021-06-09 13:43 ` Ethin Probst 0 siblings, 0 replies; 12+ messages in thread From: Ethin Probst @ 2021-06-09 13:43 UTC (permalink / raw) To: Leif Lindholm; +Cc: Michael Brown, Laszlo Ersek, devel Didn't know you could do USB passthrough, that would be useful -- I do have a USB mixer that I could test. And I could easily get USB headphones as well. On 6/9/21, Leif Lindholm <leif@nuviainc.com> wrote: > On Wed, Jun 09, 2021 at 13:25:16 +0100, Michael Brown wrote: >> On 09/06/2021 11:57, Laszlo Ersek wrote: >> > I'm uneducated about the "deliverables" in GSoC, but in general I'd >> > suggest narrowing down the scope as much as possible. I don't know how >> > hard it is to program USB audio, but if QEMU provides a good device >> > model for that, out of the box, I would recommend basing the edk2 work >> > on that device. >> >> QEMU also has good support for passing through a real USB device, which >> might be useful if you ever suspect that the QEMU device implementation >> is >> behaving incorrectly. > > I have used the USB passthrough in anger, and sometimes it has been > flawless, but other times it has been flaky. > > So, yes - it is worth cross-checking real and emulated hw when running > into unexpected issues, but the passed-through hw is not automatically > more reliable. > > / > Leif > >> (This is not implausible: I still have several bugfixes for the QEMU USB >> network device emulation sitting in an out-of-tree branch.) >> >> Michael > -- Signed, Ethin D. Probst ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-06-09 13:43 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-06-07 4:41 VirtIO sound device in qemu? Ethin Probst 2021-06-07 11:40 ` [edk2-devel] " Michael Brown 2021-06-07 15:16 ` Laszlo Ersek 2021-06-07 18:54 ` Ethin Probst 2021-06-07 21:33 ` Leif Lindholm 2021-06-08 18:52 ` Ethin Probst 2021-06-08 20:25 ` Leif Lindholm 2021-06-08 23:29 ` Rafael Machado 2021-06-09 10:57 ` Laszlo Ersek 2021-06-09 12:25 ` Michael Brown 2021-06-09 12:48 ` Leif Lindholm 2021-06-09 13:43 ` Ethin Probst
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox