OSDN Git Service

ALSA: usb-audio: fix PCM device order
authorAlexander Tsoy <alexander@tsoy.me>
Thu, 10 Aug 2017 23:36:14 +0000 (02:36 +0300)
committerTakashi Iwai <tiwai@suse.de>
Tue, 6 Aug 2019 10:48:10 +0000 (12:48 +0200)
commitf7f530181461aaf6afa0b3f0be4d239dea410896
tree7b797fc4e4c43f715f49af94585dede1323cdaa7
parentc1ae5e7f057beb1daa72831ab22ec06e71669af7
ALSA: usb-audio: fix PCM device order

Some cards have alternate setting with non-PCM format as the first
altsetting in the interface descriptors. This confuses userspace, since
alsa-lib uses device 0 by default. So lets parse interfaces in two steps:
 1. Parse altsettings with PCM formats.
 2. Parse altsettings with non-PCM formats.

This fixes at least following cards:
 - Audinst HUD-mx2
 - Audinst HUD-mini

[ Adapted to 5.3 kernel by tiwai ]

Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/stream.c