diff options
author | Takashi Iwai <tiwai@suse.de> | 2022-05-16 12:48:07 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2022-05-16 12:49:03 +0200 |
commit | c11117b634f4f832c4420d3cf41c44227f140ce1 (patch) | |
tree | e5f1db89edb15c8c82bb7efad9fd8c4090ef3498 /sound/usb/usbaudio.h | |
parent | 00f87ec74c3c09628889173b0f594cfc01e74157 (diff) | |
download | linux-stable-c11117b634f4f832c4420d3cf41c44227f140ce1.tar.gz linux-stable-c11117b634f4f832c4420d3cf41c44227f140ce1.tar.bz2 linux-stable-c11117b634f4f832c4420d3cf41c44227f140ce1.zip |
ALSA: usb-audio: Refcount multiple accesses on the single clock
When a clock source is connected to multiple nodes / endpoints, the
current USB-audio driver tries to set up at each time one of them is
configured. Although it reads the current rate and updates only if it
differs, some devices seem unhappy with this behavior and spew the
errors when reading/updating the rate unnecessarily.
This patch tries to reduce the redundant clock setup by introducing a
refcount for each clock source. When the stream is actually running,
a clock rate is "locked", and it bypasses the clock and/or refuse to
change any longer.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215934
Link: https://lore.kernel.org/r/20220516104807.16482-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usbaudio.h')
-rw-r--r-- | sound/usb/usbaudio.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index 044cd7ab27cb..ffbb4b0d09a0 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h @@ -45,6 +45,7 @@ struct snd_usb_audio { struct list_head pcm_list; /* list of pcm streams */ struct list_head ep_list; /* list of audio-related endpoints */ struct list_head iface_ref_list; /* list of interface refcounts */ + struct list_head clock_ref_list; /* list of clock refcounts */ int pcm_devs; struct list_head midi_list; /* list of midi interfaces */ |