From: Srinivas Kandagatla <srini@kernel.org>
To: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>,
Srinivas Kandagatla <srini@kernel.org>,
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>
Cc: linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
Subject: Re: [PATCH v1 2/2] ASoC: qcom: sc8280xp: add Shikra EVK machine variants
Date: Thu, 18 Jun 2026 22:34:20 +0100 [thread overview]
Message-ID: <cd8da4f2-e6f2-4ad0-b9c6-952af9e1aa11@kernel.org> (raw)
In-Reply-To: <20260611112946.954172-3-ajay.nandam@oss.qualcomm.com>
On 6/11/26 12:29 PM, Ajay Kumar Nandam wrote:
> Add machine-driver support for Qualcomm Shikra EVK variants by matching
> dedicated compatible strings and applying board-specific audio behavior.
>
> Shikra platforms are available as CQM, CQS, and IQS variants with
> different audio components and processing architectures:
>
> - CQM/CQS use an I2S-based path with WSA885x amplifiers and
> PM4125 + Rouleur codec components.
> - CQM runs in DSP-bypass mode, where the complete audio pipeline runs
> on CPU only and no DSP is involved.
This patch is doing too many things you need to seperate them in to
seperate patches.
> - CQS uses modem-DSP based audio processing.
> - IQS uses a third-party MAX98091 codec with modem-DSP support.
>
> Introduce variant-specific handling so codec controls, DAPM widgets, and
> clock programming match the board design and avoid invalid clock setup on
> variants where it is not applicable.
>
> Co-developed-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
> Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
> ---
> sound/soc/qcom/common.c | 2 ++
> sound/soc/qcom/sc8280xp.c | 58 +++++++++++++++++++++++++++++++++++++--
> sound/soc/qcom/sdw.c | 3 ++
> 3 files changed, 61 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c
> index f42c98ded..32d6c09b2 100644
> --- a/sound/soc/qcom/common.c
> +++ b/sound/soc/qcom/common.c
> @@ -3,6 +3,7 @@
> // Copyright (c) 2018, The Linux Foundation. All rights reserved.
>
> #include <dt-bindings/sound/qcom,q6afe.h>
> +#include <dt-bindings/sound/qcom,qaif.h>
> #include <linux/module.h>
> #include <sound/jack.h>
> #include <linux/input-event-codes.h>
> @@ -430,6 +431,7 @@ int qcom_snd_wcd_jack_setup(struct snd_soc_pcm_runtime *rtd,
> }
>
> switch (cpu_dai->id) {
> + case QAIF_CDC_DMA_RX0:
> case TX_CODEC_DMA_TX_0:
> case TX_CODEC_DMA_TX_1:
> case TX_CODEC_DMA_TX_2:
> diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
> index e5d23e244..4c985f81c 100644
> --- a/sound/soc/qcom/sc8280xp.c
> +++ b/sound/soc/qcom/sc8280xp.c
> @@ -37,6 +37,25 @@ static struct snd_soc_dapm_widget sc8280xp_dapm_widgets[] = {
> SND_SOC_DAPM_SPK("DP7 Jack", NULL),
> };
>
> +static struct snd_soc_dapm_widget shikra_cqm_dapm_widgets[] = {
> + SND_SOC_DAPM_HP("Headphone Jack", NULL),
> + SND_SOC_DAPM_MIC("Mic Jack", NULL),
> +};
> +
> +static const struct snd_soc_dapm_widget shikra_iqs_dapm_widgets[] = {
> + SND_SOC_DAPM_HP("Headphone", NULL),
> + SND_SOC_DAPM_MIC("Headset Mic", NULL),
> + SND_SOC_DAPM_MIC("Int Mic", NULL),
> + SND_SOC_DAPM_SPK("Speaker", NULL),
> +};
> +
> +static const struct snd_kcontrol_new shikra_iqs_controls[] = {
> + SOC_DAPM_PIN_SWITCH("Headset Mic"),
> + SOC_DAPM_PIN_SWITCH("Headphone"),
> + SOC_DAPM_PIN_SWITCH("Int Mic"),
> + SOC_DAPM_PIN_SWITCH("Speaker"),
> +};
> +
> struct snd_soc_common {
> const char *driver_name;
> const struct snd_soc_dapm_widget *dapm_widgets;
> @@ -49,6 +68,7 @@ struct snd_soc_common {
> bool codec_sysclk_set;
> bool mi2s_mclk_enable;
> bool mi2s_bclk_enable;
> + bool dsp_bypass;
How is this related to this patch?
> };
>
> struct sc8280xp_snd_data {
> @@ -219,6 +239,10 @@ static int sc8280xp_snd_hw_params(struct snd_pcm_substream *substream,
> int mclk_freq = sc8280xp_get_mclk_freq(params);
> int bclk_freq = sc8280xp_get_bclk_freq(params);
>
> + /* Skip DSP configuration when operating in CPU-only (bypass) mode */
> + if (data->snd_soc_common_priv->dsp_bypass)
> + return 0;
> +
This has nothing to do with what this patch is doing.
> switch (cpu_dai->id) {
> case PRIMARY_MI2S_RX ... QUATERNARY_MI2S_TX:
> case QUINARY_MI2S_RX ... QUINARY_MI2S_TX:
> @@ -239,7 +263,7 @@ static int sc8280xp_snd_hw_params(struct snd_pcm_substream *substream,
> SND_SOC_CLOCK_IN);
>
> if (data->snd_soc_common_priv->codec_sysclk_set)
> - snd_soc_dai_set_sysclk(cpu_dai,
> + snd_soc_dai_set_sysclk(codec_dai,
this is not related to shikra support
> 0, mclk_freq,
> SND_SOC_CLOCK_IN);
> break;
> @@ -284,7 +308,7 @@ 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) {
> + if (link->no_pcm == 1 || link->num_codecs > 0) {
Looks like you are mixing multiple changes in single patch, please
seperate them.
> link->init = sc8280xp_snd_init;
> link->be_hw_params_fixup = sc8280xp_be_hw_params_fixup;
> link->ops = &sc8280xp_be_ops;
> @@ -375,6 +399,33 @@ static struct snd_soc_common sc8280xp_priv_data = {
> .num_dapm_widgets = ARRAY_SIZE(sc8280xp_dapm_widgets),
> };
>
> +static const struct snd_soc_common shikra_cqm_priv_data = {
> + .driver_name = "shikra",
> + .dapm_widgets = shikra_cqm_dapm_widgets,
> + .num_dapm_widgets = ARRAY_SIZE(shikra_cqm_dapm_widgets),
> + .dsp_bypass = true,
> +};
> +
> +static const struct snd_soc_common shikra_cqs_priv_data = {
> + .driver_name = "shikra",
> + .dapm_widgets = shikra_cqm_dapm_widgets,
> + .num_dapm_widgets = ARRAY_SIZE(shikra_cqm_dapm_widgets),
> + .mi2s_bclk_enable = true,
> + .codec_sysclk_set = true,
> +};
> +
> +static const struct snd_soc_common shikra_iqs_priv_data = {
> + .driver_name = "shikra",
> + .dapm_widgets = shikra_iqs_dapm_widgets,
> + .num_dapm_widgets = ARRAY_SIZE(shikra_iqs_dapm_widgets),
> + .controls = shikra_iqs_controls,
> + .num_controls = ARRAY_SIZE(shikra_iqs_controls),
> + .codec_dai_fmt = SND_SOC_DAIFMT_CBP_CFP |
> + SND_SOC_DAIFMT_NB_NF |
> + SND_SOC_DAIFMT_I2S,
> + .codec_sysclk_set = true,
> + .mi2s_bclk_enable = true,
> +};
> +
> static struct snd_soc_common sm8450_priv_data = {
> .driver_name = "sm8450",
> .dapm_widgets = sc8280xp_dapm_widgets,
> @@ -408,6 +459,9 @@ static const struct of_device_id snd_sc8280xp_dt_match[] = {
> {.compatible = "qcom,qcs9075-sndcard", .data = &qcs9100_priv_data},
> {.compatible = "qcom,qcs9100-sndcard", .data = &qcs9100_priv_data},
> {.compatible = "qcom,sc8280xp-sndcard", .data = &sc8280xp_priv_data},
> + {.compatible = "qcom,shikra-cqm-sndcard", .data = &shikra_cqm_priv_data},
> + {.compatible = "qcom,shikra-cqs-sndcard", .data = &shikra_cqs_priv_data},
> + {.compatible = "qcom,shikra-iqs-sndcard", .data = &shikra_iqs_priv_data},
> {.compatible = "qcom,sm8450-sndcard", .data = &sm8450_priv_data},
> {.compatible = "qcom,sm8550-sndcard", .data = &sm8550_priv_data},
> {.compatible = "qcom,sm8650-sndcard", .data = &sm8650_priv_data},
> diff --git a/sound/soc/qcom/sdw.c b/sound/soc/qcom/sdw.c
> index 6576b47a4..0be743cec 100644
> --- a/sound/soc/qcom/sdw.c
> +++ b/sound/soc/qcom/sdw.c
> @@ -4,6 +4,7 @@
>
> #include <dt-bindings/sound/qcom,lpass.h>
> #include <dt-bindings/sound/qcom,q6afe.h>
> +#include <dt-bindings/sound/qcom,qaif.h>
> #include <linux/module.h>
> #include <sound/soc.h>
> #include "sdw.h"
> @@ -41,6 +42,8 @@ static bool qcom_snd_is_sdw_dai(int id)
> switch (id) {
> case LPASS_CDC_DMA_TX3:
> case LPASS_CDC_DMA_RX0:
> + case QAIF_CDC_DMA_VA_TX0:
> + case QAIF_CDC_DMA_RX0:
> return true;
> default:
> break;
next prev parent reply other threads:[~2026-06-18 21:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 11:29 [PATCH v1 0/2] ASoC: qcom: Shikra machine driver and DT binding support Ajay Kumar Nandam
2026-06-11 11:29 ` [PATCH v1 1/2] ASoC: dt-bindings: qcom,sm8250: add Shikra sound card compatibles Ajay Kumar Nandam
2026-06-13 10:34 ` Krzysztof Kozlowski
2026-06-11 11:29 ` [PATCH v1 2/2] ASoC: qcom: sc8280xp: add Shikra EVK machine variants Ajay Kumar Nandam
2026-06-11 23:16 ` Dmitry Baryshkov
2026-07-09 8:32 ` Ajay Kumar Nandam
2026-06-18 21:34 ` Srinivas Kandagatla [this message]
2026-07-09 8:36 ` Ajay Kumar Nandam
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=cd8da4f2-e6f2-4ad0-b9c6-952af9e1aa11@kernel.org \
--to=srini@kernel.org \
--cc=ajay.nandam@oss.qualcomm.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.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=mohammad.rafi.shaik@oss.qualcomm.com \
--cc=robh@kernel.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