Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1564227rwe; Thu, 1 Sep 2022 23:02:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR6uW3FwNrjVjHB3r+XKL4qXwHXvdg6a8N38M8Na1o/D5teqLeRuqwdh+mjDmBEU6fMam+8b X-Received: by 2002:aa7:dc13:0:b0:443:3f15:8440 with SMTP id b19-20020aa7dc13000000b004433f158440mr30484860edu.274.1662098562326; Thu, 01 Sep 2022 23:02:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662098562; cv=none; d=google.com; s=arc-20160816; b=OaCWeVNQn/6Yfu/sHhiBCmqoPiRoyA4y2LocmsI2Cqn4mlbkFdMGF7TwLGst7Lml5J 2dTNOBnnXWp7Mo2dnh3mSmFoxBLHrAHoXNxe1sGcyfFRhRF3J6P5TMdxMMoWvqY21z2K GDz57JSRx9misOGGxqVzFG/jqS6Wq44GypTBsJJ/8S6fwOnE5ahGwOG3xJU/z8BqxXy0 /9YnKgklbDkzkjbSfiXoFrna17gnNWi54uc4Nt5yzRMZ9SQb139YfGe/+uwddFlexw4Q C4i/i6FvPX6O5x/JbDJBfovyT2cOefI/7CZjDCajX9AMlp1hRw7f1RghM2ORPVeRm3Zk 50cQ== 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=id4IefFvAsTItWxsqxPpjVsL1MtN2MWcGtsWZFQVAXc=; b=NLnLboYO7RkhOaRb6QWsvHk1wf3GhTnDF5GJuZ07K4To+VqpZNPaL96KpIxRAj+LIM /kwAmqV0Ngn1mCHooe2j6Z+kPCTwzdkO5fsS8ytchVuxpjO3FcDjuC3TAHjuR1GFCDD8 Ig4/F5PIhQrblxSKAJF2L+EdfKrlp1vALni/O2NZ9dzLHClCl4iOiyQJeGg5Dx8FlkFT a8/txydXGOZKakpq61thItRI6YTQAm9SuhWEeH/Yx3ptVpCUPUzMQ2SC8YMEIkC+WsRK /Zs5uiOBomABt6NKxcBFiH2FsYyQr0rI48X6JghCltKUuiVdZWNsoGXs5eIbBIPDUygK 2rxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=eccN88KT; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z25-20020a50cd19000000b0044777dfdf09si895807edi.296.2022.09.01.23.02.16; Thu, 01 Sep 2022 23:02:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=eccN88KT; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S235270AbiIBFwi (ORCPT + 99 others); Fri, 2 Sep 2022 01:52:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235233AbiIBFwf (ORCPT ); Fri, 2 Sep 2022 01:52:35 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04619B2D90 for ; Thu, 1 Sep 2022 22:52:32 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A4BCE33F05; Fri, 2 Sep 2022 05:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662097950; 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=id4IefFvAsTItWxsqxPpjVsL1MtN2MWcGtsWZFQVAXc=; b=eccN88KT0DHq08PJWF2xzlXfRiB5Ph/urDVwc2G1srhtTZLCP3prtdfdRCCmpKlW3BRcKF pie93wESkAk3tn+G13i9acyTcWPVXbxzan0waleZDlxqPBPvDB+QQNEnp9aqLwgPmg+vgq 5QodFTIoY7ug0L8QG/Y47QuYnzCjbsM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662097950; 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=id4IefFvAsTItWxsqxPpjVsL1MtN2MWcGtsWZFQVAXc=; b=VINsGU5wURQHasySkJLSkX9NiUQ2BMzWud1DCFhFfyBrXhf8CtPxiSHXxXGuSbgSkWOq+D YIC2FwRCn45+B+Bg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 74B84133DD; Fri, 2 Sep 2022 05:52:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +VDAGx6aEWOBOAAAMHmgww (envelope-from ); Fri, 02 Sep 2022 05:52:30 +0000 Date: Fri, 02 Sep 2022 07:52:29 +0200 Message-ID: <87v8q6wcf6.wl-tiwai@suse.de> From: Takashi Iwai To: Sean Anderson Cc: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, Linux Kernel Mailing List Subject: Re: retire_capture_urb: Corrected urb data len In-Reply-To: <53306c0f-e5ef-44ee-b90c-a3ea61ca454c@seco.com> References: <68a97d61-21bf-b45e-f6ed-c0906dd4b197@seco.com> <87ilmfj72j.wl-tiwai@suse.de> <9d41eda1-1172-ea60-dd87-b3e38a529170@seco.com> <87r110iz8w.wl-tiwai@suse.de> <53306c0f-e5ef-44ee-b90c-a3ea61ca454c@seco.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 01 Sep 2022 17:25:41 +0200, Sean Anderson wrote: > > > > On 8/28/22 3:49 AM, Takashi Iwai wrote: > > On Fri, 26 Aug 2022 20:57:53 +0200, > > Sean Anderson wrote: > >> > >> On 8/26/22 12:36 PM, Takashi Iwai wrote: > >> > On Fri, 26 Aug 2022 18:22:24 +0200, > >> > Sean Anderson wrote: > >> >> > >> >> Hi all, > >> >> > >> >> I have a "FiiO DigiHug USB Audio" sound card (1852:7022) [3]. I have had > >> >> no problems with the audio, but I did notice a large number of message > >> >> like > >> >> > >> >> retire_capture_urb: 4992 callbacks suppressed > >> >> > >> >> in my dmesg [1]. This is caused by the "Corrected urb data len." > >> >> warning. > >> > > >> > What exact values are shown there? > >> > >> Unfortunately, as detailed below, I was unable to turn off ratelimiting. > >> > >> > The problem is that your hardware > >> > (likely a buggy firmware) returns the unaligned size of bytes as the > >> > data. Maybe it's worth to replace dev_warn_ratelimited() there with > >> > dev_warn() and take all warnings once. Then we can see what kind of > >> > values are delivered from the hardware. > >> > >> I'll have an attempt at that next week > >> > >> >> The patch adding this warning [2] makes it seem like > >> >> this warning should be an uncommon occurance. However, based on the > >> >> number of suppressed callbacks, this seems to be happening at a rate of > >> >> around 500 Hz. > >> >> > >> >> Is this buggy hardware? Or is this a bug in the driver? Does there need > >> >> to be a quirk? Or perhaps the warning above should be a debug instead? > >> > > >> > There is no quirk for that. As long as the device works with that > >> > workaround (except for messages), we can simply add a quirk to not > >> > warn but always apply the workaround silently for such devices. > >> > >> OK. I wasn't sure what the correct resolution would be. > > > > Actually I was wrong: the existing quirk QUIRK_FLAG_ALIGN_TRANSFER > > should cover that. > > > > Could you try to pass quirk_flags=0x04 for the corresponding card slot > > (the option takes an array) to snd-usb-audio module? Alternatively, > > try to pass quirk_alias=18557022:0e510408 to snd-usb-audio? > > I tried both options, but neither worked. I have no further idea. You should try the latest kernel without modification before checking further. And, looking at the code again, it's really strange that you get those messages. Actually the transfer size *is* aligned to the audio frames as default *unless* QUIRK_FLAG_ALIGN_TRANSFER is passed. And the check is done rather the audio sample size alignment -- which must fit within the audio frame alignment. So, QUIRK_FLAG_ALIGN_TRANSFER is already set for your device by some reason incorrectly, or the code is doing wrong on your kernel. We need to check what values are shown there actually, then check whether the problem happens with the latest vanilla kernel. Takashi