ALSA: usb-audio: Handle error for the current selector gracefully
authorTakashi Iwai <tiwai@suse.de>
Tue, 18 May 2021 15:21:12 +0000 (17:21 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 19 May 2021 14:23:05 +0000 (16:23 +0200)
commit481f17c41803985446fd12887b2c042f9c43b0d5
tree5cb45f66f30da6580062fae0d09625000472bd01
parent9ec730052fa262a9b66993d282a39511e4819e06
ALSA: usb-audio: Handle error for the current selector gracefully

Currently we bail out when the device returns an error or an invalid
value for the current clock selector value via
uac_clock_selector_get_val().  But it's possible that the device is
really uninitialized and waits for the setup of the proper route at
first.

For handling such a case, this patch lets the driver dealing with the
error or the invalid error more gracefully, choosing the clock source
automatically instead.

Link: https://lore.kernel.org/r/20210518152112.8016-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/clock.c