mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiebing Chen <jiebing.chen@amlogic.com>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org,
	jian.xu@amlogic.com, shuai.li@amlogic.com, zhe.wang@amlogic.com
Subject: Re: [PATCH v7 3/5] ASoC: meson: g12a-toacodec: Add S4 tocodec driver
Date: Thu, 22 Oct 2026 10:24:19 +0800	[thread overview]
Message-ID: <83bb17dc-49e2-437f-a55f-3f8a5e77c5f4@amlogic.com> (raw)
In-Reply-To: <179259528986.4070168.179126639869298765.b4-review@b4>


在 2026/10/21 23:08, Jerome Brunet 写道:
> [ EXTERNAL EMAIL ]
>
>> The S4 requires additional clock control bits to be turn on while enabled.
>> The S4 has 8 TDM lanes, instead of 4 on previous SoC.
>> Update the widget accordingly.
>>
>> Signed-off-by: Jiebing Chen <jiebing.chen@amlogic.com>
>> ---
>>   sound/soc/meson/g12a-toacodec.c | 49 +++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 49 insertions(+)
>>
>> diff --git a/sound/soc/meson/g12a-toacodec.c b/sound/soc/meson/g12a-toacodec.c
>> index 21941ee552c5..9cfed3702354 100644
>> --- a/sound/soc/meson/g12a-toacodec.c
>> +++ b/sound/soc/meson/g12a-toacodec.c
>> @@ -41,6 +41,9 @@
>>   #define  CTRL0_BCLK_SEL_LSB          4
>>   #define  CTRL0_MCLK_SEL                      GENMASK(2, 0)
>>
>> +#define CTRL0_BCLK_ENABLE_SHIFT              30
>> +#define CTRL0_MCLK_ENABLE_SHIFT              29
> Please follow the indentation convention in place (2 spaces)
Noted with thanks
>
>> +
>>   #define TOACODEC_OUT_CHMAX           2
>>
>>   struct g12a_toacodec {
>> @@ -141,6 +144,16 @@ static const struct snd_soc_dapm_widget sm1_toacodec_widgets[] = {
>>                            &g12a_toacodec_out_enable),
>>   };
>>
>> +static const struct snd_soc_dapm_widget s4_toacodec_widgets[] = {
>> +     SND_SOC_DAPM_MUX("SRC", SND_SOC_NOPM, 0, 0,
>> +                      &sm1_toacodec_mux),
>> +     SND_SOC_DAPM_SWITCH("OUT EN", SND_SOC_NOPM, 0, 0,
>> +                         &g12a_toacodec_out_enable),
>> +     SND_SOC_DAPM_SUPPLY("I2S BCLK Gate", TOACODEC_CTRL0, CTRL0_BCLK_ENABLE_SHIFT, 0, NULL, 0),
>> +     SND_SOC_DAPM_SUPPLY("I2S MCLK Gate", TOACODEC_CTRL0, CTRL0_MCLK_ENABLE_SHIFT, 0, NULL, 0),
> BCLK Gate => BCLK EN, same for MCLK
Thanks for pointing this out. I’ll fix it.
>
>> +
>> +};
>> +
>>   static int g12a_toacodec_input_hw_params(struct snd_pcm_substream *substream,
>>                                         struct snd_pcm_hw_params *params,
>>                                         struct snd_soc_dai *dai)
>> @@ -226,6 +239,16 @@ static const struct snd_soc_dapm_route g12a_toacodec_routes[] = {
>>        { "OUT Capture", NULL, "OUT EN" },
>>   };
>>
>> +static const struct snd_soc_dapm_route s4_toacodec_routes[] = {
>> +     { "SRC", "I2S A", "IN A Playback" },
>> +     { "SRC", "I2S B", "IN B Playback" },
>> +     { "SRC", "I2S C", "IN C Playback" },
>> +     { "OUT EN", "Switch", "SRC" },
>> +     { "OUT Capture", NULL, "OUT EN" },
>> +     { "OUT EN", NULL, "I2S BCLK Gate" },
>> +     { "I2S BCLK Gate", NULL, "I2S MCLK Gate" },
> Audio signal does not go through those Gate elements
> They should be supply path connected to OUT EN.
Thanks for your guidance. Is it correct to use the method below?

  {"OUT EN", NULL, "I2S BCLK EN" },
  {"OUT EN", NULL, "I2S MCLK EN" },

>
> --
> Jerome
>

  reply	other threads:[~2026-10-22  2:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21  7:08 [PATCH v7 0/5] Add support for S4 audio Jiebing Chen via B4 Relay
2026-10-21  7:08 ` [PATCH v7 1/5] dt-bindings: clock: meson: Add audio power domain for S4 soc Jiebing Chen via B4 Relay
2026-10-21  7:08 ` [PATCH v7 2/5] dt-bindings: Asoc: axg-audio: Add S4 audio tocodec Jiebing Chen via B4 Relay
2026-10-21  7:08 ` [PATCH v7 3/5] ASoC: meson: g12a-toacodec: Add S4 tocodec driver Jiebing Chen via B4 Relay
2026-10-21 15:08   ` Jerome Brunet
2026-10-22  2:24     ` Jiebing Chen [this message]
2026-10-21  7:08 ` [PATCH v7 4/5] clk: meson: axg_audio: add S4 support Jiebing Chen via B4 Relay
2026-10-21 15:08   ` Jerome Brunet
2026-10-21  7:08 ` [PATCH v7 5/5] arm64: dts: amlogic: Add Amlogic S4 Audio Jiebing Chen via B4 Relay
2026-10-21 15:08   ` Jerome Brunet
2026-10-22  2:54     ` Jiebing Chen

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=83bb17dc-49e2-437f-a55f-3f8a5e77c5f4@amlogic.com \
    --to=jiebing.chen@amlogic.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=jian.xu@amlogic.com \
    --cc=khilman@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mturquette@baylibre.com \
    --cc=neil.armstrong@linaro.org \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=shuai.li@amlogic.com \
    --cc=tiwai@suse.com \
    --cc=zhe.wang@amlogic.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 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®