mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Jaroslav Kysela <perex@perex.cz>
To: Jerome Brunet <jbrunet@baylibre.com>,
	Christian Hewitt <christianshewitt@gmail.com>,
	alsa-devel@alsa-project.org
Cc: Matthias Reichl <hias@horus.com>, linux-amlogic@lists.infradead.org
Subject: Re: [RESEND] Amlogic DPCM audio card(s) speaker placement issue
Date: Mon, 3 Jan 2022 12:04:25 +0100	[thread overview]
Message-ID: <125f4abc-a85e-7a8c-594c-4cf7ddee1d78@perex.cz> (raw)
In-Reply-To: <1jk0fh86yj.fsf@starbuckisacylon.baylibre.com>

On 03. 01. 22 10:57, Jerome Brunet wrote:
> 
> On Sun 26 Dec 2021 at 18:30, 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.
>>
>> 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:
>>
> 
> The DAI routing is dynamic, especially on the AXG series.
> There is actually two routing stages:
> 
> 1) Between the user interfaces (DMA) and the i2s/TDM encoders/decoders:
>     -> This is using DPCM
> 
> 2) Between the i2s/TDM encoders and the HDMI controller:
>     -> This is using Codec-to-Codec links
> 
> The problem exposed here is
>   - How to get the get the "Playback Channel Map" related to the pcm
>   device of a given playback ?

The PCM device exported to the user space should be able to export this 
information correctly. The kcontrols in hdmi-codec.c refers to an unknown 
(internal) PCM codec2codec device (from the user space view) which is created 
in the SoC layer.

It seems that kcontrols in hdmi-codec.c should not be created for the internal 
SoC PCMs. A new layer which translate the kcontrol handling between the 
exported (user space) PCM device and internal (SoC) PCM device is required.

Problematic code in hdmi_codec_pcm_new() / hdmi-codec.c:

- snd_pcm_add_chmap_ctls()
- kctl->id.device = rtd->pcm->device

						Jaroslav

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

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

      reply	other threads:[~2022-01-03 11:04 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
2022-01-03  9:57   ` Jerome Brunet
2022-01-03 11:04     ` Jaroslav Kysela [this message]

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=125f4abc-a85e-7a8c-594c-4cf7ddee1d78@perex.cz \
    --to=perex@perex.cz \
    --cc=alsa-devel@alsa-project.org \
    --cc=christianshewitt@gmail.com \
    --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 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®