All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Hewitt <christianshewitt@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Matthias Reichl <hias@horus.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	linux-amlogic@lists.infradead.org
Subject: [RESEND] Amlogic DPCM audio card(s) speaker placement issue
Date: Sun, 26 Dec 2021 11:43:39 +0000	[thread overview]
Message-ID: <ECC56215-1E02-4735-82F3-B68E73F56CB4@gmail.com> (raw)

Hello alsa-dev people,

I’d like to describe a problem with speaker placement seen with the Amlogic
(meson) AIU and AXG drivers when playing multi-channel media. The problem 
was traced to a failure to get the channel map via snd_pcm_get_chmap()
and further analysis showed this failed because the PCM controls are exposed
on a different device than the PCM stream.

e.g. on LibreTech LePotato with DPCM routing configured for HDMI output,
the hw PCM is on the single frontend device 0 but the PCM controls are
on device 2:

LePotato:~ # aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: LIBRETECHCC [LIBRETECH-CC], device 0: fe.dai-link-0 (*) []
 Subdevices: 1/1
 Subdevice #0: subdevice #0

LePotato:~ # amixer controls
numid=19,iface=MIXER,name='PCM Playback Volume'
numid=18,iface=MIXER,name='ACODEC Left DAC Sel'
numid=7,iface=MIXER,name='ACODEC Mute Ramp Switch'
numid=2,iface=MIXER,name='ACODEC Playback Channel Mode'
numid=3,iface=MIXER,name='ACODEC Playback Switch'
numid=4,iface=MIXER,name='ACODEC Playback Volume'
numid=5,iface=MIXER,name='ACODEC Ramp Rate'
numid=17,iface=MIXER,name='ACODEC Right DAC Sel'
numid=8,iface=MIXER,name='ACODEC Unmute Ramp Switch'
numid=6,iface=MIXER,name='ACODEC Volume Ramp Switch'
numid=1,iface=MIXER,name='AIU ACODEC I2S Lane Select'
numid=16,iface=MIXER,name='AIU ACODEC OUT EN Switch'
numid=15,iface=MIXER,name='AIU ACODEC SRC'
numid=14,iface=MIXER,name='AIU HDMI CTRL SRC'
numid=13,iface=MIXER,name='AIU SPDIF SRC SEL'
numid=12,iface=PCM,name='ELD',device=2
numid=11,iface=PCM,name='IEC958 Playback Default',device=2
numid=10,iface=PCM,name='IEC958 Playback Mask',device=2
numid=9,iface=PCM,name='Playback Channel Map',device=2

https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts#L136-L188

or on a Wetek Play 2:

WP2:~ # aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: WETEKPLAY2 [WETEK-PLAY2], device 0: fe.dai-link-0 (*) []
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 0: WETEKPLAY2 [WETEK-PLAY2], device 1: fe.dai-link-1 (*) []
 Subdevices: 1/1
 Subdevice #0: subdevice #0

WP2:~ # amixer controls
numid=7,iface=MIXER,name='PCM Playback Volume'
numid=6,iface=MIXER,name='AIU HDMI CTRL SRC'
numid=5,iface=MIXER,name='AIU SPDIF SRC SEL'
numid=4,iface=PCM,name='ELD',device=4
numid=3,iface=PCM,name='IEC958 Playback Default',device=4
numid=2,iface=PCM,name='IEC958 Playback Mask',device=4
numid=1,iface=PCM,name='Playback Channel Map',device=4

https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts#L51-L97

It looks like the PCM controls of the backend hdmi-codec are not routed
through the DPCM driver the same way as PCM streams. We discussed that
issue with Jerome, the driver author, but it’s not clear which bits we
are missing. i.e. if it's something ASoC DPCM should be handling or if
some further plumbing in the card driver or userspace is needed?

Any hints into the right direction would be highly appreciated!

Christian


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

WARNING: multiple messages have this Message-ID (diff)
From: Christian Hewitt <christianshewitt@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Matthias Reichl <hias@horus.com>,
	linux-amlogic@lists.infradead.org,
	Jerome Brunet <jbrunet@baylibre.com>
Subject: [RESEND] Amlogic DPCM audio card(s) speaker placement issue
Date: Sun, 26 Dec 2021 11:43:39 +0000	[thread overview]
Message-ID: <ECC56215-1E02-4735-82F3-B68E73F56CB4@gmail.com> (raw)

