mbox series

[0/8] arm64: dts: renesas: Simple-Card / Audio-Graph-Card/Card2 dts for ULCB/KF

Message ID 87edt2pxhd.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
Headers show
Series arm64: dts: renesas: Simple-Card / Audio-Graph-Card/Card2 dts for ULCB/KF | expand

Message

Kuninori Morimoto Dec. 14, 2022, 1:47 a.m. UTC
Hi Geert

ALSA SoC is now supporting generic Sound Card driver such as
Simple-Card / Audio-Graph-Card/Card2, and it supports
"normal connection" and "special connections".
I'm its maintainer, thus I need/want to test these.

I have been tested these by using my local patches to switching card,
but maintenance it locally is not useful for me, and users who want to
know the sample DT settings.

And I have noticed that some local patch had bug, but no one noticed
about it (of course :)

ULCB/KF is very good board to test these.
So, I want to upstream these.

One note here is that this patch *should not* have effect to
existing normal users, but useful for test user.
So, this patch-set adds "3 card" x "2 use case" dtsi file,
and ulcb/ulcb-kf "include" one of them which doesn't change anything.
test user can switch to other card or other use case by changing
"include" dtsi.

[1/8][2/8] are small tidyup patches for all SoC sound.

Kuninori Morimoto (8):
  ARM: dts: renesas: #sound-dai-cells is used when simple-card
  arm64: dts: renesas: #sound-dai-cells is used when simple-card
  arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi
  arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi
  arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi
  arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi
  arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi
  arm64: dts: renesas: add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi

 arch/arm/boot/dts/r8a7742.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7743.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7744.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7745.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7778.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7790.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7791.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7793.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7794.dtsi                |   2 +-
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a774c0.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a774e1.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77951.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77960.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77961.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77965.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77990.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77995.dtsi     |   2 +-
 .../boot/dts/renesas/salvator-common.dtsi     |   3 -
 .../ulcb-audio-graph-card-mix+split.dtsi      |  89 +++++++++
 .../dts/renesas/ulcb-audio-graph-card.dtsi    |  85 +++++++++
 .../ulcb-audio-graph-card2-mix+split.dtsi     | 111 +++++++++++
 .../dts/renesas/ulcb-audio-graph-card2.dtsi   |  26 +++
 .../ulcb-kf-audio-graph-card-mix+split.dtsi   | 162 ++++++++++++++++
 .../dts/renesas/ulcb-kf-audio-graph-card.dtsi |  88 +++++++++
 .../ulcb-kf-audio-graph-card2-mix+split.dtsi  | 177 ++++++++++++++++++
 .../renesas/ulcb-kf-audio-graph-card2.dtsi    |  30 +++
 .../ulcb-kf-simple-audio-card-mix+split.dtsi  | 137 ++++++++++++++
 .../renesas/ulcb-kf-simple-audio-card.dtsi    |  85 +++++++++
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      |  66 ++-----
 .../ulcb-simple-audio-card-mix+split.dtsi     |  86 +++++++++
 .../dts/renesas/ulcb-simple-audio-card.dtsi   |  89 +++++++++
 arch/arm64/boot/dts/renesas/ulcb.dtsi         |  60 ++----
 34 files changed, 1212 insertions(+), 120 deletions(-)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-simple-audio-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-simple-audio-card.dtsi

Comments

Kuninori Morimoto Jan. 10, 2023, 11:46 p.m. UTC | #1
Hi Geert

> ALSA SoC is now supporting generic Sound Card driver such as
> Simple-Card / Audio-Graph-Card/Card2, and it supports
> "normal connection" and "special connections".
> I'm its maintainer, thus I need/want to test these.
> 
> I have been tested these by using my local patches to switching card,
> but maintenance it locally is not useful for me, and users who want to
> know the sample DT settings.
> 
> And I have noticed that some local patch had bug, but no one noticed
> about it (of course :)
> 
> ULCB/KF is very good board to test these.
> So, I want to upstream these.
> 
> One note here is that this patch *should not* have effect to
> existing normal users, but useful for test user.
> So, this patch-set adds "3 card" x "2 use case" dtsi file,
> and ulcb/ulcb-kf "include" one of them which doesn't change anything.
> test user can switch to other card or other use case by changing
> "include" dtsi.
> 
> [1/8][2/8] are small tidyup patches for all SoC sound.
> 
> Kuninori Morimoto (8):
>   ARM: dts: renesas: #sound-dai-cells is used when simple-card
>   arm64: dts: renesas: #sound-dai-cells is used when simple-card
>   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi
>   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi
>   arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi
>   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi
>   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi
>   arm64: dts: renesas: add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi

Are these rejected ? or can I post these again ?

Thank you for your help !!

Best regards
---
Kuninori Morimoto
Geert Uytterhoeven Jan. 11, 2023, 2:45 p.m. UTC | #2
Hi Morimoto-san,

CC DT/ASoC

On Wed, Dec 14, 2022 at 2:47 AM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> ALSA SoC is now supporting generic Sound Card driver such as
> Simple-Card / Audio-Graph-Card/Card2, and it supports
> "normal connection" and "special connections".
> I'm its maintainer, thus I need/want to test these.
>
> I have been tested these by using my local patches to switching card,
> but maintenance it locally is not useful for me, and users who want to
> know the sample DT settings.
>
> And I have noticed that some local patch had bug, but no one noticed
> about it (of course :)
>
> ULCB/KF is very good board to test these.
> So, I want to upstream these.
>
> One note here is that this patch *should not* have effect to
> existing normal users, but useful for test user.
> So, this patch-set adds "3 card" x "2 use case" dtsi file,
> and ulcb/ulcb-kf "include" one of them which doesn't change anything.
> test user can switch to other card or other use case by changing
> "include" dtsi.
>
> [1/8][2/8] are small tidyup patches for all SoC sound.

Thanks for your series!

I really wanted to review this earlier, but I am held back by my lack
of understanding of the audio subsystem and the audio bindings.
It is also not clear to me what really is hardware description
(i.e. to be described in DT), and what is software policy (i.e. not
to be described in DT)...
Hence I have lots of questions ("A fool can ask more questions in a
minute than a wise man can answer in an hour." ;-)

What is the difference between "Simple Audio Card", "Audio Graph Card",
and "Audio Graph Card2"?  Why do we need to support all three of them?

How come we can have no #sound-dai-cells, #sound-dai-cells = <0>,
and #sound-dai-cells = <1>, for the same hardware?
What is the real difference between Single DAI and Multi DAI?
Why do we need to support both?

> Kuninori Morimoto (8):
>   ARM: dts: renesas: #sound-dai-cells is used when simple-card
>   arm64: dts: renesas: #sound-dai-cells is used when simple-card
>   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi
>   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi
>   arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi

The above three all describe the same hardware configuration?

>   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi
>   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi
>   arm64: dts: renesas: add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi

Is MIX and TDM Split a different hardware configuration, or software
policy?

Thanks!

>  arch/arm/boot/dts/r8a7742.dtsi                |   2 +-
>  arch/arm/boot/dts/r8a7743.dtsi                |   2 +-
>  arch/arm/boot/dts/r8a7744.dtsi                |   2 +-
>  arch/arm/boot/dts/r8a7745.dtsi                |   2 +-
>  arch/arm/boot/dts/r8a7778.dtsi                |   2 +-
>  arch/arm/boot/dts/r8a7790.dtsi                |   2 +-
>  arch/arm/boot/dts/r8a7791.dtsi                |   2 +-
>  arch/arm/boot/dts/r8a7793.dtsi                |   2 +-
>  arch/arm/boot/dts/r8a7794.dtsi                |   2 +-
>  arch/arm64/boot/dts/renesas/r8a774a1.dtsi     |   2 +-
>  arch/arm64/boot/dts/renesas/r8a774b1.dtsi     |   2 +-
>  arch/arm64/boot/dts/renesas/r8a774c0.dtsi     |   2 +-
>  arch/arm64/boot/dts/renesas/r8a774e1.dtsi     |   2 +-
>  arch/arm64/boot/dts/renesas/r8a77951.dtsi     |   2 +-
>  arch/arm64/boot/dts/renesas/r8a77960.dtsi     |   2 +-
>  arch/arm64/boot/dts/renesas/r8a77961.dtsi     |   2 +-
>  arch/arm64/boot/dts/renesas/r8a77965.dtsi     |   2 +-
>  arch/arm64/boot/dts/renesas/r8a77990.dtsi     |   2 +-
>  arch/arm64/boot/dts/renesas/r8a77995.dtsi     |   2 +-
>  .../boot/dts/renesas/salvator-common.dtsi     |   3 -
>  .../ulcb-audio-graph-card-mix+split.dtsi      |  89 +++++++++
>  .../dts/renesas/ulcb-audio-graph-card.dtsi    |  85 +++++++++
>  .../ulcb-audio-graph-card2-mix+split.dtsi     | 111 +++++++++++
>  .../dts/renesas/ulcb-audio-graph-card2.dtsi   |  26 +++
>  .../ulcb-kf-audio-graph-card-mix+split.dtsi   | 162 ++++++++++++++++
>  .../dts/renesas/ulcb-kf-audio-graph-card.dtsi |  88 +++++++++
>  .../ulcb-kf-audio-graph-card2-mix+split.dtsi  | 177 ++++++++++++++++++
>  .../renesas/ulcb-kf-audio-graph-card2.dtsi    |  30 +++
>  .../ulcb-kf-simple-audio-card-mix+split.dtsi  | 137 ++++++++++++++
>  .../renesas/ulcb-kf-simple-audio-card.dtsi    |  85 +++++++++
>  arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      |  66 ++-----
>  .../ulcb-simple-audio-card-mix+split.dtsi     |  86 +++++++++
>  .../dts/renesas/ulcb-simple-audio-card.dtsi   |  89 +++++++++
>  arch/arm64/boot/dts/renesas/ulcb.dtsi         |  60 ++----
>  34 files changed, 1212 insertions(+), 120 deletions(-)
>  create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card-mix+split.dtsi
>  create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi
>  create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi
>  create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2.dtsi
>  create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi
>  create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi
>  create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi
>  create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2.dtsi
>  create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi
>  create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi
>  create mode 100644 arch/arm64/boot/dts/renesas/ulcb-simple-audio-card-mix+split.dtsi
>  create mode 100644 arch/arm64/boot/dts/renesas/ulcb-simple-audio-card.dtsi

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Kuninori Morimoto Jan. 12, 2023, 12:17 a.m. UTC | #3
Hi Geert

> I really wanted to review this earlier, but I am held back by my lack
> of understanding of the audio subsystem and the audio bindings.
> It is also not clear to me what really is hardware description
> (i.e. to be described in DT), and what is software policy (i.e. not
> to be described in DT)...

OK, I will try to answer your question, here.

> Hence I have lots of questions ("A fool can ask more questions in a
> minute than a wise man can answer in an hour." ;-)

No problem, your are very wise man :)

> What is the difference between "Simple Audio Card", "Audio Graph Card",
> and "Audio Graph Card2"?  Why do we need to support all three of them?

The answer is because of "history" and "compatibility".

"Simple Audio Card" was created before DT support, now it is supporting DT too.
But it is for very simple sound connection. It is using own DT style.

"Audio Graph Card" is almost same as "Simple Audio Card", but it is
using "Of Graph" style. It is needed for HDMI support (= Sound with Video).
"Audio Graph Card" was created because it is difficult to keep compatibility
for both "Of Graph style" and "own style" on "Simple Audio Card".

"Audio Graph Card2" is expand version of "Audio Graph Card",
but it is supporting more complex connections.
Because of this complex connection, it is difficult to keep compatibility
with "Audio Graph Card".

For normal user case, selecting one of them is very enough.
But for me, I need to test all of them, thus I want to switch these easily.
And ULCB is good board for testing.

Basically, people don't need to care about this patch-set.
It separates DT file, but nothing change.
It is just easy for testing.

> How come we can have no #sound-dai-cells, #sound-dai-cells = <0>,
> and #sound-dai-cells = <1>, for the same hardware?
> What is the real difference between Single DAI and Multi DAI?
> Why do we need to support both?

It is used on "Simple Audio Card".
We  need <0> if the board is using SSI x 1,
and need <1> if the board is using SSI x N.
It is not mandatory if the board is using "Audio Graph Card/Card2".

> > Kuninori Morimoto (8):
> >   ARM: dts: renesas: #sound-dai-cells is used when simple-card
> >   arm64: dts: renesas: #sound-dai-cells is used when simple-card
> >   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi
> >   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi
> >   arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi
> 
> The above three all describe the same hardware configuration?

Yes, same hardware, but is using different connection style (= driver).

> >   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi
> >   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi
> >   arm64: dts: renesas: add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi
> 
> Is MIX and TDM Split a different hardware configuration, or software
> policy?

Same hardware, but different connection (= mixing, split).


Hmm, it is difficult to explain via text...
But this patch-set has no effect for users, but expand to easy to switch
driver for testing for me.

Thank you for your help !!

Best regards
---
Kuninori Morimoto
Geert Uytterhoeven Jan. 12, 2023, 10:59 a.m. UTC | #4
Hi Morimoto-san,

On Thu, Jan 12, 2023 at 1:17 AM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> > What is the difference between "Simple Audio Card", "Audio Graph Card",
> > and "Audio Graph Card2"?  Why do we need to support all three of them?
>
> The answer is because of "history" and "compatibility".
>
> "Simple Audio Card" was created before DT support, now it is supporting DT too.
> But it is for very simple sound connection. It is using own DT style.
>
> "Audio Graph Card" is almost same as "Simple Audio Card", but it is
> using "Of Graph" style. It is needed for HDMI support (= Sound with Video).
> "Audio Graph Card" was created because it is difficult to keep compatibility
> for both "Of Graph style" and "own style" on "Simple Audio Card".
>
> "Audio Graph Card2" is expand version of "Audio Graph Card",
> but it is supporting more complex connections.
> Because of this complex connection, it is difficult to keep compatibility
> with "Audio Graph Card".

So they are different ways (generations) of representing the audio
topology on the board? Like "operating-points" and "operating-points-v2"
for cpufreq?

Hence these are orthogonal to (and independent of) the underlying audio
hardware in the SoC?

> For normal user case, selecting one of them is very enough.
> But for me, I need to test all of them, thus I want to switch these easily.
> And ULCB is good board for testing.
>
> Basically, people don't need to care about this patch-set.
> It separates DT file, but nothing change.
> It is just easy for testing.

OK. And I guess you intend to use them as examples to point people
to, too?

> > How come we can have no #sound-dai-cells, #sound-dai-cells = <0>,
> > and #sound-dai-cells = <1>, for the same hardware?
> > What is the real difference between Single DAI and Multi DAI?
> > Why do we need to support both?
>
> It is used on "Simple Audio Card".
> We  need <0> if the board is using SSI x 1,
> and need <1> if the board is using SSI x N.
> It is not mandatory if the board is using "Audio Graph Card/Card2".

So #sound-dai-cells should be in the board DTS, and never in the
SoC .dtsi? Hence it should be moved out of
arch/arm/boot/dts/{r8a7740,sh73a0}.dtsi and
arch/arm64/boot/dts/renesas/r9a07g0{43,44,54}.dtsi?

> > > Kuninori Morimoto (8):
> > >   ARM: dts: renesas: #sound-dai-cells is used when simple-card
> > >   arm64: dts: renesas: #sound-dai-cells is used when simple-card
> > >   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi
> > >   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi
> > >   arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi
> >
> > The above three all describe the same hardware configuration?
>
> Yes, same hardware, but is using different connection style (= driver).

OK.

> > >   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi
> > >   arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi
> > >   arm64: dts: renesas: add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi
> >
> > Is MIX and TDM Split a different hardware configuration, or software
> > policy?
>
> Same hardware, but different connection (= mixing, split).
>
> Hmm, it is difficult to explain via text...

IC, this is more complicated...

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Kuninori Morimoto Jan. 12, 2023, 11:07 p.m. UTC | #5
Hi Geert

> > It is used on "Simple Audio Card".
> > We  need <0> if the board is using SSI x 1,
> > and need <1> if the board is using SSI x N.
> > It is not mandatory if the board is using "Audio Graph Card/Card2".
> 
> So #sound-dai-cells should be in the board DTS, and never in the
> SoC .dtsi? Hence it should be moved out of
> arch/arm/boot/dts/{r8a7740,sh73a0}.dtsi and
> arch/arm64/boot/dts/renesas/r9a07g0{43,44,54}.dtsi?

Hmm, it is difficult to explain via text...

On rsnd case, how many DAIs exist is based on the board,
and its connection (= R-Car SoC).
But FSI has fixed DAIs (= SH), thus having #sound-dai-cells
on SoC is not strange (= r8a7740/sh73a0).

And I'm not sure how it works on r9a07g0xx,
it is not my drivers.

Thank you for your help !!

Best regards
---
Kuninori Morimoto