linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] ASoC: qcom: audioreach: Fix lpaif_type and WS source configuration for I2S interface
@ 2025-08-22 17:14 Mohammad Rafi Shaik
  2025-08-22 17:14 ` [PATCH v1 1/2] ASoC: qcom: audioreach: Fix lpaif_type configuration for the " Mohammad Rafi Shaik
  2025-08-22 17:14 ` [PATCH v1 2/2] ASoC: qcom: audioreach: Fix default WS source assignment for " Mohammad Rafi Shaik
  0 siblings, 2 replies; 6+ messages in thread
From: Mohammad Rafi Shaik @ 2025-08-22 17:14 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, kernel

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.

Resolve an issue where the I2S Word Select (WS) source might
remain unset, which leading to misconfiguration. To ensure proper
I2S interface setup, a default WS source is now assigned when not
explicitly configured by the AudioReach module.

For HS MI2S interface, the DSP need proper lpaif_type and WS settings
to appropriate I2S configuration.

Mohammad Rafi Shaik (2):
  ASoC: qcom: audioreach: Fix lpaif_type configuration for the I2S
    interface
  ASoC: qcom: audioreach: Fix default WS source assignment for I2S
    interface

 sound/soc/qcom/qdsp6/audioreach.c | 7 +++++++
 1 file changed, 7 insertions(+)


base-commit: 0f4c93f7eb861acab537dbe94441817a270537bf
-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v1 1/2] ASoC: qcom: audioreach: Fix lpaif_type configuration for the I2S interface
  2025-08-22 17:14 [PATCH v1 0/2] ASoC: qcom: audioreach: Fix lpaif_type and WS source configuration for I2S interface Mohammad Rafi Shaik
@ 2025-08-22 17:14 ` Mohammad Rafi Shaik
  2025-08-31  8:39   ` Srinivas Kandagatla
  2025-08-22 17:14 ` [PATCH v1 2/2] ASoC: qcom: audioreach: Fix default WS source assignment for " Mohammad Rafi Shaik
  1 sibling, 1 reply; 6+ messages in thread
From: Mohammad Rafi Shaik @ 2025-08-22 17:14 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, kernel

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")
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 f4c53e84b4dc..6d7b1a4b0b2a 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 v1 2/2] ASoC: qcom: audioreach: Fix default WS source assignment for I2S interface
  2025-08-22 17:14 [PATCH v1 0/2] ASoC: qcom: audioreach: Fix lpaif_type and WS source configuration for I2S interface Mohammad Rafi Shaik
  2025-08-22 17:14 ` [PATCH v1 1/2] ASoC: qcom: audioreach: Fix lpaif_type configuration for the " Mohammad Rafi Shaik
@ 2025-08-22 17:14 ` Mohammad Rafi Shaik
  2025-08-31  8:37   ` Srinivas Kandagatla
  1 sibling, 1 reply; 6+ messages in thread
From: Mohammad Rafi Shaik @ 2025-08-22 17:14 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, kernel

Resolve an issue where the I2S Word Select (WS) source could remain unset,
leading to misconfiguration of the I2S interface. A default WS source is
assigned when not explicitly configured by the AudioReach module.

For HS MI2S interface, the DSP need proper WS settings to set
appropriate endpoint configuration.

Fixes: 25ab80db6b133 ("ASoC: qdsp6: audioreach: add module configuration command helpers")
Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
---
 sound/soc/qcom/qdsp6/audioreach.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audioreach.c
index 6d7b1a4b0b2a..d4397f75e310 100644
--- a/sound/soc/qcom/qdsp6/audioreach.c
+++ b/sound/soc/qcom/qdsp6/audioreach.c
@@ -999,6 +999,12 @@ static int audioreach_i2s_set_media_format(struct q6apm_graph *graph,
 	intf_cfg->cfg.intf_idx = module->hw_interface_idx;
 	intf_cfg->cfg.sd_line_idx = module->sd_line_idx;
 
+	/* Set default WS source if not already configured */
+	if (!module->ws_src)
+		intf_cfg->cfg.ws_src = CONFIG_I2S_WS_SRC_INTERNAL;
+	else
+		intf_cfg->cfg.ws_src = module->ws_src;
+
 	switch (cfg->fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
 	case SND_SOC_DAIFMT_BP_FP:
 		intf_cfg->cfg.ws_src = CONFIG_I2S_WS_SRC_INTERNAL;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 2/2] ASoC: qcom: audioreach: Fix default WS source assignment for I2S interface
  2025-08-22 17:14 ` [PATCH v1 2/2] ASoC: qcom: audioreach: Fix default WS source assignment for " Mohammad Rafi Shaik
@ 2025-08-31  8:37   ` Srinivas Kandagatla
  2025-09-02  5:48     ` Mohammad Rafi Shaik
  0 siblings, 1 reply; 6+ messages in thread
From: Srinivas Kandagatla @ 2025-08-31  8:37 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, kernel



On 8/22/25 6:14 PM, Mohammad Rafi Shaik wrote:
> Resolve an issue where the I2S Word Select (WS) source could remain unset,
> leading to misconfiguration of the I2S interface. A default WS source is
> assigned when not explicitly configured by the AudioReach module.
> 
> For HS MI2S interface, the DSP need proper WS settings to set
> appropriate endpoint configuration.
> 
Sorry this is not the right way to do this, machine driver should select
the correct configuration via snd_soc_dai_set_fmt.

who supplies the frame clock is decided by that configuration, we should
not be assuming any default as this is totally board depended.

--srini

> Fixes: 25ab80db6b133 ("ASoC: qdsp6: audioreach: add module configuration command helpers")
> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
> ---
>  sound/soc/qcom/qdsp6/audioreach.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audioreach.c
> index 6d7b1a4b0b2a..d4397f75e310 100644
> --- a/sound/soc/qcom/qdsp6/audioreach.c
> +++ b/sound/soc/qcom/qdsp6/audioreach.c
> @@ -999,6 +999,12 @@ static int audioreach_i2s_set_media_format(struct q6apm_graph *graph,
>  	intf_cfg->cfg.intf_idx = module->hw_interface_idx;
>  	intf_cfg->cfg.sd_line_idx = module->sd_line_idx;
>  
> +	/* Set default WS source if not already configured */
> +	if (!module->ws_src)
> +		intf_cfg->cfg.ws_src = CONFIG_I2S_WS_SRC_INTERNAL;
> +	else
> +		intf_cfg->cfg.ws_src = module->ws_src;
> +
>  	switch (cfg->fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
>  	case SND_SOC_DAIFMT_BP_FP:
>  		intf_cfg->cfg.ws_src = CONFIG_I2S_WS_SRC_INTERNAL;


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 1/2] ASoC: qcom: audioreach: Fix lpaif_type configuration for the I2S interface
  2025-08-22 17:14 ` [PATCH v1 1/2] ASoC: qcom: audioreach: Fix lpaif_type configuration for the " Mohammad Rafi Shaik
@ 2025-08-31  8:39   ` Srinivas Kandagatla
  0 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2025-08-31  8:39 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, kernel, Neil Armstrong



On 8/22/25 6:14 PM, Mohammad Rafi Shaik wrote:
> 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")
Missing CC Stable.

> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
> ---

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>


@Neil, this might help on the I2S Playback issue that you have been
hitting on SM8650.

--srini
>  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 f4c53e84b4dc..6d7b1a4b0b2a 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;
>  


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 2/2] ASoC: qcom: audioreach: Fix default WS source assignment for I2S interface
  2025-08-31  8:37   ` Srinivas Kandagatla
@ 2025-09-02  5:48     ` Mohammad Rafi Shaik
  0 siblings, 0 replies; 6+ messages in thread
From: Mohammad Rafi Shaik @ 2025-09-02  5: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, kernel



On 8/31/2025 2:07 PM, Srinivas Kandagatla wrote:
> 
> 
> On 8/22/25 6:14 PM, Mohammad Rafi Shaik wrote:
>> Resolve an issue where the I2S Word Select (WS) source could remain unset,
>> leading to misconfiguration of the I2S interface. A default WS source is
>> assigned when not explicitly configured by the AudioReach module.
>>
>> For HS MI2S interface, the DSP need proper WS settings to set
>> appropriate endpoint configuration.
>>
> Sorry this is not the right way to do this, machine driver should select
> the correct configuration via snd_soc_dai_set_fmt.
> 
> who supplies the frame clock is decided by that configuration, we should
> not be assuming any default as this is totally board depended.
> 

Ack,

will use the snd_soc_dai_set_fmt api to set correct configuration.

Thanks & Regards,
Rafi.


> --srini
> 
>> Fixes: 25ab80db6b133 ("ASoC: qdsp6: audioreach: add module configuration command helpers")
>> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
>> ---
>>   sound/soc/qcom/qdsp6/audioreach.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audioreach.c
>> index 6d7b1a4b0b2a..d4397f75e310 100644
>> --- a/sound/soc/qcom/qdsp6/audioreach.c
>> +++ b/sound/soc/qcom/qdsp6/audioreach.c
>> @@ -999,6 +999,12 @@ static int audioreach_i2s_set_media_format(struct q6apm_graph *graph,
>>   	intf_cfg->cfg.intf_idx = module->hw_interface_idx;
>>   	intf_cfg->cfg.sd_line_idx = module->sd_line_idx;
>>   
>> +	/* Set default WS source if not already configured */
>> +	if (!module->ws_src)
>> +		intf_cfg->cfg.ws_src = CONFIG_I2S_WS_SRC_INTERNAL;
>> +	else
>> +		intf_cfg->cfg.ws_src = module->ws_src;
>> +
>>   	switch (cfg->fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
>>   	case SND_SOC_DAIFMT_BP_FP:
>>   		intf_cfg->cfg.ws_src = CONFIG_I2S_WS_SRC_INTERNAL;
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-09-02  5:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-22 17:14 [PATCH v1 0/2] ASoC: qcom: audioreach: Fix lpaif_type and WS source configuration for I2S interface Mohammad Rafi Shaik
2025-08-22 17:14 ` [PATCH v1 1/2] ASoC: qcom: audioreach: Fix lpaif_type configuration for the " Mohammad Rafi Shaik
2025-08-31  8:39   ` Srinivas Kandagatla
2025-08-22 17:14 ` [PATCH v1 2/2] ASoC: qcom: audioreach: Fix default WS source assignment for " Mohammad Rafi Shaik
2025-08-31  8:37   ` Srinivas Kandagatla
2025-09-02  5: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;
as well as URLs for NNTP newsgroup(s).