* [PATCH v3 0/3] ASoC: qcom: Fix lpaif_type and DAI configuration for I2S interface
@ 2025-09-05 15:04 Mohammad Rafi Shaik
2025-09-05 15:04 ` [PATCH v3 1/3] ASoC: qcom: audioreach: Fix lpaif_type configuration for the " Mohammad Rafi Shaik
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Mohammad Rafi Shaik @ 2025-09-05 15:04 UTC (permalink / raw)
To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Pierre-Louis Bossart
Cc: linux-sound, linux-arm-msm, linux-kernel, stable, kernel,
prasad.kumpatla, ajay.nandam
Fix the lpaif_type configuration for the I2S interface.
The proper lpaif interface type required to allow DSP to vote
appropriate clock setting for I2S interface and also Fix the
CPU DAI format misconfiguration encountered during I2S
stream setup. Tested on Lemans evk platform.
changes in [v3]:
- Added Cc: <stable@vger.kernel.org>, suggested by Srinivas Kandagatla.
- Added QUINARY MI2S case in patch 3, suggested by Konrad.
- Link to V2: https://lore.kernel.org/lkml/20250905104020.2463473-1-mohammad.rafi.shaik@oss.qualcomm.com/
changes in [v2]:
- Used snd_soc_dai_set_fmt() API to set the current clock settings,
instead of the default WS source setting, as suggested by Srinivas Kandagatla.
- Link to V1: https://lore.kernel.org/lkml/20250822171440.2040324-1-mohammad.rafi.shaik@oss.qualcomm.com/
Mohammad Rafi Shaik (3):
ASoC: qcom: audioreach: Fix lpaif_type configuration for the I2S
interface
ASoC: qcom: q6apm-lpass-dais: Fix missing set_fmt DAI op for I2S
ASoC: qcom: sc8280xp: Fix DAI format setting for MI2S interfaces
sound/soc/qcom/qdsp6/audioreach.c | 1 +
sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 1 +
sound/soc/qcom/sc8280xp.c | 4 ++++
3 files changed, 6 insertions(+)
base-commit: be5d4872e528796df9d7425f2bd9b3893eb3a42c
--
2.34.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 1/3] ASoC: qcom: audioreach: Fix lpaif_type configuration for the I2S interface
2025-09-05 15:04 [PATCH v3 0/3] ASoC: qcom: Fix lpaif_type and DAI configuration for I2S interface Mohammad Rafi Shaik
@ 2025-09-05 15:04 ` Mohammad Rafi Shaik
2025-09-05 15:04 ` [PATCH v3 2/3] ASoC: qcom: q6apm-lpass-dais: Fix missing set_fmt DAI op for I2S Mohammad Rafi Shaik
2025-09-05 15:04 ` [PATCH v3 3/3] ASoC: qcom: sc8280xp: Fix DAI format setting for MI2S interfaces Mohammad Rafi Shaik
2 siblings, 0 replies; 6+ messages in thread
From: Mohammad Rafi Shaik @ 2025-09-05 15:04 UTC (permalink / raw)
To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Pierre-Louis Bossart
Cc: linux-sound, linux-arm-msm, linux-kernel, stable, kernel,
prasad.kumpatla, ajay.nandam, Srinivas Kandagatla
Fix missing lpaif_type configuration for the I2S interface.
The proper lpaif interface type required to allow DSP to vote
appropriate clock setting for I2S interface.
Fixes: 25ab80db6b133 ("ASoC: qdsp6: audioreach: add module configuration command helpers")
Cc: <stable@vger.kernel.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
---
sound/soc/qcom/qdsp6/audioreach.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audioreach.c
index bbfd51db8797..be21d5f6af8a 100644
--- a/sound/soc/qcom/qdsp6/audioreach.c
+++ b/sound/soc/qcom/qdsp6/audioreach.c
@@ -995,6 +995,7 @@ static int audioreach_i2s_set_media_format(struct q6apm_graph *graph,
param_data->param_id = PARAM_ID_I2S_INTF_CFG;
param_data->param_size = ic_sz - APM_MODULE_PARAM_DATA_SIZE;
+ intf_cfg->cfg.lpaif_type = module->hw_interface_type;
intf_cfg->cfg.intf_idx = module->hw_interface_idx;
intf_cfg->cfg.sd_line_idx = module->sd_line_idx;
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 2/3] ASoC: qcom: q6apm-lpass-dais: Fix missing set_fmt DAI op for I2S
2025-09-05 15:04 [PATCH v3 0/3] ASoC: qcom: Fix lpaif_type and DAI configuration for I2S interface Mohammad Rafi Shaik
2025-09-05 15:04 ` [PATCH v3 1/3] ASoC: qcom: audioreach: Fix lpaif_type configuration for the " Mohammad Rafi Shaik
@ 2025-09-05 15:04 ` Mohammad Rafi Shaik
2025-09-05 15:04 ` [PATCH v3 3/3] ASoC: qcom: sc8280xp: Fix DAI format setting for MI2S interfaces Mohammad Rafi Shaik
2 siblings, 0 replies; 6+ messages in thread
From: Mohammad Rafi Shaik @ 2025-09-05 15:04 UTC (permalink / raw)
To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Pierre-Louis Bossart
Cc: linux-sound, linux-arm-msm, linux-kernel, stable, kernel,
prasad.kumpatla, ajay.nandam, Srinivas Kandagatla
The q6i2s_set_fmt() function was defined but never linked into the
I2S DAI operations, resulting DAI format settings is being ignored
during stream setup. This change fixes the issue by properly linking
the .set_fmt handler within the DAI ops.
Fixes: 30ad723b93ade ("ASoC: qdsp6: audioreach: add q6apm lpass dai support")
Cc: <stable@vger.kernel.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
---
sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
index 20974f10406b..528756f1332b 100644
--- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
+++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
@@ -262,6 +262,7 @@ static const struct snd_soc_dai_ops q6i2s_ops = {
.shutdown = q6apm_lpass_dai_shutdown,
.set_channel_map = q6dma_set_channel_map,
.hw_params = q6dma_hw_params,
+ .set_fmt = q6i2s_set_fmt,
};
static const struct snd_soc_dai_ops q6hdmi_ops = {
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 3/3] ASoC: qcom: sc8280xp: Fix DAI format setting for MI2S interfaces
2025-09-05 15:04 [PATCH v3 0/3] ASoC: qcom: Fix lpaif_type and DAI configuration for I2S interface Mohammad Rafi Shaik
2025-09-05 15:04 ` [PATCH v3 1/3] ASoC: qcom: audioreach: Fix lpaif_type configuration for the " Mohammad Rafi Shaik
2025-09-05 15:04 ` [PATCH v3 2/3] ASoC: qcom: q6apm-lpass-dais: Fix missing set_fmt DAI op for I2S Mohammad Rafi Shaik
@ 2025-09-05 15:04 ` Mohammad Rafi Shaik
2025-09-07 10:00 ` Srinivas Kandagatla
2 siblings, 1 reply; 6+ messages in thread
From: Mohammad Rafi Shaik @ 2025-09-05 15:04 UTC (permalink / raw)
To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Pierre-Louis Bossart
Cc: linux-sound, linux-arm-msm, linux-kernel, stable, kernel,
prasad.kumpatla, ajay.nandam, Srinivas Kandagatla
The current implementation does not configure the CPU DAI format for
MI2S interfaces, resulting in -EIO errors during audio playback and
capture. This prevents the correct clock from being enabled for the
MI2S interface. Configure the required DAI format to enable proper
clock settings. Tested on Lemans evk platform.
Fixes: 295aeea6646ad ("ASoC: qcom: add machine driver for sc8280xp")
Cc: <stable@vger.kernel.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
---
sound/soc/qcom/sc8280xp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
index 73f9f82c4e25..3067b95bcdbb 100644
--- a/sound/soc/qcom/sc8280xp.c
+++ b/sound/soc/qcom/sc8280xp.c
@@ -32,6 +32,10 @@ static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd)
int dp_pcm_id = 0;
switch (cpu_dai->id) {
+ case PRIMARY_MI2S_RX...QUATERNARY_MI2S_TX:
+ case QUINARY_MI2S_RX...QUINARY_MI2S_TX:
+ snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_BP_FP);
+ break;
case WSA_CODEC_DMA_RX_0:
case WSA_CODEC_DMA_RX_1:
/*
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 3/3] ASoC: qcom: sc8280xp: Fix DAI format setting for MI2S interfaces
2025-09-05 15:04 ` [PATCH v3 3/3] ASoC: qcom: sc8280xp: Fix DAI format setting for MI2S interfaces Mohammad Rafi Shaik
@ 2025-09-07 10:00 ` Srinivas Kandagatla
2025-09-07 12:48 ` Mohammad Rafi Shaik
0 siblings, 1 reply; 6+ messages in thread
From: Srinivas Kandagatla @ 2025-09-07 10:00 UTC (permalink / raw)
To: Mohammad Rafi Shaik, Srinivas Kandagatla, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, Pierre-Louis Bossart
Cc: linux-sound, linux-arm-msm, linux-kernel, stable, kernel,
prasad.kumpatla, ajay.nandam
On 9/5/25 4:04 PM, Mohammad Rafi Shaik wrote:
> The current implementation does not configure the CPU DAI format for
> MI2S interfaces, resulting in -EIO errors during audio playback and
> capture. This prevents the correct clock from being enabled for the
> MI2S interface. Configure the required DAI format to enable proper
> clock settings. Tested on Lemans evk platform.
>
> Fixes: 295aeea6646ad ("ASoC: qcom: add machine driver for sc8280xp")
Am really not sure if this is a fix, because sc8280xp does not have any
Mi2S support. If you have added support for MI2S on any other platform
that uses sc8280xp machine driver, then that is the right fixes tag.
--srini
> Cc: <stable@vger.kernel.org>
> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
> ---
> sound/soc/qcom/sc8280xp.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
> index 73f9f82c4e25..3067b95bcdbb 100644
> --- a/sound/soc/qcom/sc8280xp.c
> +++ b/sound/soc/qcom/sc8280xp.c
> @@ -32,6 +32,10 @@ static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd)
> int dp_pcm_id = 0;
>
> switch (cpu_dai->id) {
> + case PRIMARY_MI2S_RX...QUATERNARY_MI2S_TX:
> + case QUINARY_MI2S_RX...QUINARY_MI2S_TX:
> + snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_BP_FP);
> + break;
> case WSA_CODEC_DMA_RX_0:
> case WSA_CODEC_DMA_RX_1:
> /*
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 3/3] ASoC: qcom: sc8280xp: Fix DAI format setting for MI2S interfaces
2025-09-07 10:00 ` Srinivas Kandagatla
@ 2025-09-07 12:48 ` Mohammad Rafi Shaik
0 siblings, 0 replies; 6+ messages in thread
From: Mohammad Rafi Shaik @ 2025-09-07 12:48 UTC (permalink / raw)
To: Srinivas Kandagatla, Srinivas Kandagatla, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, Pierre-Louis Bossart
Cc: linux-sound, linux-arm-msm, linux-kernel, stable, kernel,
prasad.kumpatla, ajay.nandam
On 9/7/2025 3:30 PM, Srinivas Kandagatla wrote:
> On 9/5/25 4:04 PM, Mohammad Rafi Shaik wrote:
>> The current implementation does not configure the CPU DAI format for
>> MI2S interfaces, resulting in -EIO errors during audio playback and
>> capture. This prevents the correct clock from being enabled for the
>> MI2S interface. Configure the required DAI format to enable proper
>> clock settings. Tested on Lemans evk platform.
>>
>> Fixes: 295aeea6646ad ("ASoC: qcom: add machine driver for sc8280xp")
>
> Am really not sure if this is a fix, because sc8280xp does not have any
> Mi2S support. If you have added support for MI2S on any other platform
> that uses sc8280xp machine driver, then that is the right fixes tag.
>
ACK.
You're right, thanks for the clarification.
I'll update the patch based on the inputs provided.
Thanks & Regards,
Rafi.
> --srini
>> Cc: <stable@vger.kernel.org>
>> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
>> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
>> ---
>> sound/soc/qcom/sc8280xp.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
>> index 73f9f82c4e25..3067b95bcdbb 100644
>> --- a/sound/soc/qcom/sc8280xp.c
>> +++ b/sound/soc/qcom/sc8280xp.c
>> @@ -32,6 +32,10 @@ static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd)
>> int dp_pcm_id = 0;
>>
>> switch (cpu_dai->id) {
>> + case PRIMARY_MI2S_RX...QUATERNARY_MI2S_TX:
>> + case QUINARY_MI2S_RX...QUINARY_MI2S_TX:
>> + snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_BP_FP);
>> + break;
>> case WSA_CODEC_DMA_RX_0:
>> case WSA_CODEC_DMA_RX_1:
>> /*
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-09-07 12:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-05 15:04 [PATCH v3 0/3] ASoC: qcom: Fix lpaif_type and DAI configuration for I2S interface Mohammad Rafi Shaik
2025-09-05 15:04 ` [PATCH v3 1/3] ASoC: qcom: audioreach: Fix lpaif_type configuration for the " Mohammad Rafi Shaik
2025-09-05 15:04 ` [PATCH v3 2/3] ASoC: qcom: q6apm-lpass-dais: Fix missing set_fmt DAI op for I2S Mohammad Rafi Shaik
2025-09-05 15:04 ` [PATCH v3 3/3] ASoC: qcom: sc8280xp: Fix DAI format setting for MI2S interfaces Mohammad Rafi Shaik
2025-09-07 10:00 ` Srinivas Kandagatla
2025-09-07 12:48 ` Mohammad Rafi Shaik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox