devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Clément Péron" <peron.clem@gmail.com>
To: Rob Herring <robh+dt@kernel.org>, Mark Brown <broonie@kernel.org>,
	Maxime Ripard <mripard@kernel.org>
Cc: "Jernej Škrabec" <jernej.skrabec@siol.net>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Marcus Cooper" <codekipper@gmail.com>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	devicetree <devicetree@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Samuel Holland" <samuel@sholland.org>
Subject: ASoC: Question regarding device-tree multi-lane I2S for Allwinner SoC
Date: Sun, 1 Nov 2020 18:30:15 +0100	[thread overview]
Message-ID: <CAJiuCcfBOHhniDQOaB8ixU0pY9u0GVivkj7po-kozBV8LqmB6A@mail.gmail.com> (raw)

Hi device-tree and sound Maintainers,

I have a question regarding multi-lane i2S representation.

On the Allwinner SoC the I2S/PCM Interface can handle up to four lanes
as output or input.
For each lane we can enable up to sixteen slots.
And for each output slot we can choose which slot to map.

The only representation I found is for Amlogic device-tree they did
the following sound node :
/* 8ch hdmi interface */
dai-link-7 {
    sound-dai = <&tdmif_b>;
    dai-format = "i2s";
    dai-tdm-slot-tx-mask-0 = <1 1>;
    dai-tdm-slot-tx-mask-1 = <1 1>;
    dai-tdm-slot-tx-mask-2 = <1 1>;
    dai-tdm-slot-tx-mask-3 = <1 1>;
    mclk-fs = <256>;

    codec {
        sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
    };
};

This kind of representation gives the information that 2 slots should
be enabled as TX per lane but don't give which slot to map.
I was thinking about a representation per lane but maybe it's a bit
complicated  ?

    dai-format = "dsp_a";
    dai-tdm-slot-width = <32>;
    // Lane 0 : Output 8 channels 0-7 using TDM
    dai-tdm-slot-tx-mask-0 = <1 1 1 1 1 1 1 1>;
    dai-tdm-slot-chmap-0 = <0 1 2 3 4 5 6 7>;
    // Lane 1 : Output 3 channels 5-7 using TDM
    dai-tdm-slot-tx-mask-1 = <1 1 1>;
    dai-tdm-slot-chmap-1 = <5 6 7>;

I will only start to support HDMI, so 4 I2S lanes for now it should
look like this

    dai-format = "i2s";
    dai-tdm-slot-width = <32>;
    frame-inversion;
    // Lane 0 : Output channels 0,1
    dai-tdm-slot-tx-mask-0 = <1 1>;
    dai-tdm-slot-chmap-0 = <0 1>;
    // Lane 1: Output channels 2,3
    dai-tdm-slot-tx-mask-1 = <1 1>;
    dai-tdm-slot-chmap-1 = <2 3>;
    // Lane 2: Output channels 4,5
    dai-tdm-slot-tx-mask-2 = <1 1>;
    dai-tdm-slot-chmap-2 = <4 5>;
    // Lane 3: Output channels 6,7
    dai-tdm-slot-tx-mask-3 = <1 1>;
    dai-tdm-slot-chmap-3 = <6 7>;

What do you think? Do you have any remark / idea about this ?

Thanks for your help
Clement

             reply	other threads:[~2020-11-01 17:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-01 17:30 Clément Péron [this message]
2020-11-09 21:15 ` ASoC: Question regarding device-tree multi-lane I2S for Allwinner SoC Mark Brown

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=CAJiuCcfBOHhniDQOaB8ixU0pY9u0GVivkj7po-kozBV8LqmB6A@mail.gmail.com \
    --to=peron.clem@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=codekipper@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jernej.skrabec@siol.net \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=perex@perex.cz \
    --cc=robh+dt@kernel.org \
    --cc=samuel@sholland.org \
    --cc=tiwai@suse.com \
    --cc=wens@csie.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;
as well as URLs for NNTP newsgroup(s).