Re: [PATCH] ALSA: usb-audio: Don't refcount multiple accesses on the single clock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx> 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;



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux