Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5374004rwb; Wed, 7 Sep 2022 01:37:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR4AedMjMnHwLuHkWxvReu650rtWDPiTDF+A21zhSu4KUU89gXNOumRMJL8oDTWfF3BjRIXD X-Received: by 2002:a50:9344:0:b0:448:ce76:7c81 with SMTP id n4-20020a509344000000b00448ce767c81mr2214377eda.187.1662539831723; Wed, 07 Sep 2022 01:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662539831; cv=none; d=google.com; s=arc-20160816; b=S4guKAFL54QPlE/DDBGpBjiopjne/5g+39w3nsJXLctg8ccegX3cfpn/QHPAZnQBUT d2FAi6aT8KxkqWlVjzqPSJgJvg7BOGUH8Wg4j8+4zoAY71x2ryeNK1pAksTTDQ6ptWP2 DDsOwUkOQQgBsBr9raglDLucHVxGKz4+FJ8f8N6PwBxKgX3kUVcL+l5dCxMjiJw5UDgk FoYH1BZfl86Q1kqk7wdNNl1qcb/F7QwAH8dHpcR/dhYuE4U4wmCV5OHnybsFXsTjeWT6 B2KD6btVnn1ja/Rzbg8RHQS9Zw+mpExahrp6MOjsSKSgdBNLdecwirD7DnXtVrukJg1e 6ZNw== 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=MTS0xkpOCWUUwhJ2Fb/pObZ9XY5ZZUSzn2pLirlZ190=; b=Y4rjRgU5OfzNB0uKK+P/6XKYBgxF50i6vBDJT4l25w1/TQV/ueHw1vEkf9c/eBiuKU BgztAs1c+aTzRswHBhfxqFoi0FrzNG0KSKD5NGnNzqZiWJTKwM0vT6Qczh82KF6RDvxA tzjEfULEGIsWCxRuRVdRK9mY1lQYjHGtCZQI6wo67Ls1JAv0TyZ2XxZDPvbu3o46+xCp KIOL+wyYpnLXIWUUtFvlqIm4nH9f9N8kmukyrP/2tvxlBjSh64DfRK6fZLMTAlVoGYM1 uMDF4+M3bHuOCU/ahQhE3XJoqgTSHGfi7WkJDvoMrcb9ZXeP2tfFp+s+SsR39RNX8uDu l7PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=L2usALx8; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=mHn7DM52; 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 v15-20020a50c40f000000b00446627c9a58si10569971edf.63.2022.09.07.01.36.46; Wed, 07 Sep 2022 01:37:11 -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=L2usALx8; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=mHn7DM52; 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 S229958AbiIGIBV (ORCPT + 99 others); Wed, 7 Sep 2022 04:01:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbiIGIAt (ORCPT ); Wed, 7 Sep 2022 04:00:49 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22AE832ED4; Wed, 7 Sep 2022 01:00: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-out2.suse.de (Postfix) with ESMTPS id B8BB61F897; Wed, 7 Sep 2022 08:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662537646; 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=MTS0xkpOCWUUwhJ2Fb/pObZ9XY5ZZUSzn2pLirlZ190=; b=L2usALx8nlG2n7FXPK6l8HHte8IfBqWbOU+7ruF+DFWa5w5WR7Gw7Zh9YCf4jxfUVLEdRx ss4YIQlCt78Fl4VQC/WBU1IQrzm2xArVLncGeYuZUTiv7CnFhJZ0rOGmy565N5PnYV3SGP Yd6z2pNzvoE4EvqsP4vHLDr8WcDWQZw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662537646; 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=MTS0xkpOCWUUwhJ2Fb/pObZ9XY5ZZUSzn2pLirlZ190=; b=mHn7DM52lTy5mR8njdQ2Muu5243mMdz5cfQimepAQG7RawghOa5f3FT1wPn4vu8hmR4YP+ 1P2830mzNLk0UyCA== 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 9290813A66; Wed, 7 Sep 2022 08:00:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id tTLqIq5PGGO6CQAAMHmgww (envelope-from ); Wed, 07 Sep 2022 08:00:46 +0000 Date: Wed, 07 Sep 2022 10:00:46 +0200 Message-ID: <87czc7ehqp.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:16:39 +0200, Jason A. Donenfeld wrote: > > On Mon, Sep 5, 2022 at 1:44 PM Takashi Iwai wrote: > > When you load snd-usb-audio with dyndbg=+p option, does it show the > > new error message "Mismatched sample rate xxx"? > > No. What about the patch below? Takashi -- 8< -- --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -925,6 +925,8 @@ void snd_usb_endpoint_close(struct snd_usb_audio *chip, endpoint_set_interface(chip, ep, false); if (!--ep->opened) { + if (ep->clock_ref && !atomic_read(&ep->clock_ref->locked)) + ep->clock_ref->rate = 0; ep->iface = 0; ep->altsetting = 0; ep->cur_audiofmt = NULL;