Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2426251pxb; Tue, 12 Oct 2021 06:26:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykpBjjKcAfKakXqcO7yqqg1SiC2IMc3ErH4QG1LvEZ2qrPbHjPMMdY0xEtmbj5/yuLZ6Kl X-Received: by 2002:a17:902:bb8d:b0:13e:6e78:87a1 with SMTP id m13-20020a170902bb8d00b0013e6e7887a1mr30159126pls.24.1634045210583; Tue, 12 Oct 2021 06:26:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634045210; cv=none; d=google.com; s=arc-20160816; b=OwzvoHB7fk9/nc40wPFHxcm8JheolyORC4kKQnyuN6re88GH0CM7a8/ovbyhnCNLMt EEwn8wKT62mOGA1uo4AhpBPj2NITlG2No51leUQeP4jimJjOb/tJoQZqTpfvQQ4tmcoP XYSWE4NDGXzrbMGJHnmm0bB7Qk9y6FcLyIVyLUOYU6Xw/2ZE7ZYMmrG7rfabToCZi6fN g+XrSg8P3q1zKZCuIXdLqn/st1f02iCGMbA1O7qkqlBNtk0buJS7RKJLVcE0LBB7ZO3t 7K71vcd8byAkMOhOPTJIooSR1Mq4lDVI1bbJUsoDq+q4Eysv7lekB4Tpn1HynrHetNea pN4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=n3GgDvylGNJ7V1J2rldQvLGL+9Bh4F5sQ7kCcd8S7RM=; b=00ECE02GiS5zpela1aYOsZNql/qVkuHIk1JHsTHenl5LTERWETRMf3vtffft2qeQCK YWenVH2KQxmIDOBh6Now5JzC+3jfyRe3JU5J7NTBPrXrHzHtP+dCgap/DdUKZ0GmJfwu FOJAGVzkTUzzmZ6Vy/gL63XmrliMMAB/mo4G9N6x4pQkjffQ/n7Nuz+azgzhKTxil2zU hUhbdHGqlwm/MgZiYRmrt3Y0olChdsxTitGbMmcrjB2RbZDNKtUBOPRZgEhhNVhEBXM1 jrqEKaREzREGxWFHi9WpaY70no3dPYMhNiE74bYK/vhGd2ucLox5P7LOMYZmccazVElm qW0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=kL8nwYRK; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="/rL67Ip2"; 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=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si19032344pfh.218.2021.10.12.06.26.37; Tue, 12 Oct 2021 06:26:50 -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=@suse.de header.s=susede2_rsa header.b=kL8nwYRK; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="/rL67Ip2"; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236917AbhJLN0Q (ORCPT + 99 others); Tue, 12 Oct 2021 09:26:16 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:48372 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236948AbhJLN0J (ORCPT ); Tue, 12 Oct 2021 09:26:09 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 5748F2009E; Tue, 12 Oct 2021 13:24:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1634045044; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=n3GgDvylGNJ7V1J2rldQvLGL+9Bh4F5sQ7kCcd8S7RM=; b=kL8nwYRKsxneTCZl2UsPJBlQ7KenSrLldX8DTudpBryFw/t+YyzrmjTB2HFxtSIyMC9Gir XgQdp8vE1jQz7zSu7J8QS7AqVvrwTS54WvGIhvh+GpUWBzeZF7LcrzQshIVl+Gn6JyyEkz vD6/+VFD6vfyD5+xcCWBMxjGmzlOYPg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1634045044; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=n3GgDvylGNJ7V1J2rldQvLGL+9Bh4F5sQ7kCcd8S7RM=; b=/rL67Ip2ThtFFd6yxcEM8gYPr1qTBrwW7CVIXmDTVZQeI3BOeTOOX657ZVbfndOjqRRLgJ oBD5Z1JCbbC89vAA== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 3BD34A3B96; Tue, 12 Oct 2021 13:24:04 +0000 (UTC) Date: Tue, 12 Oct 2021 15:24:04 +0200 Message-ID: From: Takashi Iwai To: Greg Kroah-Hartman 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 In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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). 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. Takashi