Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4475437pxb; Thu, 14 Oct 2021 06:02:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAerOE2fycBgblZXI5ThFDE+wPxVLalZ1G55vuD1cC92mkqzjAa0wVQu4ooANtVxEL84vS X-Received: by 2002:a05:6402:7:: with SMTP id d7mr8499344edu.265.1634216555563; Thu, 14 Oct 2021 06:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634216555; cv=none; d=google.com; s=arc-20160816; b=nYFIGVCXMo6Yd6C18Xbrx/naVY9WAI1MC6E8rTW324a1ReAzm5iBiNqnhIKEkne+NT Kip3Yi39P1VazgZncZ3cLYxsdT2EgOqVdOhHpGbAZrofo2mBZIKfVbwDuJsCfhQXCQ7S 9k1gPx4WxZp6qRwp96gIPcWUIpuRhoS7AW5BclhXeeQGenj3F0WOixQVadYraHa5TMVB yeV9e8eR9p6SNoGGa+fePy6VRUkdbBwEWhYUFrH4n8wDEXSv7iIc0+WvGH3WaT58E1fl wS8Um9+8mlovwMr5yGUvFkI4m+Jdp5fZnrz3ZhE6YwN4iTTRWib4OnGteSgHhZwGk5sS kxAA== 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=XWo9lpA3MV2g0sjXad19DlwqpvI8+welsonPhhWYguw=; b=ev4xufnu93e8o9XjCBmy1O8PO8jIa25OLEpVbOC0hfjcAeArFvS1PSHrg9dUyC5+YH vbjHptSowq1dmD2BnoXOFO0qGJp8BcCVq+yCDL1YcgQWRC3l5I9jSb3BeoXDjlOwji/n 2VV5qAuvck2G9ebfE2cgcLYH0vYv808tqyUUWinY1LNckc/Ubot0Na89SrMZllf1YAWg L+rIgsEv6whVxEO9RsWNmi+19raWYjsKak0zrxrt3xaDBgA0c5w6lgfIKwj/itIc6jwI Dq7qt9M+/ERCi0dY4iaPzzzH+/wM/Nzee65WoYdSDuNwyZxchX2igZ9Qy3epzihI9dLK jTXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YZAo9MFB; 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 e9si3447239ejb.382.2021.10.14.06.02.09; Thu, 14 Oct 2021 06:02:35 -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=YZAo9MFB; 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 S230440AbhJNLXc (ORCPT + 99 others); Thu, 14 Oct 2021 07:23:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:35896 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbhJNLX1 (ORCPT ); Thu, 14 Oct 2021 07:23:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 78543610E7; Thu, 14 Oct 2021 11:21:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634210482; bh=nfBLqRD8hyaVxeiAEgh9wn6cT9oaQoNUUh+UjEFp2fg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YZAo9MFBUixf+EZlG0RFmd4hjinV0+VCckJAVWU+9dGTTkDqt/VA+t9O7nGfoUnth mbNhvT8LDJ15vA7CsQ2Brixf2TSpQNoGVuosI4jMNmoLTluraLzyp+3xQGphxnBzMl CAOYqLwE/AequdBH7vC1np+G5KsqHC4vUy71rKDo= Date: Thu, 14 Oct 2021 13:21:20 +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 Thu, Oct 14, 2021 at 12:56:26PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 12, 2021 at 03:24:04PM +0200, Takashi Iwai wrote: > > On Tue, 12 Oct 2021 14:41:44 +0200, > > Greg Kroah-Hartman wrote: > > > > > > On Tue, Oct 12, 2021 at 09:35:16AM +0200, Takashi Iwai wrote: > > > > On Mon, 11 Oct 2021 19:23:05 +0200, > > > > Greg Kroah-Hartman wrote: > > > > > > > > > > On Mon, Oct 11, 2021 at 06:07:01PM +0200, Takashi Iwai wrote: > > > > > > Could you also post the contents of /proc/asound/card*/usbmixer (only > > > > > > for the corresponding device), too? > > > > > > > > > > Sure, here it is: > > > > > > > > > > USB Mixer: usb_id=0x30be0101, ctrlif=0, ctlerr=0 > > > > > Card: Schiit Audio Schiit Hel at usb-0000:47:00.1-2.2, high speed > > > > > Unit: 5 > > > > > Control: name="Mic - Input Jack", index=0 > > > > > Info: id=5, control=2, cmask=0x0, channels=1, type="BOOLEAN" > > > > > Volume: min=0, max=1, dBmin=0, dBmax=0 > > > > > Unit: 7 > > > > > Control: name="Speaker - Output Jack", index=0 > > > > > Info: id=7, control=2, cmask=0x0, channels=1, type="BOOLEAN" > > > > > Volume: min=0, max=1, dBmin=0, dBmax=0 > > > > > Unit: 13 > > > > > Control: name="PCM Playback Switch", index=0 > > > > > Info: id=13, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN" > > > > > Volume: min=0, max=1, dBmin=0, dBmax=0 > > > > > Unit: 17 > > > > > Control: name="Mic Capture Switch", index=0 > > > > > Info: id=17, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN" > > > > > Volume: min=0, max=1, dBmin=0, dBmax=0 > > > > > Unit: 18 > > > > > Control: name="Clock Source 18 Validity", index=0 > > > > > Info: id=18, control=2, cmask=0x0, channels=1, type="BOOLEAN" > > > > > Volume: min=0, max=1, dBmin=0, dBmax=0 > > > > > Unit: 22 > > > > > Control: name="Clock Source 22 Validity", index=0 > > > > > Info: id=22, control=2, cmask=0x0, channels=1, type="BOOLEAN" > > > > > Volume: min=0, max=1, dBmin=0, dBmax=0 > > > > > > > > Hm, I expected more exotic control that failed, but it was Mic Capture > > > > Switch, which should be treated normally. > > > > > > > > Could you try the patch below? This will still show other warning > > > > messages, but it'll forcibly initialize the mixer elements at probe > > > > time, and the rest should work. > > > > > > > > Once after it's confirmed to work, we may shut up the device warnings > > > > with a quirk. > > > > > > Only one warning message shows up, here's the dmesg with this patch > > > applied: > > > > > > > > > [Oct12 14:39] usb 7-2.2: new high-speed USB device number 10 using xhci_hcd > > > [ +0.123157] 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.000003] usb 7-2.2: Product: Schiit Hel > > > [ +0.000002] usb 7-2.2: Manufacturer: Schiit Audio > > > [ +0.339785] usb 7-2.2: 17:0: failed to get current value for ch 0 (-32) > > > [ +0.020373] 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.000B/input/input24 > > > [ +0.056868] hid-generic 0003:30BE:0101.000B: input,hidraw6: USB HID v1.00 Device [Schiit Audio Schiit Hel] on usb-0000:47:00.1-2.2/input3 > > > > OK, then the problem is only about this unit and about the master > > channel. > > > > > I don't see a "mic capture switch" on this device, but maybe it triggers > > > when I plug a mic into the microphone port, which is currently empty? > > > > This should be persistent and visible; try to run "amixer -c1" (or the > > different card index for the device). > > > > So far, so good. The only remaining piece is how this -EPIPE error > > comes up. Is this a protocol stall error or such? Would it be > > avoided by adding the delay like done for some devices? > > > > With the 5.15-rc kernel, you can pass quirk_flags option to > > snd-usb-audio module for applying known quirks. > > e.g. quirk_flags=0x100 will set the 1msec delay at each control > > message. Please check whether it makes any difference. > > The option is an integer array for multiple devices, so if you have > > multiple USB-audio devices, put at the appropriate position in the > > array (e.g. quirk_flags=,,0x100 for the 3rd slot). > > This quirk did not work. Well, it caused the error to show up after a > delay, but the error is still there. > > > The quirk bit 0x4000 will shut up the control errors. If the above > > doesn't fix the warning and the device is working more or less, set > > this quirk to shut up the warning. It can be set statically in the > > table at the end in sound/usb/quirks.c. > > This quirk did work in that the error messages are still in the kernel > log, but the device seems to work properly now. > > Let me send a patch that adds this device to the quirk table. Now done: https://lore.kernel.org/r/YWgR3nOI1osvr5Yo@kroah.com