knazarov / homebrew-qemu-virgl

A homebrew tap for qemu with support for 3d accelerated guests
415 stars 68 forks source link

Passthrough internal camera and microphone? #51

Closed DUOLabs333 closed 1 year ago

DUOLabs333 commented 3 years ago

lsusb doesn't show anything so is it possible?

knazarov commented 3 years ago

Yes, it's possible. Instead of the lsusb on your host, you should use system_profiler SPUSBDataType and find product id and vendor id of your usb device. Then pass them as:

-device usb-host,vendorid=0x534d,productid=0x2109

Where you should substitute 0x534d and 0x2109 for your own device numbers. See this post on stack overflow as an example: https://stackoverflow.com/questions/65816169/how-to-use-usb-with-qemu-on-a-mac-host

DUOLabs333 commented 3 years ago

All that shows up are the two USB 3 ports -- I think it is because Apple stopped using USB cameras for their Macbook Air.

USB:

    USB 3.1 Bus:

      Host Controller Driver: AppleT8103USBXHCI

    USB 3.1 Bus:

      Host Controller Driver: AppleT8103USBXHCI

Unless you mean those are the camera and microphone.

knazarov commented 3 years ago

Oh, you mean the on-board camera. Then yes, it's unlikely that you'll be able to pass it through to the guest. With microphone it should be possible through the sound system emulation that qemu has, but the onboard camera needs a special-purpose emulator.

knazarov commented 3 years ago

Regular usb webcams should be fine though

DUOLabs333 commented 3 years ago

The microphone doesn't work, though audio does work.

knazarov commented 2 years ago

@DUOLabs333 you're right. Qemu doesn't seem to have support for mic or webcam input. And at this point, I don't think it will happen unfortunately unless there is a volunteer to get it working.

ericcurtin commented 2 years ago

Would be interested in this also, tried all the USB passthrough methods I could find, none worked unfortunately