From: "Cássio Gabriel" <cassiogabrielcontato@gmail.com>
To: tiwai@suse.com, perex@perex.cz, broonie@kernel.org,
gregkh@linuxfoundation.org
Cc: linux-sound@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Cássio Gabriel" <cassiogabrielcontato@gmail.com>
Subject: [PATCH] ALSA: usb-audio: map UAC3 front wide channels in convert_chmap_v3()
Date: Wed, 11 Mar 2026 17:00:10 -0300 [thread overview]
Message-ID: <20260311200010.103710-1-cassiogabrielcontato@gmail.com> (raw)
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>
---
sound/usb/stream.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index d38c39e28f38..2532bf97e05e 100644
--- a/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -366,6 +366,8 @@ snd_pcm_chmap_elem *convert_chmap_v3(struct uac3_cluster_header_descriptor
/*
* 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:
@@ -390,6 +392,12 @@ snd_pcm_chmap_elem *convert_chmap_v3(struct uac3_cluster_header_descriptor
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;
--
2.53.0
next reply other threads:[~2026-03-11 20:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 20:00 Cássio Gabriel [this message]
2026-03-12 6:36 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260311200010.103710-1-cassiogabrielcontato@gmail.com \
--to=cassiogabrielcontato@gmail.com \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®