public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: alsa-devel@alsa-project.org, LKML <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>,
	"Niklāvs Koļesņikovs" <89q1r14hd@relay.firefox.com>,
	"Wim Taymans" <wtaymans@redhat.com>
Subject: Re: [PATCH] ALSA: usb-audio: Don't refcount multiple accesses on the single clock
Date: Wed, 07 Sep 2022 10:00:46 +0200	[thread overview]
Message-ID: <87czc7ehqp.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAHmME9oUtVgwtUY5afG5Yed1j6OVKwvLH=keCp63gDSOQRgDSA@mail.gmail.com>

On Mon, 05 Sep 2022 14:16:39 +0200,
Jason A. Donenfeld wrote:
> 
> On Mon, Sep 5, 2022 at 1:44 PM Takashi Iwai <tiwai@suse.de> 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;

  reply	other threads:[~2022-09-07  8:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05 10:14 [PATCH] ALSA: usb-audio: Don't refcount multiple accesses on the single clock Jason A. Donenfeld
2022-09-05 11:44 ` Takashi Iwai
2022-09-05 12:06   ` Jason A. Donenfeld
2022-09-05 12:37     ` Takashi Iwai
2022-09-05 12:16   ` Jason A. Donenfeld
2022-09-07  8:00     ` Takashi Iwai [this message]
2022-09-07  9:28       ` Jason A. Donenfeld
2022-09-07  9:41         ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czc7ehqp.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=89q1r14hd@relay.firefox.com \
    --cc=Jason@zx2c4.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wtaymans@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox