From: Christian Hewitt <christianshewitt@gmail.com>
To: Jaroslav Kysela <perex@perex.cz>
Cc: alsa-devel@alsa-project.org, Matthias Reichl <hias@horus.com>,
linux-amlogic@lists.infradead.org,
Jerome Brunet <jbrunet@baylibre.com>
Subject: Re: [RESEND] Amlogic DPCM audio card(s) speaker placement issue
Date: Thu, 30 Dec 2021 08:28:04 +0000 [thread overview]
Message-ID: <FF1307EB-5133-441A-B221-D5361B6F0AB2@gmail.com> (raw)
In-Reply-To: <3cd96113-3272-1efe-aa81-39de952d1e68@perex.cz>
> On 26 Dec 2021, at 5:30 pm, Jaroslav Kysela <perex@perex.cz> wrote:
>
> On 26. 12. 21 12:43, Christian Hewitt wrote:
>
>> **** List of PLAYBACK Hardware Devices ****
>> card 0: LIBRETECHCC [LIBRETECH-CC], device 0: fe.dai-link-0 (*) []
>> Subdevices: 1/1
>> Subdevice #0: subdevice #0
>
>> 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
>
> Have you tried to reorder the dai-link-# sections in DT? It appears to me that sound/soc/codecs/hdmi-codec.c / hdmi_codec_pcm_new() gets the internal PCM
> device rather than the exported PCM device for the user space.
I did a test reordering the nodes on the WP2 box like this:
dai-link-0 {
sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
codec-0 {
sound-dai = <&hdmi_tx>;
};
};
dai-link-1 {
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
};
dai-link-2 {
sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
};
dai-link-3 {
sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
dai-format = "i2s";
mclk-fs = <256>;
codec-0 {
sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
};
};
dai-link-4 {
sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
codec-0 {
sound-dai = <&spdif_dit>;
};
};
This gives output like:
WP2:~ # amixer controls
numid=5,iface=MIXER,name='AIU HDMI CTRL SRC'
numid=6,iface=MIXER,name='AIU SPDIF SRC SEL'
numid=4,iface=PCM,name='ELD'
numid=3,iface=PCM,name='IEC958 Playback Default'
numid=2,iface=PCM,name='IEC958 Playback Mask'
numid=1,iface=PCM,name='Playback Channel Map’
The “device=4” is gone, but also gone is the default PCM device:
WP2:~ # aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
iec958:CARD=WETEKPLAY2,DEV=0
WETEK-PLAY2,
IEC958 (S/PDIF) Digital Audio Output
Assuming I did the changes above correctly? it looks like DAI order
matters and cannot be changed.
> If the DAI routing cannot be changed, then the hdmi-codec.c should be modified to export the correct device number for the user space:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sound/soc/codecs/hdmi-codec.c?h=v5.16-rc6#n805
That’s some way beyond my limited kernel skills, so I will need to
phone friends and ask the audience for assistance :)
Christian
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2021-12-30 8:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-26 11:43 Christian Hewitt
2021-12-26 17:30 ` Jaroslav Kysela
2021-12-30 8:28 ` Christian Hewitt [this message]
2022-01-03 9:57 ` Jerome Brunet
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=FF1307EB-5133-441A-B221-D5361B6F0AB2@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 \
--cc=perex@perex.cz \
/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®