diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-09-29 11:08:36 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-09-30 14:55:18 +0300 |
commit | 4e7cf1fbb34ecb472c073980458cbe413afd4d64 (patch) | |
tree | 058c5de079f8c9a3e2e1619c6550740d4b59508c /sound/usb/card.h | |
parent | c4ca3871e21fa085096316f5f8d9975cf3dfde1d (diff) | |
download | linux-4e7cf1fbb34ecb472c073980458cbe413afd4d64.tar.xz |
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>
Diffstat (limited to 'sound/usb/card.h')
-rw-r--r-- | sound/usb/card.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h index 5b19901f305a..3329ce710cb9 100644 --- a/sound/usb/card.h +++ b/sound/usb/card.h @@ -136,6 +136,7 @@ struct snd_usb_endpoint { unsigned int cur_period_frames; unsigned int cur_period_bytes; unsigned int cur_buffer_periods; + unsigned char cur_clock; spinlock_t lock; struct list_head list; |