From: Hongyang Zhao <hongyang.zhao@thundersoft.com>
To: mohammad.rafi.shaik@oss.qualcomm.com
Cc: andersson@kernel.org, broonie@kernel.org, conor+dt@kernel.org,
devicetree@vger.kernel.org, dmitry.baryshkov@oss.qualcomm.com,
drake@endlessm.com, hongyang.zhao@thundersoft.com,
katsuhiro@katsuster.net, konradybcio@kernel.org,
krzk+dt@kernel.org, lgirdwood@gmail.com,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-sound@vger.kernel.org, matteomartelli3@gmail.com,
neil.armstrong@linaro.org, perex@perex.cz, robh@kernel.org,
rosh@debian.org, srini@kernel.org, tiwai@suse.com,
zhoubinbin@loongson.cn
Subject: Re: [PATCH v2 5/6] ASoC: qcom: sc8280xp: Add RubikPi 3 sound card support
Date: Thu, 16 Jul 2026 17:15:48 +0800 [thread overview]
Message-ID: <20260716091548.2844369-1-hongyang.zhao@thundersoft.com> (raw)
In-Reply-To: <847396bb-2cc1-4f45-bd81-33ab55d3af6f@oss.qualcomm.com>
Hi Rafi,
Thank you for the review.
> On 7/15/2026 7:32 PM, Hongyang Zhao wrote:
> > RubikPi 3 connects an ES8316 codec to the primary MI2S interface for
> > headset playback and capture, and an LT9611 bridge to the quaternary
> > MI2S interface for HDMI audio.
> >
> > Add board-specific DAI data for these links. Configure both directions
> > of the primary interface for I2S with normal clock polarity and the
> > codec as bit and frame clock consumer. Program the LPASS MCLK and BCLK,
> > drive the ES8316 with its required 19.2 MHz MCLK, and enable the generic
> > codec jack-detection setup on the playback link.
> >
> > Configure the quaternary playback link with the same I2S clock format.
> > Do not request a codec sysclk for this link because the LT9611 HDMI
> > codec DAI does not implement set_sysclk().
> >
> > Select this configuration through the RubikPi 3 sound-card compatible.
> >
> > Signed-off-by: Hongyang Zhao <hongyang.zhao@thundersoft.com>
> > ---
> > sound/soc/qcom/sc8280xp.c | 39 +++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 39 insertions(+)
> >
> > diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
> > index 885ec1e3e575..1354eecb56c9 100644
> > --- a/sound/soc/qcom/sc8280xp.c
> > +++ b/sound/soc/qcom/sc8280xp.c
> > @@ -410,6 +410,41 @@ static const struct snd_soc_common qcs6490_priv_data = {
> > }),
> > };
> >
> > +static const struct snd_soc_common qcs6490_rubikpi3_priv_data = {
> > + .driver_name = "qcs6490",
> > + .dapm_widgets = sc8280xp_dapm_widgets,
> > + .num_dapm_widgets = ARRAY_SIZE(sc8280xp_dapm_widgets),
> > + SC8280XP_DAI_DATA(
>
> Where is SC8280XP_DAI_DATA() defined?
It is introduced by the preceding patch 4/6.
https://lore.kernel.org/linux-arm-msm/20260715-rubikpi-next-20260605-v2-4-67601d7a8581@thundersoft.com/
It initializes snd_soc_common::dai_data with an array of
struct sc8280xp_dai_data and sets num_dai_data.
Patch 4/6 reached the mailing list after your reply, so the definition
was not visible when you reviewed this patch.
>
> > + {
> > + .id = PRIMARY_MI2S_RX,
> > + .codec_dai_fmt = SND_SOC_DAIFMT_I2S |
> > + SND_SOC_DAIFMT_NB_NF |
> > + SND_SOC_DAIFMT_BC_FC,
>
> codec_dai_fmt appears to be identical for all MI2S DAIs. Can this be
> moved into the common initialization path instead of being specified per
> DAI.
>
> > + .mclk_rate = 19200000,
>
> Is this mclk frequency fixed ?
>
> Typically, audio MCLK is expected to be 12.288 MHz or 24.576 MHz.
Yes. The RubikPi 3 machine configuration intentionally sets the ES8316
sysclk to 19.2 MHz. At the fixed 48 kHz backend rate this gives an
MCLK/LRCK ratio of 400, which is explicitly supported and documented by
the ES8316 driver.
>
> > + .codec_sysclk_set = true,
> > + .mi2s_mclk_enable = true,
>
> Drop this mclk_enable flag; your already enabled from the codec node.
>
> is not ?
Agreed. The ES8316 codec node is now the only MCLK consumer. The Primary
MI2S RX and TX CPU backends only configure BCLK. The machine driver
still calls the ES8316 set_sysclk() operation with 19.2 MHz to set the
clock rate and sample-rate constraints, but it no longer enables MCLK
through the CPU DAI.
>
> +&i2c0 {
> + status = "okay";
> +
> + es8316: audio-codec@11 {
> + compatible = "everest,es8316";
> + reg = <0x11>;
> + #sound-dai-cells = <0>;
> +
> + clocks = <&q6prmcc LPASS_CLK_ID_MCLK_1 LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
> + clock-names = "mclk";
> +
>
> > + .mi2s_bclk_enable = true,
> > + .jack_setup = SC8280XP_JACK_SETUP_CODEC,
>
> .jack_setup is not part of snd_soc_common
jack_setup is a member of struct sc8280xp_dai_data, introduced in 4/6.
SC8280XP_DAI_DATA() places these entries in snd_soc_common::dai_data.
This was also obscured by patch 4/6 arriving after your review.
>
> Best regards,
> Rafi
>
> > + },
> > + {
> > + .id = PRIMARY_MI2S_TX,
> > + .codec_dai_fmt = SND_SOC_DAIFMT_I2S |
> > + SND_SOC_DAIFMT_NB_NF |
> > + SND_SOC_DAIFMT_BC_FC,
> > + .mclk_rate = 19200000,
> > + .codec_sysclk_set = true,
> > + .mi2s_mclk_enable = true,
> > + .mi2s_bclk_enable = true,
> > + },
> > + {
> > + .id = QUATERNARY_MI2S_RX,
> > + .codec_dai_fmt = SND_SOC_DAIFMT_I2S |
> > + SND_SOC_DAIFMT_NB_NF |
> > + SND_SOC_DAIFMT_BC_FC,
> > + }
> > + ),
> > +};
> > +
> > static const struct snd_soc_common qcs8275_priv_data = {
> > .driver_name = "qcs8300",
> > .dapm_widgets = sc8280xp_dapm_widgets,
> > @@ -480,6 +515,10 @@ static const struct of_device_id snd_sc8280xp_dt_match[] = {
> > { .compatible = "qcom,sm8550-sndcard", .data = &sm8550_priv_data },
> > { .compatible = "qcom,sm8650-sndcard", .data = &sm8650_priv_data },
> > { .compatible = "qcom,sm8750-sndcard", .data = &sm8750_priv_data },
> > + {
> > + .compatible = "thundercomm,qcs6490-rubikpi3-sndcard",
> > + .data = &qcs6490_rubikpi3_priv_data,
> > + },
> > {}
> > };
> >
> >
Best regards,
Hongyang
next prev parent reply other threads:[~2026-07-16 11:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 14:02 [PATCH v2 0/6] Add audio support for QCS6490 RubikPi3 Hongyang Zhao
2026-07-15 14:02 ` [PATCH v2 1/6] ASoC: dt-bindings: es8316: Document jack detect inversion Hongyang Zhao
2026-07-15 14:02 ` [PATCH v2 2/6] ASoC: dt-bindings: qcom,sm8250: Add RubikPi 3 sound card Hongyang Zhao
2026-07-15 14:02 ` [PATCH v2 3/6] ASoC: qcom: common: Add generic headset jack helpers Hongyang Zhao
2026-07-15 14:02 ` [PATCH v2 4/6] ASoC: qcom: sc8280xp: Add per-DAI board configuration Hongyang Zhao
2026-07-15 14:02 ` [PATCH v2 5/6] ASoC: qcom: sc8280xp: Add RubikPi 3 sound card support Hongyang Zhao
2026-07-15 18:08 ` Mohammad Rafi Shaik
2026-07-16 9:15 ` Hongyang Zhao [this message]
2026-07-15 14:02 ` [PATCH v2 6/6] arm64: dts: qcom: qcs6490-rubikpi3: Add audio support Hongyang Zhao
2026-07-15 18:17 ` Mohammad Rafi Shaik
2026-07-16 9:52 ` Hongyang Zhao
2026-07-16 8:11 ` [PATCH v2 0/6] Add audio support for QCS6490 RubikPi3 Krzysztof Kozlowski
2026-07-16 8:46 ` Hongyang Zhao
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=20260716091548.2844369-1-hongyang.zhao@thundersoft.com \
--to=hongyang.zhao@thundersoft.com \
--cc=andersson@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=drake@endlessm.com \
--cc=katsuhiro@katsuster.net \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=matteomartelli3@gmail.com \
--cc=mohammad.rafi.shaik@oss.qualcomm.com \
--cc=neil.armstrong@linaro.org \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=rosh@debian.org \
--cc=srini@kernel.org \
--cc=tiwai@suse.com \
--cc=zhoubinbin@loongson.cn \
/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