Skip to content
Commit 9830e738 authored by Takashi Iwai's avatar Takashi Iwai Committed by Sasha Levin
Browse files

ALSA: usb-audio: Refcount multiple accesses on the single clock

[ Upstream commit c11117b6 ]

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: default avatarTakashi Iwai <tiwai@suse.de>
Stable-dep-of: 7822baa8 ("ALSA: usb-audio: add quirk for RODE NT-USB+")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0866afaf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment