aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorAnssi Hannula <anssi.hannula@iki.fi>2013-11-10 14:24:05 -0500
committerTakashi Iwai <tiwai@suse.de>2013-11-11 11:06:57 -0500
commit71373fddf6dff7cf5e67923e6837fc4de28478ff (patch)
tree3ef678c2d8da68a9cc2fd34906a8cc177f6722ec /sound/usb
parent94908a39ce971f25c3695c334d88eec4d2837428 (diff)
ALSA: usb: Fix wrong mapping of RLC and RRC channels
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>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/stream.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index d737d0e6e558..2fb71be5e100 100644
--- a/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -273,8 +273,8 @@ static struct snd_pcm_chmap_elem *convert_chmap(int channels, unsigned int bits,
273 SNDRV_CHMAP_TSL, /* top side left */ 273 SNDRV_CHMAP_TSL, /* top side left */
274 SNDRV_CHMAP_TSR, /* top side right */ 274 SNDRV_CHMAP_TSR, /* top side right */
275 SNDRV_CHMAP_BC, /* bottom center */ 275 SNDRV_CHMAP_BC, /* bottom center */
276 SNDRV_CHMAP_BLC, /* bottom left center */ 276 SNDRV_CHMAP_RLC, /* back left of center */
277 SNDRV_CHMAP_BRC, /* bottom right center */ 277 SNDRV_CHMAP_RRC, /* back right of center */
278 0 /* terminator */ 278 0 /* terminator */
279 }; 279 };
280 struct snd_pcm_chmap_elem *chmap; 280 struct snd_pcm_chmap_elem *chmap;