summaryrefslogtreecommitdiffstats
path: root/sound/usb/clock.h
diff options
context:
space:
mode:
authorEldad Zack <eldad@fogrefinery.com>2013-04-03 23:18:54 +0200
committerTakashi Iwai <tiwai@suse.de>2013-04-04 08:30:59 +0200
commit06ffc1ebddbed88662a47646ff6aa6a2b41f0aec (patch)
tree7090ac76f3cb113cc077090375162ab9765a35a5 /sound/usb/clock.h
parentf6a8bc70f85fdc49c5a3eca687c6018ffee8f050 (diff)
downloadop-kernel-dev-06ffc1ebddbed88662a47646ff6aa6a2b41f0aec.zip
op-kernel-dev-06ffc1ebddbed88662a47646ff6aa6a2b41f0aec.tar.gz
ALSA: usb-audio: UAC2: do clock validity check earlier
Move the check that parse_audio_format_rates_v2() do after receiving the clock source entity ID directly into the find function and add a validation flag to the function. This patch does not introduce any logic flow change. It is provided to allow introducing automatic clock switching easier later. By moving this uac_clock_source_is_valid callsite, 2 additional callsites can be avoided. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/clock.h')
-rw-r--r--sound/usb/clock.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/usb/clock.h b/sound/usb/clock.h
index 4663093..d592e4a 100644
--- a/sound/usb/clock.h
+++ b/sound/usb/clock.h
@@ -5,6 +5,7 @@ int snd_usb_init_sample_rate(struct snd_usb_audio *chip, int iface,
struct usb_host_interface *alts,
struct audioformat *fmt, int rate);
-int snd_usb_clock_find_source(struct snd_usb_audio *chip, int entity_id);
+int snd_usb_clock_find_source(struct snd_usb_audio *chip, int entity_id,
+ bool validate);
#endif /* __USBAUDIO_CLOCK_H */
OpenPOWER on IntegriCloud