All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: alsa-devel@alsa-project.org, linux-amlogic@lists.infradead.org,
	lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
	tiwai@suse.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1 0/1] ASoC: meson: aiu: HDMI codec control questions and issues
Date: Tue, 5 Oct 2021 23:31:31 +0200	[thread overview]
Message-ID: <CAFBinCBv0GWDUL+WYBU4JAgKgie07m+duxReh2tSopGOHwh4=Q@mail.gmail.com> (raw)
In-Reply-To: <CAFBinCBrYUPOkvJUAiEF9X0Z76ta3jSrKkLkaHvJUaiWNyR0yw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1983 bytes --]

Hi Jerome,

On Mon, Oct 4, 2021 at 11:17 PM Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
[...]
> > This bit could also be a remain of an older design, not really connected
> > to anything meaningful. It would not be the first time.
> >
> > The AIU looks like an IP that has evolved a lot over the years, not always
> > in a coordinated fashion. Some scenario are well supported and easy,
> > others seem to require a magic spell.
> >
> > Last (but not least), in AML vendor kernel, the only time this bit poked
> > is around 8ch support (1 for 8ch, 0 otherwise) ... I have no idea why.
> The 32-bit SoCs use SPDIF to feed 2-channel audio to the HDMI TX
> controller and I2S to feed 8-channel audio to the HDMI TX controller.
> It seems that Amlogic stopped this for (at least some) 64-bit SoCs.
>
> My testing results indicate that AIU_CLK_CTRL_MORE[6] is still relevant.
> I can do another round of testing with various combinations of
> AIU_CLK_CTRL_MORE[6] and AIU_HDMI_CLK_DATA_CTRL register values.
> If you want me to test any specific combinations then please let me know.
I have tested various combinations, see the attached result file
(which can be viewed with "column -t /path/to/results.txt").
The short summary is that...
...I2S output requires:
  AIU_HDMI_CLK_DATA_CTRL[1:0] = 0x2
  AIU_HDMI_CLK_DATA_CTRL[5:4] = 0x2
  AIU_CLK_CTRL_MORE[6] = 0x1

...SPDIF output requires:
  AIU_HDMI_CLK_DATA_CTRL[1:0] = 0x2
  AIU_HDMI_CLK_DATA_CTRL[5:4] = (any)
  AIU_CLK_CTRL_MORE[6] = 0x1

My test consisted of running speaker-test -c2 and playing an mp3 with
ffplay on an Odroid-C1.

In other words: this confirms what we have suspected before.
What is your suggestion on how to model these muxes in the driver?

In the meantime I finally understood what #sound-dai-cells = <1>; does
thanks to your previous hints.
With that I can wire up the I2S and SPDIF inputs to the HDMI TX
controller's "HDMI codec".
Many thanks again for this hint!


Best regards,
Martin

[-- Attachment #2: results.txt --]
[-- Type: text/plain, Size: 311 bytes --]

AIU_HDMI_CLK_DATA_CTRL[1:0] AIU_HDMI_CLK_DATA_CTRL[5:4] AIU_CLK_CTRL_MORE[6] I2S SPDIF
(CTRL_CLK_SEL) (CTRL_DATA_SEL) (AMCLK) (I2S) (SPDIF)
0x0 0x0 0x0 silence silence
0x0 0x0 0x1 silence silence
0x2 0x0 0x0 silence playback
0x2 0x0 0x1 silence silence
0x2 0x2 0x1 playback silence
0x2 0x2 0x0 silence playback

WARNING: multiple messages have this Message-ID (diff)
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: alsa-devel@alsa-project.org, linux-amlogic@lists.infradead.org,
	 lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
	tiwai@suse.com,  linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1 0/1] ASoC: meson: aiu: HDMI codec control questions and issues
Date: Tue, 5 Oct 2021 23:31:31 +0200	[thread overview]
Message-ID: <CAFBinCBv0GWDUL+WYBU4JAgKgie07m+duxReh2tSopGOHwh4=Q@mail.gmail.com> (raw)
In-Reply-To: <CAFBinCBrYUPOkvJUAiEF9X0Z76ta3jSrKkLkaHvJUaiWNyR0yw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1983 bytes --]

Hi Jerome,

