Bug 1046574
| Summary: | fail to passthrough the USB speaker redirected from usb-redir with xhci controller | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Sibiao Luo <sluo> | ||||
| Component: | qemu-kvm | Assignee: | Gerd Hoffmann <kraxel> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 7.0 | CC: | chayang, hdegoede, hhuang, juli, juzhang, kraxel, michen, mrezanin, qzhang, rbalakri, sluo, virt-maint, xfu | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | qemu-kvm-1.5.3-76.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-03-05 08:02:43 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1103193, 1146483, 1146486 | ||||||
| Attachments: |
|
||||||
|
Description
Sibiao Luo
2013-12-26 07:34:26 UTC
My usb speaker info:
# lsusb -v
Bus 003 Device 004: ID 0c76:160c JMTek, LLC.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0c76 JMTek, LLC.
idProduct 0x160c
bcdDevice 1.00
iManufacturer 0
iProduct 1 USB Speaker
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 135
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 0
iInterface 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 40
bInCollection 1
baInterfaceNr( 0) 1
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bNrChannels 2
wChannelConfig 0x0003
Left Front (L)
Right Front (R)
iChannelNames 0
iTerminal 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 17
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 49
iTerminal 0
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 49
bSourceID 1
bControlSize 1
bmaControls( 0) 0x01
Mute Control
bmaControls( 1) 0x02
Volume Control
bmaControls( 2) 0x02
Volume Control
iFeature 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 1
bDelay 1 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 2
bSubframeSize 2
bBitResolution 16
bSamFreqType 1 Discrete
tSamFreq[ 0] 48000
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x00c8 1x 200 bytes
bInterval 1
bRefresh 0
bSynchAddress 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bLockDelayUnits 1 Milliseconds
wLockDelay 1 Milliseconds
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 50
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 32
Device Status: 0x0000
(Bus Powered)
Created attachment 841782 [details]
screenshot for device management.
Since the original description mentions that the same device works well with using an emulated uhci controller rather then an emulated xhci host controller, this seems like a hcd emulation issue to me rather then a usbredir issue. usbredir emulates a usb-device, and behaves exactly the same independent of the type of hcd emulated. Sibiao, to further rule out usbredir being the culprit here can you please try testing with usb-host redirection rather then using spice's usbredir channel ? (In reply to Hans de Goede from comment #3) > Since the original description mentions that the same device works well with > using an emulated uhci controller rather then an emulated xhci host > controller, this seems like a hcd emulation issue to me rather then a > usbredir issue. > > usbredir emulates a usb-device, and behaves exactly the same independent of > the type of hcd emulated. > > Sibiao, to further rule out usbredir being the culprit here can you please > try testing with usb-host redirection rather then using spice's usbredir > channel ? Yes, thanks for your kindly reminds. It can detect the usb controller and usb speaker device correctly if passthrough the USB speaker from usb-host directly with xhci controller, but it fail to work. e.g:... -device nec-usb-xhci,id=xhci0,bus=pci.0,addr=0x7 -device usb-host,hostbus=3,hostaddr=3,id=usb-speaker,bus=xhci0.0 host info: # uname -r && rpm -q qemu-kvm 3.10.0-66.el7.x86_64.debug qemu-kvm-1.5.3-31.el7.x86_64 guest info: win2012r2-64bit Best Regards, sluo Sound like a xhci emulation issue to me, moving this back to Gerd. upstream commits 786ad214c72226fa5bd4ebf18aeb4c6b54d3ba80 cc03ff9d0a147a399a11c9f513afa5e06ceee453 Please retest with this test build: http://people.redhat.com/ghoffman/bz1103193/ Fix included in qemu-kvm-1.5.3-76.el7 Reproduce: Version of components: qemu-kvm-1.5.3-70.el7.x86_64 --- cli: # /usr/libexec/qemu-kvm -M pc -m 2G -smp 2 -drive file=/home/win2012-64r2-virtio.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial="QEMU-DISK1",snapshot=on -device virtio-blk-pci,bus=pci.0,drive=drive-system-disk,id=system-disk,bootindex=1 -device nec-usb-xhci,id=xhci0,bus=pci.0,addr=0x7 -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=xhci0.0,port=1,debug=3 -monitor stdio -qmp tcp::8888,server,nowait -spice disable-ticketing,port=5931 -netdev tap,id=tap0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=tap0,id=net0,mac=24:be:05:14:11:11 -boot menu=on -S --- Steps are the same with comment 0. After step 3, the usb speaker controller device can be detected correctly, but the usb speaker cann't work in guest. Based on above show, this bz has been reproduced. =================== Verify: Version of components: qemu-kvm-1.5.3-77.el7.x86_64 --- cli and steps are as above show. After step 3, the usb speaker works well. Using KMPlayer to play music sounding well. As above show, this bz has been verified. ===================== Also test with qemu-kvm-rhev-2.1.2-6.el7.x86_64, works well, too. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0349.html |