Audio through spice
John Paul Morrison
jmorrison at bogomips.com
Sat May 18 22:02:03 UTC 2024
Hi
I haven't used any of this in a while so I can't help much. Quickemu is a
great tool for getting started, maybe their support forums can help.
OSX is pretty tricky so you might have to look around and change your
quickemu scripts or opencore setup.
For audio to work through spice you need a qemu line like this:
-audiodev spice,id=hda -device ich9-intel-hda -device
hda-duplex,audiodev=hda
But you also need OSX to boot properly with the right Opencore setup and
fixes/patches/hacks..
Quickemu docs say you need VoodooHDA OC
https://github.com/quickemu-project/quickemu/blob/master/docs/quickemu.1.md
Spice USB redirection for some devices:
https://github.com/quickemu-project/quickemu/issues/120
Docker OSX - MacOS focused, but it runs qemu inside docker
https://github.com/sickcodes/Docker-OSX
Lots of info that can be used outside of docker
iPhone USB redirection working - outside of Docker and by re-mapping your
PCI hardware to the guest.
Not sure if Spice can do that.
https://github.com/sickcodes/Docker-OSX/issues/133#issuecomment-894594306
Maybe other approaches will work:
https://github.com/sickcodes/Docker-OSX/issues/36
On Fri, May 17, 2024 at 1:50 PM Dorothy Calhoon <rdservants at att.net> wrote:
> Hi John!
>
> Thanks for your help. After reviewing your statements I think I don’t have
> USB redirection working. In Spice under “Options” it has checked “grab
> mouse” and “grab keyboard” not the term "redirect". It also passes the
> printer and a wifi adaptor through to the guest and these items are
> connected by USB ports. Another item checked under “Options” is “auto
> redirect newly plugged in USB devices.” However, when I plugin my mini
> speaker bar on the guest side it says the host won’t allow it. I was
> wondering if the issue there is the lack of a free channel. In Spice under
> “Input" it says there are 3 free channels but if I check the mini speaker
> bar there it is again rejected.
>
> I’ve done some research related to Qemu and sound, but so far nothing
> seemed to work or I couldn’t understand their instructions. Since Spice is
> supposed to handle audio into the guest, I thought that would be the
> easiest route. I was also concerned that doing some other approach might
> mess up spice.
>
> You mentioned usb-ochi/ehci/xhci as being the virtual machine/guest
> settings but I don’t know what I should do with that information.
>
> Your further guidance would be appreciated.
>
> Hi Victor!
>
> Thanks for your assistance. I am using spice-gtk (Spicy 0.39). As you
> recommended, I installed gstreamer. However, I still don’t have sound on
> the guest side. I installed gstreamer on the client side. Was that correct?
>
> I am looking for sound from YouTube videos played on the guest side. On
> the client side I have speakers connected via wifi or I use the mini sound
> bar connected via a usb port. Neither of these move to the guest side, even
> if I plug in the mini speaker after the virtual machine has brought up the
> guest.
>
> Any further help will be appreciated.
>
> Dorothy
>
>
>
>
>
> On May 10, 2024, at 12:34 PM, John Paul Morrison <jmorrison at bogomips.com>
> wrote:
>
> Hi Dorothy
>
> This sounds more like a guest problem - you could probably find more help
> on the quickemu Discord or looking through github issues/discussions.
>
> It's been a while but changes to Opencore or qemu settings can break audio
> and other things.
> Spice probably isn't redirecting your usb keyboard/mouse - normally it
> just sends the input to the emulated guest hardware.
> It also does this for audio.
>
> I have had OSX Catalina with working sound, and it breaks with
> Opencore/boot or other changes to the virtual hardware.
> Qemu/quickemu and Opencore have to map the intel-hda guest machine "sound
> card" into something Catalina can use.
>
> I have used USB redirection with Catalina - but you need to make sure
> Catalina has drivers/kexts for the USB hardware.
> Just getting USB working in Catalina was a challenge before - maybe that's
> been fixed. These were virtual machine/guest settings for
> usb-ochi/ehci/xhci.
>
>
>
> On Fri, May 10, 2024 at 3:09 AM Victor Toso <victortoso at redhat.com> wrote:
>
>> Hi Dorothy,
>>
>> On Sat, Apr 27, 2024 at 12:57:49PM GMT, Dorothy Calhoon wrote:
>> > Hi!
>> >
>> > I use spice to redirect the usb ports from my POPos host to my
>> > Mac Catalina operating system in my QEMU virtual machine which
>> > was set up using quickemu and now is accessed via quickgui.
>> > Spice works fine for redirecting the keyboard, mouse, wifi and
>> > printer. Now I need it for audio.
>>
>> SPICE supports playback and record audio channels. Playback is
>> audio coming from the Guest to your Client and Record is client's
>> microphone to redirect to the guest.
>>
>> If you already uses usbredir channel, chances are that your spice
>> client already supports playback/record too. Which spice client
>> are you using?
>>
>> > I know that audio has been a problem in virtual machines with
>> > Mac operating systems later than Catalina, but it is supposed
>> > to work in Catalina.
>>
>> If you are using spice-gtk, the audio backend should be gstreamer
>> and the right plugins need to be installed
>>
>> > I have a small speaker that plugs into the guest via a usb port
>> > but it is not recognized. I also tried headphones in the audio
>> > out ports and still Preferences show nothing for sound and
>> > there is none.
>> >
>> > I understand that spice can allow the audio sound card from the
>> > host to pass through to the guest. How do I implement that
>> > feature? Somewhere I read that inputting the following into the
>> > host terminal would do it: QEMU_AUDIO_DRV= spice. However,
>> > terminal did nothing and just wanted more instructions. The
>> > directions I had found said that after this command you could
>> > then use -soundhw hda options. However, terminal does not
>> > recognize soundhw and I wasn’t sure exactly what the “options"
>> > were.
>> >
>> > I also tried -audiodev spice,id=id[,prop[=value][,….]] and the
>> > terminal said that the audiodev command was not found.
>>
>> I'm not familiar with quickemu nor quickgui, but again, if you
>> are already using some spice channels, I'd guess the problem is
>> on the client-side.
>>
>> > It appears that there are just a couple of commands that would
>> > allow the audio passthrough feature of spice to work, but I
>> > don’t know exactly what they are. I am new to using terminal so
>> > I need very precise instructions. I would appreciate your help
>> > in this.
>> >
>> > Thanking you in advance.
>> >
>> > Dorothy
>>
>> Cheers,
>> Victor
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20240518/da8a2660/attachment.htm>
More information about the Spice-devel
mailing list