Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3049065rwb; Mon, 5 Sep 2022 05:50:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR5yXnjCBfYwBeOPneF1tYo3xouB165Wc95isYCzYAvhhInuhgrRsYqgssBCqOFz1J+ORRsK X-Received: by 2002:a63:5517:0:b0:42b:e763:3bc3 with SMTP id j23-20020a635517000000b0042be7633bc3mr34848625pgb.310.1662382229696; Mon, 05 Sep 2022 05:50:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662382229; cv=none; d=google.com; s=arc-20160816; b=ZDpX9AqJHl7mHgs7krtCggLdA05jLOdGGYhY4n/YD2ilYE3pE5Ka4SD0zUPspi18Nu Z9kmFm0EKJaiBMRSdGOUz9wfxHcB8halJlp6sSgf7/jT1P5+I1/JoW2nbPTew/Z+/JiR BZp8awyXLeh3E+elq4N3rKY/BdaatRNd4fv79UeWoxbJ3ySrXLQax5WfUlbMDcIbDpSl kekVvJKxn1r3oErsD37wBldZIiil960o+wgkCdKNDcst/a13vanjEIbr6K2kvGC+Gfho 0bFAOgph+7ujUaAgfX5XxewxF/upIxd4BC2Mn+lhcnbVMmlPVp7Fl/v0IVRqb/lfEe5h zDbw== 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=2eMqoGYrzYEdYINttm3RJ00lrnnIdSpt5LJvWHgsFVA=; b=CXsv8x0WPUl6YfCr30o4vUw0aGIRyT1IEfPwX/AIVCU7iEsWPx20xaZpKH6RwL8PpY /FuUZP4s/4DBpzd/aKG5xrOUKxUaTF9oDmWCZhOni4dlo/rYb+fhg+kuH/GXiopofX1A vtXQ0Jc4J5FrfwlwEzzKEVsR1qXg1FUThw4F75bIYMCo1qRFMvQ7is87AfK2MZxQwvQD gI9eeKgI4hzf9RRIG6LLMrKmZI8DfaE8wJfgzKRsaF3/531EYQWNGA/FLyUP/dWBAMUn YC09lfOhPSgrXPhHND0/Tcvyfrl12DTGckojfuFGnNXYxj6wrTdKq+fRVD929vBj2MpA AwNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=cU3PlLNT; 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 v1-20020a634801000000b00415fcde211asi10561931pga.556.2022.09.05.05.50.16; Mon, 05 Sep 2022 05:50:29 -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=cU3PlLNT; 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 S238196AbiIEMm4 (ORCPT + 99 others); Mon, 5 Sep 2022 08:42:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238198AbiIEMmc (ORCPT ); Mon, 5 Sep 2022 08:42:32 -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 223E04D4FE; Mon, 5 Sep 2022 05:37:48 -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 C2B7A38888; Mon, 5 Sep 2022 12:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662381466; 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=2eMqoGYrzYEdYINttm3RJ00lrnnIdSpt5LJvWHgsFVA=; b=cU3PlLNTcEA2Y7jMqYZFdRS7rpJ0FoqXU9r8khq4fduj18SsR2+zJLglYeL4XvrbJFsjLC LF90rfbhjq5bEDJPX9gVE6DF7Pi6UJIBymQJDSQp9p47Tqht+ObhXjhguGHI/UplRBJtGU V3k9q5ttRuJVCqR5sixhZRjRQUqOOwU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662381466; 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=2eMqoGYrzYEdYINttm3RJ00lrnnIdSpt5LJvWHgsFVA=; b=cfWe+5ViDL+WuUhyGi427MF67M65tBZPJ12taKUoNcAtED2h+nFABP40BIO4wecfF/fHKO 57lFpBRD2iKx9rCQ== 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 9C26F13A66; Mon, 5 Sep 2022 12:37:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id h6F0JZrtFWPvBwAAMHmgww (envelope-from ); Mon, 05 Sep 2022 12:37:46 +0000 Date: Mon, 05 Sep 2022 14:37:46 +0200 Message-ID: <87r10qj8th.wl-tiwai@suse.de> From: Takashi Iwai To: "Jason A. Donenfeld" Cc: alsa-devel@alsa-project.org, LKML , stable , =?ISO-8859-4?Q?Nikl=E0vs_Ko=B6es=F1ikovs?= <89q1r14hd@relay.firefox.com>, Wim Taymans Subject: Re: [PATCH] ALSA: usb-audio: Don't refcount multiple accesses on the single clock In-Reply-To: References: <20220905101403.1435037-1-Jason@zx2c4.com> <87sfl6jbb3.wl-tiwai@suse.de> 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 Mon, 05 Sep 2022 14:06:45 +0200, Jason A. Donenfeld wrote: > > On Mon, Sep 5, 2022 at 1:44 PM Takashi Iwai wrote: > > > > On Mon, 05 Sep 2022 12:14:03 +0200, > > Jason A. Donenfeld wrote: > > > > > > This reverts commit 03a8b0df757f1beb21ba1626e23ca7412e48b525. > > > This reverts commit c11117b634f4f832c4420d3cf41c44227f140ce1. > > > > > > Pipewire and PulseAudio start devices with 44.1khz before changing them > > > to 48khz (or something different). By locking the rate, daemons are > > > unable to enumerate possible rates, and so they never change them to a > > > more optimal rate. This revert patch should allow 48khz audio again. > > > > Well, in that case, the revert is no right solution, IMO. > > If the patch caused a problem, it means that the application tries to > > change the rate while it's being still running by another. If it > > worked, it worked just casually without noticing the bad behavior. > > Not sure this is really what's happening. I think the issue is that > alsa reports that the device only supports a limited set of rates. This patch doesn't change the "report" mechanism. Instead what this patch does is to bail out as an error if you try to change the rate of a coupled stream while another stream is already running. > Pipewire then doesn't see 48khz, so it doesn't try to > stop,reclock,start. > > Maybe Wim or Niklavs can provide more info about this. More information is appreciated :) Takashi