how to connect USB-Audio adapter in order to use Mic to VM (Windows)
-
The VM installed with Windows OS.
Right now the Sounds settings - Recording has no Mic.
I have USB-audio adapter pass-thru, then a microphone is attached to the jack.
however, the Mic is not listed still.I can use this USB-audio adapter to VMWare workstation.
-
XCP-ng is far from being similar to a Type 2 hypervisor (like VirtualBox or VMware workstation). It's meant for servers, not desktop VMs with multimedia.
Also, the jack on the physical machine is probably only visible in the Dom0, not the VM. I wonder if you can pass the sound card device in PCI passthrough directly to the VM, that might do the trick
-
@olivierlambert
do you have guidance steps on how to do it?
i can make it works easily on VMWare workstation. The windows detects the USB media. -
Again, VMware workstation is a type 2 virtualization solution, so it's very different than a type 1 "server virtualization" platform.
Check https://docs.xcp-ng.org/compute/#pci-passthrough for more info on PCI passthrough
-
@olivierlambert
i followed the guidelines but did not find the device when sending command in host CLI "lspci"[14:19 xcp-ng-ryzen ~]# lspci 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Root Complex 00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Renoir IOMMU 00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge 00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge 00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge 00:02.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge 00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge 00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge 00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus 00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 51) 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51) 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166a 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166b 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166c 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166d 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166e 00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166f 00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 1670 00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 1671 01:00.0 Non-Volatile memory controller: KIOXIA Corporation NVMe SSD (rev 01) 02:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset USB 3.1 XHCI Controller (rev 01) 02:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset SATA Controller (rev 01) 02:00.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Bridge (rev 01) 03:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01) 03:01.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01) 03:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01) 03:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01) 03:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01) 03:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01) 08:00.0 Network controller: Intel Corporation Dual Band Wireless-AC 3168NGW [Stone Peak] (rev 10) 09:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03) 0a:00.0 Non-Volatile memory controller: KIOXIA Corporation NVMe SSD (rev 01) 0b:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne (rev c8) 0b:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 1637 0b:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor 0b:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1 0b:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1 0b:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller 0c:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81) 0c:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81)
-
I used another command "dmesg" and saw something like this:
[11130937.256442] usb 1-4: new full-speed USB device number 13 using xhci_hcd [11130937.555189] usb 1-4: not running at top speed; connect to a high speed hub [11130937.576207] usb 1-4: New USB device found, idVendor=001f, idProduct=0b21, bcdDevice= 1.00 [11130937.576212] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [11130937.576215] usb 1-4: Product: USB Audio [11130937.576217] usb 1-4: Manufacturer: Generic [11130937.576219] usb 1-4: SerialNumber: 20210926172016 [11130937.591273] input: Generic USB Audio as /devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-4/1-4:1.3/0003:001F:0B21.0018/input/input7 [11130937.648542] hid-generic 0003:001F:0B21.0018: input,hidraw0: USB HID v2.01 Device [Generic USB Audio] on usb-0000:02:00.0-4/input [11131331.785627] usb 1-4: reset full-speed USB device number 13 using xhci_hcd [11131335.893674] device tap214.0 left promiscuous mode [11131340.991983] vif vif-214-0 vif214.0: Guest Rx ready [11131412.105635] usb 1-4: reset full-speed USB device number 13 using xhci_hcd [11131412.395350] input: Generic USB Audio as /devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-4/1-4:1.3/0003:001F:0B21.0019/input/input8 [11131412.452662] hid-generic 0003:001F:0B21.0019: input,hidraw0: USB HID v2.01 Device [Generic USB Audio] on usb-0000:02:00.0-4/input3 [11132083.409573] usb 1-4: reset full-speed USB device number 13 using xhci_hcd [11132083.698828] input: Generic USB Audio as /devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-4/1-4:1.3/0003:001F:0B21.001B/input/input10 [11132083.756714] hid-generic 0003:001F:0B21.001B: input,hidraw0: USB HID v2.01 Device [Generic USB Audio] on usb-0000:02:00.0-4/input3
-
Just there in your lspci:
0b:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1 0b:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1
This is your USB controller, using 2x PCI addresses (probably half of the ports are on the first and then the rest on the second one). You can pass it through your VM.
-
@olivierlambert
i have pass thru the USB as screenshot on above.
however windows does not see the mic still. -
USB passthrough is not PCI passthrough. As I said earlier, what you can try to do instead of USB passthrough, is to directly PCI passthrough the USB controller to your VM.