Skip to content

Commit 5ee20bc

Browse files
JohanARtiwai
authored andcommitted
ALSA: usb-audio: Change internal PCM order
New PCMs will now be added to the end of the chip's PCM list instead of to the front. This changes the way streams are combined so that the first capture stream will now be merged with the first playback stream instead of the last. This fixes a problem with ASUS U7. Cards with one playback stream and cards without capture streams should be unaffected by this change. Exception added for M-Audio Audiophile USB (tm) since it seems to have a fix to swap capture stream numbering in alsa-lib conf/cards/USB-audio.conf Signed-off-by: Johan Rastén <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 467e143 commit 5ee20bc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

sound/usb/stream.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,15 @@ int snd_usb_add_audio_stream(struct snd_usb_audio *chip,
377377

378378
snd_usb_init_substream(as, stream, fp);
379379

380-
list_add(&as->list, &chip->pcm_list);
380+
/*
381+
* Keep using head insertion for M-Audio Audiophile USB (tm) which has a
382+
* fix to swap capture stream order in conf/cards/USB-audio.conf
383+
*/
384+
if (chip->usb_id == USB_ID(0x0763, 0x2003))
385+
list_add(&as->list, &chip->pcm_list);
386+
else
387+
list_add_tail(&as->list, &chip->pcm_list);
388+
381389
chip->pcm_devs++;
382390

383391
snd_usb_proc_pcm_format_add(as);

0 commit comments

Comments
 (0)