]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ALSA: usb: Fix wrong mapping of RLC and RRC channels
authorAnssi Hannula <anssi.hannula@iki.fi>
Sun, 10 Nov 2013 19:24:05 +0000 (21:24 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 11 Nov 2013 16:06:57 +0000 (17:06 +0100)
According to USB Audio spec v2 bits 25 and 26 of bmChannelConfig are
"Back Left of Center - BLC" and "Back Right of Center - BRC",
respectively.

They are currently assigned to ALSA channels BLC/BRC. However, the ALSA
BLC/BRC are actually the rather nonsensical "bottom left center" and
"bottom right center", so the channels will be assigned wrongly. The
comments in the USB code are also similarly wrong, so this is not
readily apparent without looking at the actual specification.

Fix the channel mapping by mapping bits 25 and 26 to RLC (Rear Left
Center) and RRC (Rear Right Center), respectively, instead.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/stream.c

index d737d0e6e5580efdec49852b93ed610429c88e31..2fb71be5e100b0973c0993dbb8ed4da3f35c5cf2 100644 (file)
@@ -273,8 +273,8 @@ static struct snd_pcm_chmap_elem *convert_chmap(int channels, unsigned int bits,
                SNDRV_CHMAP_TSL,        /* top side left */
                SNDRV_CHMAP_TSR,        /* top side right */
                SNDRV_CHMAP_BC,         /* bottom center */
-               SNDRV_CHMAP_BLC,        /* bottom left center */
-               SNDRV_CHMAP_BRC,        /* bottom right center */
+               SNDRV_CHMAP_RLC,        /* back left of center */
+               SNDRV_CHMAP_RRC,        /* back right of center */
                0 /* terminator */
        };
        struct snd_pcm_chmap_elem *chmap;