ALSA: usb-audio: Refactor clock finder helpers
authorTakashi Iwai <tiwai@suse.de>
Tue, 3 Apr 2018 15:34:57 +0000 (17:34 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sat, 7 Apr 2018 11:07:05 +0000 (13:07 +0200)
commitf7645bd636d06f64f3eadb63cf1c8145219fdc58
treee9ed254ec66ef280f0127561d5aede51c2b1f391
parenta820ccbe21e8ce8e86c39cd1d3bc8c7d1cbb949b
ALSA: usb-audio: Refactor clock finder helpers

There are lots of open-coded functions to find a clock source,
selector and multiplier.  Now there are both v2 and v3, so six
variants.

This patch refactors the code to use a common helper for the main
loop, and define each validator function for each target.
There is no functional change.

Fixes: 9a2fe9b801f5 ("ALSA: usb: initial USB Audio Device Class 3.0 support")
Reviewed-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/clock.c