ALSA: usb-audio: Restrict rates for the shared clocks
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 Sep 2021 08:08:36 +0000 (10:08 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 30 Sep 2021 11:55:18 +0000 (13:55 +0200)
commit4e7cf1fbb34ecb472c073980458cbe413afd4d64
tree058c5de079f8c9a3e2e1619c6550740d4b59508c
parentc4ca3871e21fa085096316f5f8d9975cf3dfde1d
ALSA: usb-audio: Restrict rates for the shared clocks

When a single clock source is shared among several endpoints, we have
to keep the same rate on all active endpoints as long as the clock is
being used.  For dealing with such a case, this patch adds one more
check in the hw params constraint for the rate to take the shared
clocks into account.  The current rate is evaluated from the endpoint
list that applies the same clock source.

BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1190418
Link: https://lore.kernel.org/r/20210929080844.11583-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/card.h
sound/usb/endpoint.c
sound/usb/endpoint.h
sound/usb/pcm.c