On Mon, Oct 4, 2021 at 11:17 PM Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
[...]
> > This bit could also be a remain of an older design, not really connected
> > to anything meaningful. It would not be the first time.
> >
> > The AIU looks like an IP that has evolved a lot over the years, not always
> > in a coordinated fashion. Some scenario are well supported and easy,
> > others seem to require a magic spell.
> >
> > Last (but not least), in AML vendor kernel, the only time this bit poked
> > is around 8ch support (1 for 8ch, 0 otherwise) ... I have no idea why.
> The 32-bit SoCs use SPDIF to feed 2-channel audio to the HDMI TX
> controller and I2S to feed 8-channel audio to the HDMI TX controller.
> It seems that Amlogic stopped this for (at least some) 64-bit SoCs.
>
> My testing results indicate that AIU_CLK_CTRL_MORE[6] is still relevant.
> I can do another round of testing with various combinations of
> AIU_CLK_CTRL_MORE[6] and AIU_HDMI_CLK_DATA_CTRL register values.
> If you want me to test any specific combinations then please let me know.
I have tested various combinations, see the attached result file
(which can be viewed with "column -t /path/to/results.txt").
The short summary is that...
...I2S output requires:
  AIU_HDMI_CLK_DATA_CTRL[1:0] = 0x2
  AIU_HDMI_CLK_DATA_CTRL[5:4] = 0x2
  AIU_CLK_CTRL_MORE[6] = 0x1

...SPDIF output requires:
  AIU_HDMI_CLK_DATA_CTRL[1:0] = 0x2
  AIU_HDMI_CLK_DATA_CTRL[5:4] = (any)
  AIU_CLK_CTRL_MORE[6] = 0x1

My test consisted of running speaker-test -c2 and playing an mp3 with
ffplay on an Odroid-C1.

In other words: this confirms what we have suspected before.
What is your suggestion on how to model these muxes in the driver?

In the meantime I finally understood what #sound-dai-cells = <1>; does
thanks to your previous hints.
With that I can wire up the I2S and SPDIF inputs to the HDMI TX
controller's "HDMI codec".
Many thanks again for this hint!


Best regards,
Martin

[-- Attachment #2: results.txt --]
[-- Type: text/plain, Size: 311 bytes --]

AIU_HDMI_CLK_DATA_CTRL[1:0] AIU_HDMI_CLK_DATA_CTRL[5:4] AIU_CLK_CTRL_MORE[6] I2S SPDIF
(CTRL_CLK_SEL) (CTRL_DATA_SEL) (AMCLK) (I2S) (SPDIF)
0x0 0x0 0x0 silence silence
0x0 0x0 0x1 silence silence
0x2 0x0 0x0 silence playback
0x2 0x0 0x1 silence silence
0x2 0x2 0x1 playback silence
0x2 0x2 0x0 silence playback

[-- Attachment #3: Type: text/plain, Size: 167 bytes --]

_______________________________________________
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: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	tiwai@suse.com, lgirdwood@gmail.com, broonie@kernel.org,
	linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH v1 0/1] ASoC: meson: aiu: HDMI codec control questions and issues
Date: Tue, 5 Oct 2021 23:31:31 +0200	[thread overview]
Message-ID: <CAFBinCBv0GWDUL+WYBU4JAgKgie07m+duxReh2tSopGOHwh4=Q@mail.gmail.com> (raw)
In-Reply-To: <CAFBinCBrYUPOkvJUAiEF9X0Z76ta3jSrKkLkaHvJUaiWNyR0yw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1983 bytes --]

Hi Jerome,

On Mon, Oct 4, 2021 at 11:17 PM Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
[...]
> > This bit could also be a remain of an older design, not really connected
> > to anything meaningful. It would not be the first time.
> >
> > The AIU looks like an IP that has evolved a lot over the years, not always
> > in a coordinated fashion. Some scenario are well supported and easy,
> > others seem to require a magic spell.
> >
> > Last (but not least), in AML vendor kernel, the only time this bit poked
> > is around 8ch support (1 for 8ch, 0 otherwise) ... I have no idea why.
> The 32-bit SoCs use SPDIF to feed 2-channel audio to the HDMI TX
> controller and I2S to feed 8-channel audio to the HDMI TX controller.
> It seems that Amlogic stopped this for (at least some) 64-bit SoCs.
>
> My testing results indicate that AIU_CLK_CTRL_MORE[6] is still relevant.
> I can do another round of testing with various combinations of
> AIU_CLK_CTRL_MORE[6] and AIU_HDMI_CLK_DATA_CTRL register values.
> If you want me to test any specific combinations then please let me know.
I have tested various combinations, see the attached result file
(which can be viewed with "column -t /path/to/results.txt").
The short summary is that...
...I2S output requires:
  AIU_HDMI_CLK_DATA_CTRL[1:0] = 0x2
  AIU_HDMI_CLK_DATA_CTRL[5:4] = 0x2
  AIU_CLK_CTRL_MORE[6] = 0x1

