From: Neil Armstrong <neil.armstrong@linaro.org>
To: sashiko-reviews@lists.linux.dev
Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH RFC 19/23] ASoC: qcom: sc8280xp: allow using the sc8280xp card with lpass-cpu
Date: Mon, 16 Nov 2026 09:01:47 +0100 [thread overview]
Message-ID: <4810f117-3003-45dd-9b57-d7e400c50560@linaro.org> (raw)
In-Reply-To: <sashiko-outbox-213522@kernel.org>
On 11/13/26 20:12, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 3 potential
> issues to consider:
> - [High] ASoC: qcom: sc8280xp: DAI ID collision in
> sc8280xp_snd_hw_params()
> - [Medium] ASoC: qcom: sc8280xp: DAI ID collision in
> sc8280xp_be_hw_params_fixup()
> - [Medium] ASoC: qcom: sc8280xp: missing lpass-cpu jack DAI IDs in
> sc8280xp_snd_init()
> --
>
> commit 3e03c7d28b8733d89a72bc91c60e7c4086af115e
> Author: Neil Armstrong <neil.armstrong@linaro.org>
>
> ASoC: qcom: sc8280xp: allow using the sc8280xp card with lpass-cpu
>
> This commit adds LPASS Codec DMA DAI IDs and attaches DAI link callbacks
> unconditionally so the sc8280xp machine driver can be used with
> lpass-cpu DAI links.
>
>> diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
>> index 8cc75a7ad866d..ff57fb9051a26 100644
>> --- a/sound/soc/qcom/sc8280xp.c
>> +++ b/sound/soc/qcom/sc8280xp.c
>
> [ ... ]
>
>> @@ -242,6 +243,8 @@ static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd)
>> switch (cpu_dai->id) {
>> case WSA_CODEC_DMA_RX_0:
>> case WSA_CODEC_DMA_RX_1:
>> + case LPASS_CDC_DMA_WSA_RX0:
>> + case LPASS_CDC_DMA_WSA_RX1:
>> /*
>> * Set limit of -3 dB on Digital Volume and 0 dB on PA Volume
>> * to reduce the risk of speaker damage until we have active
>
> [Severity: Medium]
> Does switching on cpu_dai->id here without checking rtd->dai_link->no_pcm
> collide with Q6DSP TDM DAI IDs, while leaving DisplayPort and WCD headset
> jack setup broken on lpass-cpu links?
>
> LPASS_CDC_DMA_WSA_RX0 and LPASS_CDC_DMA_WSA_RX1 (36 and 37) have the same
> values as PRIMARY_TDM_RX_6 and PRIMARY_TDM_TX_6 on AudioReach DPCM links.
> Meanwhile, for lpass-cpu links, LPASS_DP_RX is missing from the
> DisplayPort cases below (skipping qcom_snd_dp_jack_setup()), and
> qcom_snd_wcd_jack_setup() only attaches the jack to the codec component
> for LPI_MI2S_RX_0 and TX_CODEC_DMA_TX_0..3, ignoring
> LPASS_CDC_DMA_TX0..3.
Thanks for the analysys, will try to fix it
>
>> @@ -323,6 +326,10 @@ static int sc8280xp_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
>> }
>> break;
>> }
>> + case LPASS_CDC_DMA_TX0:
>> + case LPASS_CDC_DMA_TX1:
>> + case LPASS_CDC_DMA_TX2:
>> + case LPASS_CDC_DMA_TX3:
>> case TX_CODEC_DMA_TX_0:
>> case TX_CODEC_DMA_TX_1:
>> case TX_CODEC_DMA_TX_2:
>
> [Severity: Medium]
> Does adding LPASS_CDC_DMA_TX0..LPASS_CDC_DMA_TX3 to
> sc8280xp_be_hw_params_fixup() alter PRIMARY_MI2S and SECONDARY_MI2S DPCM
> backends instead of affecting lpass-cpu links?
>
> In sc8280xp_add_be_ops(), sc8280xp_be_hw_params_fixup() is only wired up
> when link->no_pcm == 1 (AudioReach DPCM backend links), so it never runs
> on non-DPCM lpass-cpu links. On DPCM links where it does run,
> LPASS_CDC_DMA_TX0..LPASS_CDC_DMA_TX3 (16..19) alias PRIMARY_MI2S_RX,
> PRIMARY_MI2S_TX, SECONDARY_MI2S_RX and SECONDARY_MI2S_TX (16..19),
> changing their minimum channel constraint from 2 to 1.
>
Right, I'll try to fix that properly
>> @@ -533,12 +540,11 @@ static void sc8280xp_add_be_ops(struct snd_soc_card *card)
>> int i;
>>
>> for_each_card_prelinks(card, i, link) {
>> - if (link->no_pcm == 1) {
>> - link->init = sc8280xp_snd_init;
>> - link->exit = sc8280xp_snd_exit;
>> + link->init = sc8280xp_snd_init;
>> + link->exit = sc8280xp_snd_exit;
>> + link->ops = &sc8280xp_be_ops;
>> + if (link->no_pcm == 1)
>> link->be_hw_params_fixup = sc8280xp_be_hw_params_fixup;
>> - link->ops = &sc8280xp_be_ops;
>> - }
>> }
>> }
>
> [Severity: High]
> When sc8280xp_be_ops is attached to non-DPCM lpass-cpu links, does
> sc8280xp_snd_hw_params() misidentify LPASS_CDC_DMA_TX0..7 as MI2S DAIs
> and fail stream setup with -ENOTSUPP?
>
> sound/soc/qcom/sc8280xp.c:sc8280xp_snd_hw_params() {
> ...
> switch (cpu_dai->id) {
> case PRIMARY_MI2S_RX ... QUATERNARY_MI2S_TX:
> ...
> if (mi2s_mclk_enable) {
> ret = snd_soc_dai_set_sysclk(cpu_dai,
> LPAIF_MI2S_MCLK, mclk_freq,
> SND_SOC_CLOCK_OUT);
> if (ret)
> return ret;
> }
> ...
> case PRIMARY_TDM_RX_0 ... QUINARY_TDM_TX_7:
> case AIF_TDM_RX_0 ... AIF_TDM_TX_12:
> return sc8280xp_tdm_hw_params(substream, params);
> ...
> }
>
> LPASS_CDC_DMA_TX0..LPASS_CDC_DMA_TX7 (16..23) share the same numeric IDs
> as PRIMARY_MI2S_RX..QUATERNARY_MI2S_TX (16..23). On platforms such as
> sm8650 where mi2s_mclk_enable and mi2s_bclk_enable are set in
> sm8650_priv_data, starting a capture stream on LPASS_CDC_DMA_TX0..7 calls
> snd_soc_dai_set_sysclk() on the LPASS Codec DMA DAI, which does not
> implement .set_sysclk and returns -ENOTSUPP.
>
> Conversely, actual lpass-cpu MI2S DAI IDs do not match the Q6DSP MI2S
> ranges: MI2S_PRIMARY..MI2S_QUINARY (0..4) hit the default case and skip
> format and clock setup, while MI2S_SENARY..MI2S_SEPTENARY (34..35) fall
> into PRIMARY_TDM_RX_0..QUINARY_TDM_TX_7 (24..103) and are routed to
> sc8280xp_tdm_hw_params().
>
Hmm, yeah this is quite a regression, I'll try fix it
next prev parent reply other threads:[~2026-11-16 8:01 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 18:38 [PATCH RFC 00/23] arm64: qcom: enable SM8650 audio without ADSP firmware Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 01/23] dt-bindings: clock: qcom: add SM8650 LPASS core & audio clock controllers Neil Armstrong
2026-11-13 18:57 ` sashiko-bot
2026-11-16 7:41 ` Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 02/23] clk: " Neil Armstrong
2026-11-13 19:14 ` sashiko-bot
2026-11-16 7:44 ` Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 03/23] dt-bindings: pinctrl: qcom,sm8650-lpass-lpi-pinctrl: document clocks and power domaines when ADSP is not used Neil Armstrong
2026-11-13 19:02 ` sashiko-bot
2026-11-16 7:45 ` Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 04/23] ASoC: dt-bindings: qcom,lpass: add Senary & Septenary MI2S ids Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 05/23] ASoC: dt-bindings: qcom,lpass: add WSA RX and TX channels ids Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 06/23] ASoC: dt-bindings: qcom,lpass-*-macro: document less clock when ADSP is not used Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 07/23] ASoC: dt-bindings: qcom,lpass-cpu: document the SM8650 LPASS Neil Armstrong
2026-11-13 18:57 ` sashiko-bot
2026-11-16 7:45 ` Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 08/23] ASoC: qcom: lpass-cpu: get the optional codec_mem3 clock Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 09/23] ASoC: qcom: lpass: add support for optional WSA interface Neil Armstrong
2026-11-13 19:11 ` sashiko-bot
2026-11-16 7:49 ` Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 10/23] ASoC: qcom: lpass-cdc-dma: add support for WSA codec DMA Neil Armstrong
2026-11-13 19:07 ` sashiko-bot
2026-11-16 7:50 ` Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 11/23] ASoC: qcom: lpass: prepare to handle multiple lpaifs for i2s Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 12/23] ASoC: qcom: lpass: add support for MI2S_SENARY & MI2S_SEPTENARY Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 13/23] ASoC: qcom: lpass: support mapping I2S ports to multiple LPAIFs Neil Armstrong
2026-11-13 19:04 ` sashiko-bot
2026-11-16 7:51 ` Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 14/23] ASoC: qcom: lpass: support LPM memory type for I2S LPAIFs Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 15/23] ASoC: qcom: lpass: allocate LPM buffer memory to DAIs Neil Armstrong
2026-11-13 19:12 ` sashiko-bot
2026-11-16 7:56 ` Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 16/23] ASoC: qcom: lpass: enable the right codec_mem clock when usin LPM memory Neil Armstrong
2026-11-13 19:06 ` sashiko-bot
2026-11-16 7:58 ` Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 17/23] ASoC: qcom: add SM8650 LPASS CPU driver Neil Armstrong
2026-11-13 19:22 ` sashiko-bot
2026-11-16 7:59 ` Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 18/23] ASoC: qcom: swd: allow LPASS_CDC_DMA_WSA_RX0 as soundwire dai Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 19/23] ASoC: qcom: sc8280xp: allow using the sc8280xp card with lpass-cpu Neil Armstrong
2026-11-13 19:12 ` sashiko-bot
2026-11-16 8:01 ` Neil Armstrong [this message]
2026-11-13 18:38 ` [PATCH RFC 20/23] arm64: dts: qcom: sm8650: move EL1 Gunyah nodes to sm8650-el1.dtsi Neil Armstrong
2026-11-13 19:08 ` Val Packett
2026-11-16 7:40 ` Neil Armstrong
2026-11-13 19:11 ` sashiko-bot
2026-11-16 8:02 ` Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 21/23] arm64: dts: qcom: add SM8650 LPASS CPU dtsi Neil Armstrong
2026-11-13 19:18 ` sashiko-bot
2026-11-16 8:04 ` Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 22/23] arm64: dts: qcom: sm8650-valve-deckard: enable audio Neil Armstrong
2026-11-13 19:23 ` sashiko-bot
2026-11-16 8:05 ` Neil Armstrong
2026-11-13 18:38 ` [PATCH RFC 23/23] arm64: defconfig: enable the SM8650 LPASS CPU driver Neil Armstrong
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=4810f117-3003-45dd-9b57-d7e400c50560@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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