]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Don't abort even if the clock rate differs
authorTakashi Iwai <tiwai@suse.de>
Sat, 27 Feb 2021 08:20:02 +0000 (09:20 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sat, 27 Feb 2021 08:26:05 +0000 (09:26 +0100)
commit3501bef9bf04ef56ff02b0e37e9cf7fdaa6eba61
treed1bef79c07367525fe5d4790f4299cb23563edc9
parent2321f983647f3eb97e5c6296cddda3a1f24b6627
ALSA: usb-audio: Don't abort even if the clock rate differs

The commit 1a9c55c3f00f ("ALSA: usb-audio: Check valid altsetting at
parsing rates for UAC2/3") changed the behavior of the function
set_sample_rate_v2v3() slightly to treat the inconsistent sample rate
as an error.  It was done by assumption that the sample rate
validation should have been done at the parser phase as implemented in
that patch.  But the validation is later selectively enabled only for
certain devices as it causes a regression (the commit 528a5a8c530e
"ALSA: usb-audio: workaround for iface reset issue"), and now the
inconsistency surfaced as a fatal error while it worked in the past as
is, as reported for FiiO M3K DAC.

For recovering from the regression, change set_sample_rate_v2v3()
again to ignore the sample rate difference as non-error.

BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1182633
Fixes: 1a9c55c3f00f ("ALSA: usb-audio: Check valid altsetting at parsing rates for UAC2/3")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210227082002.21185-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/clock.c