diff options
author | Eldad Zack <eldad@fogrefinery.com> | 2013-04-03 17:18:54 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-04-04 02:30:59 -0400 |
commit | 06ffc1ebddbed88662a47646ff6aa6a2b41f0aec (patch) | |
tree | 7090ac76f3cb113cc077090375162ab9765a35a5 /sound/usb/format.c | |
parent | f6a8bc70f85fdc49c5a3eca687c6018ffee8f050 (diff) |
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/format.c')
-rw-r--r-- | sound/usb/format.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/format.c b/sound/usb/format.c index a695cafc0599..20c775170959 100644 --- a/sound/usb/format.c +++ b/sound/usb/format.c | |||
@@ -280,7 +280,7 @@ static int parse_audio_format_rates_v2(struct snd_usb_audio *chip, | |||
280 | struct usb_device *dev = chip->dev; | 280 | struct usb_device *dev = chip->dev; |
281 | unsigned char tmp[2], *data; | 281 | unsigned char tmp[2], *data; |
282 | int nr_triplets, data_size, ret = 0; | 282 | int nr_triplets, data_size, ret = 0; |
283 | int clock = snd_usb_clock_find_source(chip, fp->clock); | 283 | int clock = snd_usb_clock_find_source(chip, fp->clock, false); |
284 | 284 | ||
285 | if (clock < 0) { | 285 | if (clock < 0) { |
286 | snd_printk(KERN_ERR "%s(): unable to find clock source (clock %d)\n", | 286 | snd_printk(KERN_ERR "%s(): unable to find clock source (clock %d)\n", |