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>
/*
* TODO: this conversion is not complete, update it
* after adding UAC3 values to asound.h
+ * NOTE: not all UAC3 channel relationship have a
+ * direct ALSA chmap equivalent.
*/
switch (is->bChRelationship) {
case UAC3_CH_MONO:
case UAC3_CH_FRONT_RIGHT_OF_CENTER:
map = SNDRV_CHMAP_FRC;
break;
+ case UAC3_CH_FRONT_WIDE_LEFT:
+ map = SNDRV_CHMAP_FLW;
+ break;
+ case UAC3_CH_FRONT_WIDE_RIGHT:
+ map = SNDRV_CHMAP_FRW;
+ break;
case UAC3_CH_SIDE_LEFT:
map = SNDRV_CHMAP_SL;
break;