...SPDIF output requires:
  AIU_HDMI_CLK_DATA_CTRL[1:0] = 0x2
  AIU_HDMI_CLK_DATA_CTRL[5:4] = (any)
  AIU_CLK_CTRL_MORE[6] = 0x1

My test consisted of running speaker-test -c2 and playing an mp3 with
ffplay on an Odroid-C1.

In other words: this confirms what we have suspected before.
What is your suggestion on how to model these muxes in the driver?

In the meantime I finally understood what #sound-dai-cells = <1>; does
thanks to your previous hints.
With that I can wire up the I2S and SPDIF inputs to the HDMI TX
controller's "HDMI codec".
Many thanks again for this hint!


Best regards,
Martin

[-- Attachment #2: results.txt --]
[-- Type: text/plain, Size: 311 bytes --]

AIU_HDMI_CLK_DATA_CTRL[1:0] AIU_HDMI_CLK_DATA_CTRL[5:4] AIU_CLK_CTRL_MORE[6] I2S SPDIF
(CTRL_CLK_SEL) (CTRL_DATA_SEL) (AMCLK) (I2S) (SPDIF)
0x0 0x0 0x0 silence silence
0x0 0x0 0x1 silence silence
0x2 0x0 0x0 silence playback
0x2 0x0 0x1 silence silence
0x2 0x2 0x1 playback silence
0x2 0x2 0x0 silence playback

WARNING: multiple messages have this Message-ID (diff)
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: alsa-devel@alsa-project.org, linux-amlogic@lists.infradead.org,
	 lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
	tiwai@suse.com,  linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1 0/1] ASoC: meson: aiu: HDMI codec control questions and issues
Date: Tue, 5 Oct 2021 23:31:31 +0200	[thread overview]
Message-ID: <CAFBinCBv0GWDUL+WYBU4JAgKgie07m+duxReh2tSopGOHwh4=Q@mail.gmail.com> (raw)
In-Reply-To: <CAFBinCBrYUPOkvJUAiEF9X0Z76ta3jSrKkLkaHvJUaiWNyR0yw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1983 bytes --]

Hi Jerome,

On Mon, Oct 4, 2021 at 11:17 PM Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
[...]
> > This bit could also be a remain of an older design, not really connected
> > to anything meaningful. It would not be the first time.
> >
> > The AIU looks like an IP that has evolved a lot over the years, not always
> > in a coordinated fashion. Some scenario are well supported and easy,
> > others seem to require a magic spell.
> >
> > Last (but not least), in AML vendor kernel, the only time this bit poked
> > is around 8ch support (1 for 8ch, 0 otherwise) ... I have no idea why.
> The 32-bit SoCs use SPDIF to feed 2-channel audio to the HDMI TX
> controller and I2S to feed 8-channel audio to the HDMI TX controller.
> It seems that Amlogic stopped this for (at least some) 64-bit SoCs.
>
> My testing results indicate that AIU_CLK_CTRL_MORE[6] is still relevant.
> I can do another round of testing with various combinations of
> AIU_CLK_CTRL_MORE[6] and AIU_HDMI_CLK_DATA_CTRL register values.
> If you want me to test any specific combinations then please let me know.
I have tested various combinations, see the attached result file
(which can be viewed with "column -t /path/to/results.txt").
The short summary is that...
...I2S output requires:
  AIU_HDMI_CLK_DATA_CTRL[1:0] = 0x2
  AIU_HDMI_CLK_DATA_CTRL[5:4] = 0x2
  AIU_CLK_CTRL_MORE[6] = 0x1

...SPDIF output requires:
  AIU_HDMI_CLK_DATA_CTRL[1:0] = 0x2
  AIU_HDMI_CLK_DATA_CTRL[5:4] = (any)
  AIU_CLK_CTRL_MORE[6] = 0x1

My test consisted of running speaker-test -c2 and playing an mp3 with
ffplay on an Odroid-C1.

In other words: this confirms what we have suspected before.
What is your suggestion on how to model these muxes in the driver?

In the meantime I finally understood what #sound-dai-cells = <1>; does
thanks to your previous hints.
With that I can wire up the I2S and SPDIF inputs to the HDMI TX
controller's "HDMI codec".
Many thanks again for this hint!


Best regards,
Martin

