mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Takashi Iwai <tiwai@suse.de>
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, 7 Sep 2022 11:28:54 +0200	[thread overview]
Message-ID: <YxhkVmiMlKghq+nY@zx2c4.com> (raw)
In-Reply-To: <87czc7ehqp.wl-tiwai@suse.de>

On Wed, Sep 07, 2022 at 10:00:46AM +0200, Takashi Iwai wrote:
> 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;

I think this works.

Niklāvs - can you give it a try to and confirm?

Jason

  reply	other threads:[~2022-09-07  9:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05 10:14 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
2022-09-07  9:28       ` Jason A. Donenfeld [this message]
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=YxhkVmiMlKghq+nY@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=89q1r14hd@relay.firefox.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.de \
    --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

all inboxes | Powered by JetHome®