Hello alsa-dev people,

I’d like to describe a problem with speaker placement seen with the Amlogic
(meson) AIU and AXG drivers when playing multi-channel media. The problem 
was traced to a failure to get the channel map via snd_pcm_get_chmap()
and further analysis showed this failed because the PCM controls are exposed
on a different device than the PCM stream.

e.g. on LibreTech LePotato with DPCM routing configured for HDMI output,
the hw PCM is on the single frontend device 0 but the PCM controls are
on device 2:

LePotato:~ # aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: LIBRETECHCC [LIBRETECH-CC], device 0: fe.dai-link-0 (*) []
 Subdevices: 1/1
 Subdevice #0: subdevice #0

LePotato:~ # amixer controls
numid=19,iface=MIXER,name='PCM Playback Volume'
numid=18,iface=MIXER,name='ACODEC Left DAC Sel'
numid=7,iface=MIXER,name='ACODEC Mute Ramp Switch'
numid=2,iface=MIXER,name='ACODEC Playback Channel Mode'
numid=3,iface=MIXER,name='ACODEC Playback Switch'
numid=4,iface=MIXER,name='ACODEC Playback Volume'
numid=5,iface=MIXER,name='ACODEC Ramp Rate'
numid=17,iface=MIXER,name='ACODEC Right DAC Sel'
numid=8,iface=MIXER,name='ACODEC Unmute Ramp Switch'
numid=6,iface=MIXER,name='ACODEC Volume Ramp Switch'
numid=1,iface=MIXER,name='AIU ACODEC I2S Lane Select'
numid=16,iface=MIXER,name='AIU ACODEC OUT EN Switch'
numid=15,iface=MIXER,name='AIU ACODEC SRC'
numid=14,iface=MIXER,name='AIU HDMI CTRL SRC'
numid=13,iface=MIXER,name='AIU SPDIF SRC SEL'
numid=12,iface=PCM,name='ELD',device=2
numid=11,iface=PCM,name='IEC958 Playback Default',device=2
numid=10,iface=PCM,name='IEC958 Playback Mask',device=2
numid=9,iface=PCM,name='Playback Channel Map',device=2

https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts#L136-L188

or on a Wetek Play 2:

WP2:~ # aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: WETEKPLAY2 [WETEK-PLAY2], device 0: fe.dai-link-0 (*) []
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 0: WETEKPLAY2 [WETEK-PLAY2], device 1: fe.dai-link-1 (*) []
 Subdevices: 1/1
 Subdevice #0: subdevice #0

WP2:~ # amixer controls
numid=7,iface=MIXER,name='PCM Playback Volume'
numid=6,iface=MIXER,name='AIU HDMI CTRL SRC'
numid=5,iface=MIXER,name='AIU SPDIF SRC SEL'
numid=4,iface=PCM,name='ELD',device=4
numid=3,iface=PCM,name='IEC958 Playback Default',device=4
numid=2,iface=PCM,name='IEC958 Playback Mask',device=4
numid=1,iface=PCM,name='Playback Channel Map',device=4

https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts#L51-L97

It looks like the PCM controls of the backend hdmi-codec are not routed
through the DPCM driver the same way as PCM streams. We discussed that
issue with Jerome, the driver author, but it’s not clear which bits we
are missing. i.e. if it's something ASoC DPCM should be handling or if
some further plumbing in the card driver or userspace is needed?

Any hints into the right direction would be highly appreciated!

Christian


             reply	other threads:[~2021-12-26 11:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-26 11:43 Christian Hewitt [this message]
2021-12-26 11:43 ` [RESEND] Amlogic DPCM audio card(s) speaker placement issue Christian Hewitt
2021-12-26 17:30 ` Jaroslav Kysela
2021-12-26 17:30   ` Jaroslav Kysela
2021-12-30  8:28   ` Christian Hewitt
2021-12-30  8:28     ` Christian Hewitt
2022-01-03  9:57   ` Jerome Brunet
2022-01-03  9:57     ` Jerome Brunet
2022-01-03 11:04     ` Jaroslav Kysela
2022-01-03 11:04       ` Jaroslav Kysela

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=ECC56215-1E02-4735-82F3-B68E73F56CB4@gmail.com \
    --to=christianshewitt@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=hias@horus.com \
    --cc=jbrunet@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.