Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5669081rwd; Mon, 5 Jun 2023 07:03:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7uE4KZg3pRHn0egwUkSYxhSVMnQFXVbQvFIgW0EMJ0OZTHPx9LtemsCreoC4XBA8zXd4fc X-Received: by 2002:a17:90a:af89:b0:250:ab4f:59b1 with SMTP id w9-20020a17090aaf8900b00250ab4f59b1mr2821899pjq.11.1685973835785; Mon, 05 Jun 2023 07:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685973835; cv=none; d=google.com; s=arc-20160816; b=RZ6vRrfPRkAhOqLSvhthJG51gJ4o0MVwm+ambtty9TZICSjuIks41zAfyJm4a7VEpo hXiaJBsW2ymRRXoZBh9EeJLfJsZolBLh+cTyHHppZhxF504wKEmOiHKTFyNlVwfBVgXG Wh79BNPvYW311q0c2V8GrHczxpZB7ph+RuEYdEu7hGB4I7ZL9mwLClQXxOOTtrGChKBI 706Y0GsfmQsMU2a8DzDwaVS5LDaDqGFEZy28WKShc1H1xgjfvLi1Qv/WHn8M/RoRh1IC x8ysQ3kLrpn1lCwt76ZZp7wi2b7J6jVF+DI2hhmTYFb5wmo8U1mG120teiVVEMQaIK59 hGyw== 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=DRKm7O+HgSR55AAbKOdib+1LRmlh1hA+3NtduQerOLY=; b=hv5dShS8JOg1ZS1S2q2Z7TfE2+nC7US84fGZbtePDB/VA6QGXZ1sCReKN0hBmu/Ezh t3WF1m+5Jo9K5/T4foTs+GIe+bbCpsXDFGWZ0VMWhNrfTVWgeoH+jSFuWymondUvyzOL bL1Yl67wEpsrDoj6nmWmmHYMsMQ2R8A1UY/YrHbWTUrOf+WtKZ6leb16xkBql8DmSMf9 xCF43YsPR1d6dgkuCl1Yc1RwlXkAk0zjQpgRy900nImC7UHTnhNvvWcm7SSvS2Z+OJzx imD2tyz6MgOSpFtPQ/gIRLf7tUBhDxf1evXLaEA+7n12EugjV1tfE9uyBL7so+7yLrRQ bwEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=cnVfBFXi; dkim=neutral (no key) header.i=@suse.de header.b=1Zqw9BAU; 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 rm10-20020a17090b3eca00b00250d10c6fe7si7701743pjb.67.2023.06.05.07.03.21; Mon, 05 Jun 2023 07:03:55 -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=cnVfBFXi; dkim=neutral (no key) header.i=@suse.de header.b=1Zqw9BAU; 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 S232513AbjFENnI (ORCPT + 99 others); Mon, 5 Jun 2023 09:43:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbjFENnH (ORCPT ); Mon, 5 Jun 2023 09:43:07 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34B0F9C; Mon, 5 Jun 2023 06:43:06 -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-out2.suse.de (Postfix) with ESMTPS id E97081FE6E; Mon, 5 Jun 2023 13:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1685972584; 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=DRKm7O+HgSR55AAbKOdib+1LRmlh1hA+3NtduQerOLY=; b=cnVfBFXi3YM+Wa8DaRZ/TueqMy/AyaY3F/LyYpenA+7DNR+uoymrc4MMOWLxi8uMW4K6Uc mg0yFYZ9rJkxX4rcKN2VGbq1OvoGJCPJizBZn1BMNKO/8koLRrH3KRTRij7mUPEL+JgQkz v52Yi5vjUkGTiiTGAnaRXiVOLGYn5Eo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1685972584; 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=DRKm7O+HgSR55AAbKOdib+1LRmlh1hA+3NtduQerOLY=; b=1Zqw9BAUK3ZkaB5twVNZYJbYm8BBBW79E71nAr885te/h73lKAIqq39ZBrduWtNp/yLEAI vDiO03NqB/ol1hDA== 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 B4A4F139C7; Mon, 5 Jun 2023 13:43:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id D7EgK2jmfWQnOwAAMHmgww (envelope-from ); Mon, 05 Jun 2023 13:43:04 +0000 Date: Mon, 05 Jun 2023 15:43:04 +0200 Message-ID: <877csihvo7.wl-tiwai@suse.de> From: Takashi Iwai To: Joakim Tjernlund Cc: "stable@vger.kernel.org" , "gregkh@linuxfoundation.org" , "perex@perex.cz" , "michael@ralston.id.au" , "linux-kernel@vger.kernel.org" , "tiwai@suse.com" , "alsa-devel@alsa-project.org" Subject: Re: [PATCH] ALSA: usb-audio: Fix "cannot set freq 48000 to ep 0x3" msgs In-Reply-To: <892df5be364e29f776ac8db2dd9e928de5a2f2a4.camel@infinera.com> References: <20230601131116.1014250-1-joakim.tjernlund@infinera.com> <202bbbc0f51522e8545783c4c5577d12a8e2d56d.camel@infinera.com> <87pm6aicin.wl-tiwai@suse.de> <892df5be364e29f776ac8db2dd9e928de5a2f2a4.camel@infinera.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=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Mon, 05 Jun 2023 15:21:51 +0200, Joakim Tjernlund wrote: > > On Mon, 2023-06-05 at 09:39 +0200, Takashi Iwai wrote: > > On Thu, 01 Jun 2023 16:28:05 +0200, > > Joakim Tjernlund wrote: > > > > > > Adding Michael Ralston > > > > > > He did have problems with his behringer UMC404HD device when this whole seq. was removed. > > > Ralston, can you try if the below change affects your device? > > > > Sorry for the late reaction, as I've been off in the last weeks. > > NP. > > > > > The code sequence there seems pretty sensitive, and swapping or > > dropping the call might break things easily on certain devices, > > unfortunately. So, I guess we can't take the patch as is. If any, we > > need to fiddle the call order depending on the device quirk or such. > > I guess we may try to fit with the existing quirk flag. Let me check > > it later. > > yes, this is tricky. To me it look like this code will always set 48000 sample rate and > not all devices support that on all EPs. > Maybe one can get away with not setting sample rate at all? Just guessing though. I guess it should work without setting the rate explicitly, but as already mentioned, some devices (firmware) might need it. Who knows. The vendors apparently test only with Windows and/or MacOS, and issuing unexpected commands (or missing the expected command) can screw up firmware... Takashi > > Jocke > > > > > > > thanks, > > > > Takashi > > > > > > > Jocke > > > > > > On Thu, 2023-06-01 at 15:11 +0200, Joakim Tjernlund wrote: > > > > On some USB speaker devices(Jabra/Logitech) we see above error > > > > msg when connecting device to computer and kernel is probing the device. > > > > > > > > Moving the snd_usb_init_sample_rate() to after usb_set_interface() makes > > > > the error go away. > > > > > > > > Signed-off-by: Joakim Tjernlund > > > > Cc: stable@vger.kernel.org > > > > --- > > > > sound/usb/stream.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/sound/usb/stream.c b/sound/usb/stream.c > > > > index f10f4e6d3fb8..d9ac8663a48b 100644 > > > > --- a/sound/usb/stream.c > > > > +++ b/sound/usb/stream.c > > > > @@ -1226,8 +1226,8 @@ static int __snd_usb_parse_audio_interface(struct snd_usb_audio *chip, > > > > /* try to set the interface... */ > > > > usb_set_interface(chip->dev, iface_no, 0); > > > > snd_usb_init_pitch(chip, fp); > > > > - snd_usb_init_sample_rate(chip, fp, fp->rate_max); > > > > usb_set_interface(chip->dev, iface_no, altno); > > > > + snd_usb_init_sample_rate(chip, fp, fp->rate_max); > > > > } > > > > return 0; > > > > } > > > >