]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Check implicit feedback EP generically for UAC2
authorTakashi Iwai <tiwai@suse.de>
Mon, 23 Nov 2020 08:53:10 +0000 (09:53 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Nov 2020 14:11:46 +0000 (15:11 +0100)
commitc11ef43101b2f2d2622a69d2f1511ecae3823afc
tree6ac300ec3274a1580ceb833cc0ca299c267afe7b
parentf74a1bb084dcc358c7d92af592279263807dc8ed
ALSA: usb-audio: Check implicit feedback EP generically for UAC2

It seems that many UAC2 devices are with the implicit feedback, but
they couldn't be probed properly because the assumption the driver
takes currently isn't applied: they have the single endpoint for both
data and implicit-fb streams, while we checked only the classical sync
endpoints assigned to the next altsetting in the same interface.

This patch extends the search to match with those typical cases where
the implicit fb stream is found in the next interface number.

While we're at it, slightly refactor the code, not returning 0/-ERROR
but use the standard bool to success/failur, which is more intuitive
in this particular case.

Reported-by: Dylan Robinson <dylan_robinson@motu.com>
Tested-by: Keith Milner <kamilner@superlative.org>
Tested-by: Dylan Robinson <dylan_robinson@motu.com>
Link: https://lore.kernel.org/r/20201123085347.19667-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/pcm.c