Received: by 2002:a05:6520:1682:b0:147:d1a0:b502 with SMTP id ck2csp5600008lkb; Mon, 11 Oct 2021 09:42:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwqP+VLHbcUBh17bLndyWf1EWD7aV8/HHE2SHgDMPdc4RyzkoWGCyQAY5ghMvVRv2dr/1S X-Received: by 2002:a63:3301:: with SMTP id z1mr19025954pgz.120.1633970440723; Mon, 11 Oct 2021 09:40:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633970440; cv=none; d=google.com; s=arc-20160816; b=UDDTq53R3NereHdnzs035F4XBeQrQSBA/265HrfIIcvhWddDL8xOz4iZAy4fAoe6mC KeMN3RMOkSQtXTt3V/xYJra2zSvi45NFTD5jNHkz1F10cjTgLcZka3HvK8onJWxudi0R 1QyE8bxWGCp4gq2YE3bEdTNUBfWIN1JO/yJColmCl8iGW7ngo9b4DP4ik4PXajS5roLx gU3uCP3bJBJeRepsnJ6xmj8om7A+MxA8HeV1XK7Fp0CSARRsZFokYc0dKaIRdSDkhuWF YRLsq+mahtLnGLmJldH+juchg4rnMc7/Zso2u384s4XN7m6Y0hEVpjVeaWhUk5b24j3C k4zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fnlSUmdgYCJXCdzfkTBdoFhpPxMox8LPWsZ3oz7R558=; b=gs4fZXPnqVd/9rd8XpUTiHaheRLL0UscJTa6MLksvVVWIsAOJ//KH8AB9auIIWAOLa MzMQ7BxgjiDmH8DCAlXxdp7uVgXuZ9xbrFLD5LmpY89KUMEyL0PW+SQq9n9Jo7hmiwW+ pBABgbuVXoAux8joLzi8eQN0WSc1t/M7Z9cJTIi4K4Duscj03oKxzWN8JeF01EQJ/Ww0 AJTGHSKHKpsu9+IgN83AFpjQRhPw1rIixm4pXE6wxdyL+MnSgiF/OMyXnLfWtkYGgRkP Xu/sPEc3YEjvHFrWhCN97QtCeVvSXBmyPsGJvAWGh7SSZilVFCeqnmVz8pk16NSX1rLJ +6Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=voxwBqDJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 125si10562523pff.12.2021.10.11.09.40.27; Mon, 11 Oct 2021 09:40:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=voxwBqDJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239054AbhJKPac (ORCPT + 99 others); Mon, 11 Oct 2021 11:30:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:52658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238712AbhJKPaW (ORCPT ); Mon, 11 Oct 2021 11:30:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7BDC960F4B; Mon, 11 Oct 2021 15:28:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633966102; bh=xMNwMXG2SEz2UgUFdntNpLlFLoKaHh9gxc7rz2nY98o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=voxwBqDJFbLBpqZjAqnZlDWYxeSkQ8O8BZxGmXeBKg7OL1lsO6njEQ4kUr1X2Nl5k GnfQdKswQoeAHQlkmHgjsOd6OHo/GISfL4WyWBeKyOA4C2BhJfndfVic57eeAqYFTt fLOBs7irX1rB9zcnT3zxlC9+9QFuFD7j81ep+hTE= Date: Mon, 11 Oct 2021 17:28:15 +0200 From: Greg Kroah-Hartman To: Takashi Iwai Cc: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: usb-audio: allow -EPIPE errors for some v2 messages Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 10, 2021 at 10:25:09PM +0200, Takashi Iwai wrote: > On Sun, 10 Oct 2021 14:22:41 +0200, > Greg Kroah-Hartman wrote: > > > > The Schiit Hel device does not like to respond to all get_ctl_value_v2() > > requests for some reason. This used to work in older kernels, but now > > with more strict checking, this failure causes the device to fail to > > work. > > > > Cc: Jaroslav Kysela > > Cc: Takashi Iwai > > Signed-off-by: Greg Kroah-Hartman > > --- > > > > This fixes the Shiit Hel device that I have. It used to work on older > > kernels (a year ago?), but stopped working for some reason and I didn't > > take the time to track it down. This change fixes the issue for me, but > > feels wrong for some reason. At least now I can use the device as a > > headphone driver, much better than the built-in one for my current > > machine... > > > > If needed, I can take the time to do bisection to track down the real > > issue here, it might be due to stricter endpoint checking in the USB > > core, but that feels wrong somehow. > > > > Here's the debugfs USB output for this device, showing the endpoints: > > > > T: Bus=07 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 5 Spd=480 MxCh= 0 > > D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 > > P: Vendor=30be ProdID=0101 Rev=01.02 > > S: Manufacturer=Schiit Audio > > S: Product=Schiit Hel > > C: #Ifs= 4 Cfg#= 1 Atr=c0 MxPwr=0mA > > I: If#= 0 Alt= 0 #EPs= 1 Cls=01(audio) Sub=01 Prot=20 Driver=snd-usb-audio > > E: Ad=8f(I) Atr=03(Int.) MxPS= 6 Ivl=1ms > > I: If#= 1 Alt= 1 #EPs= 2 Cls=01(audio) Sub=02 Prot=20 Driver=snd-usb-audio > > E: Ad=05(O) Atr=05(Isoc) MxPS= 104 Ivl=125us > > E: Ad=85(I) Atr=11(Isoc) MxPS= 4 Ivl=1ms > > I: If#= 2 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=snd-usb-audio > > E: Ad=88(I) Atr=05(Isoc) MxPS= 156 Ivl=125us > > I: If#= 3 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid > > E: Ad=84(I) Atr=03(Int.) MxPS= 16 Ivl=1ms > > > > Any other suggestions to fix this are welcome. > > Could you show the exact error messages and lsusb -v output? > We may paper over only the problematic node instead. Sure, here's the dmesg output on 5.15-rc5 when it is turned on: [Oct11 17:25] usb 7-2.2: new high-speed USB device number 9 using xhci_hcd [ +0.122422] usb 7-2.2: New USB device found, idVendor=30be, idProduct=0101, bcdDevice= 1.02 [ +0.000009] usb 7-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ +0.000002] usb 7-2.2: Product: Schiit Hel [ +0.000002] usb 7-2.2: Manufacturer: Schiit Audio [ +0.327172] input: Schiit Audio Schiit Hel as /devices/pci0000:40/0000:40:01.1/0000:41:00.0/0000:42:08.0/0000:47:00.1/usb7/7-2/7-2.2/7-2.2:1.3/0003:30BE:0101.0009/input/input21 [ +0.055134] hid-generic 0003:30BE:0101.0009: input,hidraw8: USB HID v1.00 Device [Schiit Audio Schiit Hel] on usb-0000:47:00.1-2.2/input3 [ +0.135988] usb 7-2.2: cannot get ctl value: req = 0x81, wValue = 0x100, wIndex = 0x1100, type = 1 [ +0.060647] usb 7-2.2: cannot get ctl value: req = 0x81, wValue = 0x100, wIndex = 0x1100, type = 1 [ +0.065362] usb 7-2.2: cannot get ctl value: req = 0x81, wValue = 0x100, wIndex = 0x1100, type = 1 [ +0.192121] usb 7-2.2: cannot get ctl value: req = 0x81, wValue = 0x100, wIndex = 0x1100, type = 1 And here is the 'lsusb -v' output of the device. Bus 007 Device 009: ID 30be:0101 Schiit Audio Schiit Hel Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x30be idProduct 0x0101 bcdDevice 1.02 iManufacturer 1 Schiit Audio iProduct 2 Schiit Hel iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0198 bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 0mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 3 bFunctionClass 1 Audio bFunctionSubClass 0 bFunctionProtocol 32 iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 1 Control Device bInterfaceProtocol 32 iInterface 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdADC 2.00 bCategory 10 wTotalLength 0x0100 bmControls 0x00 AudioControl Interface Descriptor: bLength 17 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bCSourceID 18 bNrChannels 0 bmChannelConfig 0x00000000 iChannelNames 0 bmControls 0x0040 Cluster Control (read-only) iTerminal 0 AudioControl Interface Descriptor: bLength 17 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 5 wTerminalType 0x0201 Microphone bAssocTerminal 0 bCSourceID 22 bNrChannels 2 bmChannelConfig 0x00000003 Front Left (FL) Front Right (FR) iChannelNames 0 bmControls 0x0044 Connector Control (read-only) Cluster Control (read-only) iTerminal 0 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 7 wTerminalType 0x0301 Speaker bAssocTerminal 0 bSourceID 13 bCSourceID 18 bmControls 0x0004 Connector Control (read-only) iTerminal 0 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 11 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 17 bCSourceID 22 bmControls 0x0000 iTerminal 0 AudioControl Interface Descriptor: bLength 18 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 13 bSourceID 1 bmaControls(0) 0x00000003 Mute Control (read/write) bmaControls(1) 0x00000000 bmaControls(2) 0x00000000 iFeature 0 AudioControl Interface Descriptor: bLength 18 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 17 bSourceID 5 bmaControls(0) 0x00000003 Mute Control (read/write) bmaControls(1) 0x00000000 bmaControls(2) 0x00000000 iFeature 0 AudioControl Interface Descriptor: bLength 8 bDescriptorType 36 bDescriptorSubtype 10 (CLOCK_SOURCE) bClockID 18 bmAttributes 3 Internal programmable clock bmControls 0x07 Clock Frequency Control (read/write) Clock Validity Control (read-only) bAssocTerminal 0 iClockSource 0 AudioControl Interface Descriptor: bLength 8 bDescriptorType 36 bDescriptorSubtype 10 (CLOCK_SOURCE) bClockID 22 bmAttributes 3 Internal programmable clock bmControls 0x07 Clock Frequency Control (read/write) Clock Validity Control (read-only) bAssocTerminal 0 iClockSource 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8f EP 15 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0006 1x 6 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 4 Schiit Hel Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 2 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 0 AudioStreaming Interface Descriptor: bLength 16 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 1 bmControls 0x05 Active Alternate Setting Control (read-only) Valid Alternate Setting Control (read-only) bFormatType 1 bmFormats 0x00000001 PCM bNrChannels 2 bmChannelConfig 0x00000003 Front Left (FL) Front Right (FR) iChannelNames 0 AudioStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bSubslotSize 2 bBitResolution 16 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x05 EP 5 OUT bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0068 1x 104 bytes bInterval 1 AudioStreaming Endpoint Descriptor: bLength 8 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x00 bmControls 0x00 bLockDelayUnits 0 Undefined wLockDelay 0x0000 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 17 Transfer Type Isochronous Synch Type None Usage Type Feedback wMaxPacketSize 0x0004 1x 4 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 2 bNumEndpoints 2 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 0 AudioStreaming Interface Descriptor: bLength 16 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 1 bmControls 0x05 Active Alternate Setting Control (read-only) Valid Alternate Setting Control (read-only) bFormatType 1 bmFormats 0x00000001 PCM bNrChannels 2 bmChannelConfig 0x00000003 Front Left (FL) Front Right (FR) iChannelNames 0 AudioStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bSubslotSize 3 bBitResolution 24 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x05 EP 5 OUT bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x009c 1x 156 bytes bInterval 1 AudioStreaming Endpoint Descriptor: bLength 8 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x00 bmControls 0x00 bLockDelayUnits 0 Undefined wLockDelay 0x0000 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 17 Transfer Type Isochronous Synch Type None Usage Type Feedback wMaxPacketSize 0x0004 1x 4 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 3 bNumEndpoints 2 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 0 AudioStreaming Interface Descriptor: bLength 16 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 1 bmControls 0x05 Active Alternate Setting Control (read-only) Valid Alternate Setting Control (read-only) bFormatType 1 bmFormats 0x00000001 PCM bNrChannels 2 bmChannelConfig 0x00000003 Front Left (FL) Front Right (FR) iChannelNames 0 AudioStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bSubslotSize 4 bBitResolution 32 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x05 EP 5 OUT bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x00d0 1x 208 bytes bInterval 1 AudioStreaming Endpoint Descriptor: bLength 8 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x00 bmControls 0x00 bLockDelayUnits 0 Undefined wLockDelay 0x0000 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 17 Transfer Type Isochronous Synch Type None Usage Type Feedback wMaxPacketSize 0x0004 1x 4 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 6 Schiit Hel Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 0 AudioStreaming Interface Descriptor: bLength 16 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 11 bmControls 0x05 Active Alternate Setting Control (read-only) Valid Alternate Setting Control (read-only) bFormatType 1 bmFormats 0x00000001 PCM bNrChannels 2 bmChannelConfig 0x00000003 Front Left (FL) Front Right (FR) iChannelNames 0 AudioStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bSubslotSize 3 bBitResolution 24 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x88 EP 8 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x009c 1x 156 bytes bInterval 1 AudioStreaming Endpoint Descriptor: bLength 8 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x00 bmControls 0x00 bLockDelayUnits 0 Undefined wLockDelay 0x0000 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 3 bInterfaceCount 1 bFunctionClass 3 Human Interface Device bFunctionSubClass 0 bFunctionProtocol 0 iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 bInterfaceProtocol 0 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 0x84 EP 4 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 4 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0001 Self Powered I can easily test any proposed patches :) thanks, greg k-h