From patchwork Sun Oct 10 12:22:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 12548485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD498C433FE for ; Sun, 10 Oct 2021 12:23:51 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 554E3610CF for ; Sun, 10 Oct 2021 12:23:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 554E3610CF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EE2C7166E; Sun, 10 Oct 2021 14:22:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EE2C7166E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1633868628; bh=MFImbL7l7iaihtx0OWpPhL0Cx6Oqn4VM20u+CfvjnGU=; h=Date:From:To:Subject:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=hlk9MFnpUiZuE2On0AbMttutCH2qxt016qRwusTjGDuaf2dzZjAM5TTezSatnKcHp v2uTzvX79L7/EcIj8q4ko3UWQLXeK5f4hJzNBxZx779BGjNBkuxCRxA5lUz97tS7X0 VxTTl6aUODXqBqrccALxyxX8ormBk+ImfcZYIu98= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6FA14F8016D; Sun, 10 Oct 2021 14:22:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4D8B2F801F7; Sun, 10 Oct 2021 14:22:55 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 69553F8016D for ; Sun, 10 Oct 2021 14:22:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 69553F8016D Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="d0VzwahR" Received: by mail.kernel.org (Postfix) with ESMTPSA id E18DE60EDF; Sun, 10 Oct 2021 12:22:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633868564; bh=MFImbL7l7iaihtx0OWpPhL0Cx6Oqn4VM20u+CfvjnGU=; h=Date:From:To:Cc:Subject:From; b=d0VzwahRyfgcYxaVj3SNb8rpNrrtMItE8E3pKQ8e6B95dPQC3StN7N2lFrV6q0YNA o+s0J+KlErfnkJdn726PuyhnECiSmeCBOohx07DBGtEb9TE7r6MzGtIWi5D8CHOqPq nEzQXlzxwg3C8IjrWMnm+ZdN8lbUGH06GBiyQD6E= Date: Sun, 10 Oct 2021 14:22:41 +0200 From: Greg Kroah-Hartman To: Jaroslav Kysela , Takashi Iwai Subject: [PATCH] ALSA: usb-audio: allow -EPIPE errors for some v2 messages Message-ID: MIME-Version: 1.0 Content-Disposition: inline Cc: alsa-devel@alsa-project.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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. sound/usb/mixer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index a2ce535df14b..37d3d697776b 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -371,11 +371,11 @@ static int get_ctl_value_v2(struct usb_mixer_elem_info *cval, int request, validx, idx, buf, size); snd_usb_unlock_shutdown(chip); - if (ret < 0) { + if ((ret < 0) && (ret != -EPIPE)) { error: usb_audio_err(chip, - "cannot get ctl value: req = %#x, wValue = %#x, wIndex = %#x, type = %d\n", - request, validx, idx, cval->val_type); + "cannot get ctl value: req = %#x, wValue = %#x, wIndex = %#x, type = %d, ret = %d\n", + request, validx, idx, cval->val_type, ret); return ret; }