Skip to content

Commit 103a7b9

Browse files
CassivsGabriellistiwai
authored andcommitted
ALSA: usb-audio: map UAC3 front wide channels in convert_chmap_v3()
convert_chmap_v3() translates UAC3 channel relationship values into ALSA channel-map positions. UAC3_CH_FRONT_WIDE_LEFT and UAC3_CH_FRONT_WIDE_RIGHT currently fall back to SNDRV_CHMAP_UNKNOWN, although ALSA already provides matching channel-map positions via SNDRV_CHMAP_FLW and SNDRV_CHMAP_FRW. Map these two UAC3 positions to their ALSA equivalents and update the comment to clarify that unsupported UAC3 channel relationships remain reported as SNDRV_CHMAP_UNKNOWN. No functional change for other channel relationships. Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260311200010.103710-1-cassiogabrielcontato@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent fd7df93 commit 103a7b9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

sound/usb/stream.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,8 @@ snd_pcm_chmap_elem *convert_chmap_v3(struct uac3_cluster_header_descriptor
366366
/*
367367
* TODO: this conversion is not complete, update it
368368
* after adding UAC3 values to asound.h
369+
* NOTE: not all UAC3 channel relationship have a
370+
* direct ALSA chmap equivalent.
369371
*/
370372
switch (is->bChRelationship) {
371373
case UAC3_CH_MONO:
@@ -390,6 +392,12 @@ snd_pcm_chmap_elem *convert_chmap_v3(struct uac3_cluster_header_descriptor
390392
case UAC3_CH_FRONT_RIGHT_OF_CENTER:
391393
map = SNDRV_CHMAP_FRC;
392394
break;
395+
case UAC3_CH_FRONT_WIDE_LEFT:
396+
map = SNDRV_CHMAP_FLW;
397+
break;
398+
case UAC3_CH_FRONT_WIDE_RIGHT:
399+
map = SNDRV_CHMAP_FRW;
400+
break;
393401
case UAC3_CH_SIDE_LEFT:
394402
map = SNDRV_CHMAP_SL;
395403
break;

0 commit comments

Comments
 (0)