[-- Attachment #2: results.txt --]
[-- Type: text/plain, Size: 311 bytes --]

AIU_HDMI_CLK_DATA_CTRL[1:0] AIU_HDMI_CLK_DATA_CTRL[5:4] AIU_CLK_CTRL_MORE[6] I2S SPDIF
(CTRL_CLK_SEL) (CTRL_DATA_SEL) (AMCLK) (I2S) (SPDIF)
0x0 0x0 0x0 silence silence
0x0 0x0 0x1 silence silence
0x2 0x0 0x0 silence playback
0x2 0x0 0x1 silence silence
0x2 0x2 0x1 playback silence
0x2 0x2 0x0 silence playback

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

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

  reply	other threads:[~2021-10-05 21:31 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-02 23:43 [RFC PATCH v1 0/1] ASoC: meson: aiu: HDMI codec control questions and issues Martin Blumenstingl
2021-10-02 23:43 ` Martin Blumenstingl
2021-10-02 23:43 ` Martin Blumenstingl
2021-10-02 23:43 ` Martin Blumenstingl
2021-10-02 23:43 ` [RFC PATCH v1 1/1] ASoC: meson: aiu: Fix HDMI codec control selection Martin Blumenstingl
2021-10-02 23:43   ` Martin Blumenstingl
2021-10-02 23:43   ` Martin Blumenstingl
2021-10-02 23:43   ` Martin Blumenstingl
2021-10-03  5:13 ` [RFC PATCH v1 0/1] ASoC: meson: aiu: HDMI codec control questions and issues Geraldo Nascimento
2021-10-03  5:13   ` Geraldo Nascimento
2021-10-03  5:13   ` Geraldo Nascimento
2021-10-03  5:13   ` Geraldo Nascimento
2021-10-03  7:00   ` Christian Hewitt
2021-10-03  7:00     ` Christian Hewitt
2021-10-03  7:00     ` Christian Hewitt
2021-10-03  7:00     ` Christian Hewitt
2021-10-03 20:34     ` Geraldo Nascimento
2021-10-03 20:34       ` Geraldo Nascimento
2021-10-03 20:34       ` Geraldo Nascimento
2021-10-03 20:34       ` Geraldo Nascimento
2021-10-04 11:18     ` Mark Brown
2021-10-04 11:18       ` Mark Brown
2021-10-04 11:18       ` Mark Brown
2021-10-04 11:18       ` Mark Brown
2021-10-03 15:57 ` Jerome Brunet
2021-10-03 15:57   ` Jerome Brunet
2021-10-03 15:57   ` Jerome Brunet
2021-10-03 15:57   ` Jerome Brunet
2021-10-03 19:17   ` Martin Blumenstingl
2021-10-03 19:17     ` Martin Blumenstingl
2021-10-03 19:17     ` Martin Blumenstingl
2021-10-03 19:17     ` Martin Blumenstingl
2021-10-03 19:20     ` Martin Blumenstingl
2021-10-03 19:20       ` Martin Blumenstingl
2021-10-03 19:20       ` Martin Blumenstingl
2021-10-03 19:20       ` Martin Blumenstingl
2021-10-04  8:13     ` Jerome Brunet
2021-10-04  8:13       ` Jerome Brunet
2021-10-04  8:13       ` Jerome Brunet
2021-10-04  8:13       ` Jerome Brunet
2021-10-04 21:17       ` Martin Blumenstingl
2021-10-04 21:17         ` Martin Blumenstingl
2021-10-04 21:17         ` Martin Blumenstingl
2021-10-04 21:17         ` Martin Blumenstingl
2021-10-05 21:31         ` Martin Blumenstingl [this message]
2021-10-05 21:31           ` Martin Blumenstingl
2021-10-05 21:31           ` Martin Blumenstingl
2021-10-05 21:31           ` Martin Blumenstingl
2021-10-04 12:23     ` Mark Brown
2021-10-04 12:23       ` Mark Brown
2021-10-04 12:23       ` Mark Brown
2021-10-04 12:23       ` Mark Brown
2021-10-03 23:11   ` Geraldo Nascimento
2021-10-03 23:11     ` Geraldo Nascimento
2021-10-03 23:11     ` Geraldo Nascimento
2021-10-03 23:11     ` Geraldo Nascimento

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='CAFBinCBv0GWDUL+WYBU4JAgKgie07m+duxReh2tSopGOHwh4=Q@mail.gmail.com' \
    --to=martin.blumenstingl@googlemail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@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 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.