[PATCH 05/10] ASoC: qcom: q6dsp: add support for LPASS LPI MI2S dais

Srinivas Kandagatla posted 10 patches 3 days, 22 hours ago
[PATCH 05/10] ASoC: qcom: q6dsp: add support for LPASS LPI MI2S dais
Posted by Srinivas Kandagatla 3 days, 22 hours ago
Add new dai ids and dai driver entries ior LPASS LPI MI2S lines

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
 .../sound/qcom,q6dsp-lpass-ports.h            | 12 ++++-
 sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c      | 47 +++++++++++++++++++
 2 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h b/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h
index 609bc278f726..0febc641f351 100644
--- a/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h
+++ b/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h
@@ -140,7 +140,17 @@
 #define DISPLAY_PORT_RX_6	134
 #define DISPLAY_PORT_RX_7	135
 #define USB_RX			136
-#define LPASS_MAX_PORT		(USB_RX + 1)
+#define	LPI_MI2S_RX_0		137
+#define	LPI_MI2S_TX_0		138
+#define	LPI_MI2S_RX_1		139
+#define	LPI_MI2S_TX_1		140
+#define	LPI_MI2S_RX_2		141
+#define	LPI_MI2S_TX_2		142
+#define	LPI_MI2S_RX_3		143
+#define	LPI_MI2S_TX_3		144
+#define	LPI_MI2S_RX_4		145
+#define	LPI_MI2S_TX_4		146
+#define	LPASS_MAX_PORT		(LPI_MI2S_TX_4 + 1)
 
 #define LPASS_CLK_ID_PRI_MI2S_IBIT	1
 #define LPASS_CLK_ID_PRI_MI2S_EBIT	2
diff --git a/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c b/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c
index 4eed54b071a5..d31388ed3ccf 100644
--- a/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c
+++ b/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c
@@ -96,6 +96,42 @@
 		.id = did,						\
 	}
 
+#define Q6AFE_MI2S_RX_DAI(pre, did) {				\
+		.playback = {						\
+			.stream_name = pre" MI2S Playback",	\
+			.rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\
+				SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000 |\
+				SNDRV_PCM_RATE_176400,			\
+			.formats = SNDRV_PCM_FMTBIT_S16_LE |		\
+				   SNDRV_PCM_FMTBIT_S24_LE |		\
+				   SNDRV_PCM_FMTBIT_S32_LE,		\
+			.channels_min = 1,				\
+			.channels_max = 8,				\
+			.rate_min = 8000,				\
+			.rate_max = 176400,				\
+		},							\
+		.name = #did,						\
+		.id = did,						\
+	}
+
+#define Q6AFE_MI2S_TX_DAI(pre, did) {				\
+		.capture = {						\
+			.stream_name = pre" MI2S Capture",	\
+			.rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\
+				SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000 |\
+				SNDRV_PCM_RATE_176400,			\
+			.formats = SNDRV_PCM_FMTBIT_S16_LE |		\
+				   SNDRV_PCM_FMTBIT_S24_LE |		\
+				   SNDRV_PCM_FMTBIT_S32_LE,		\
+			.channels_min = 1,				\
+			.channels_max = 8,				\
+			.rate_min = 8000,				\
+			.rate_max = 176400,				\
+		},							\
+		.name = #did,						\
+		.id = did,						\
+	}
+
 static struct snd_soc_dai_driver q6dsp_audio_fe_dais[] = {
 	{
 		.playback = {
@@ -484,6 +520,16 @@ static struct snd_soc_dai_driver q6dsp_audio_fe_dais[] = {
 		.id = QUINARY_MI2S_TX,
 		.name = "QUIN_MI2S_TX",
 	},
+	Q6AFE_MI2S_RX_DAI("LPI RX0", LPI_MI2S_RX_0),
+	Q6AFE_MI2S_RX_DAI("LPI RX1", LPI_MI2S_RX_1),
+	Q6AFE_MI2S_RX_DAI("LPI RX2", LPI_MI2S_RX_2),
+	Q6AFE_MI2S_RX_DAI("LPI RX3", LPI_MI2S_RX_3),
+	Q6AFE_MI2S_RX_DAI("LPI RX4", LPI_MI2S_RX_4),
+	Q6AFE_MI2S_TX_DAI("LPI TX0", LPI_MI2S_TX_0),
+	Q6AFE_MI2S_TX_DAI("LPI TX1", LPI_MI2S_TX_1),
+	Q6AFE_MI2S_TX_DAI("LPI TX2", LPI_MI2S_TX_2),
+	Q6AFE_MI2S_TX_DAI("LPI TX3", LPI_MI2S_TX_3),
+	Q6AFE_MI2S_TX_DAI("LPI TX4", LPI_MI2S_TX_4),
 	Q6AFE_TDM_PB_DAI("Primary", 0, PRIMARY_TDM_RX_0),
 	Q6AFE_TDM_PB_DAI("Primary", 1, PRIMARY_TDM_RX_1),
 	Q6AFE_TDM_PB_DAI("Primary", 2, PRIMARY_TDM_RX_2),
@@ -636,6 +682,7 @@ struct snd_soc_dai_driver *q6dsp_audio_ports_set_config(struct device *dev,
 			break;
 		case QUINARY_MI2S_RX ... QUINARY_MI2S_TX:
 		case PRIMARY_MI2S_RX ... QUATERNARY_MI2S_TX:
+		case LPI_MI2S_RX_0 ... LPI_MI2S_TX_4:
 			q6dsp_audio_fe_dais[i].ops = cfg->q6i2s_ops;
 			break;
 		case PRIMARY_TDM_RX_0 ... QUINARY_TDM_TX_7:
-- 
2.47.3
Re: [PATCH 05/10] ASoC: qcom: q6dsp: add support for LPASS LPI MI2S dais
Posted by Krzysztof Kozlowski 3 days, 7 hours ago
On Thu, Feb 05, 2026 at 12:14:06PM -0500, Srinivas Kandagatla wrote:
> Add new dai ids and dai driver entries ior LPASS LPI MI2S lines
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> ---
>  .../sound/qcom,q6dsp-lpass-ports.h            | 12 ++++-
>  sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c      | 47 +++++++++++++++++++
>  2 files changed, 58 insertions(+), 1 deletion(-)
> 

It's impossible to reply via korg - wrong address of Conor...

> diff --git a/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h b/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h
> index 609bc278f726..0febc641f351 100644
> --- a/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h
> +++ b/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h
> @@ -140,7 +140,17 @@
>  #define DISPLAY_PORT_RX_6	134
>  #define DISPLAY_PORT_RX_7	135
>  #define USB_RX			136
> -#define LPASS_MAX_PORT		(USB_RX + 1)
> +#define	LPI_MI2S_RX_0		137

Odd indentation appeared.

> +#define	LPI_MI2S_TX_0		138
> +#define	LPI_MI2S_RX_1		139
> +#define	LPI_MI2S_TX_1		140
> +#define	LPI_MI2S_RX_2		141
> +#define	LPI_MI2S_TX_2		142
> +#define	LPI_MI2S_RX_3		143
> +#define	LPI_MI2S_TX_3		144
> +#define	LPI_MI2S_RX_4		145
> +#define	LPI_MI2S_TX_4		146
> +#define	LPASS_MAX_PORT		(LPI_MI2S_TX_4 + 1)

Confusing change or actual proof that my previous comments for similar
patch are valid:
1. not a binding
or
2. you cannot change this, because you break ABI.
Choose only one from these options.

Drop.

Best regards,
Krzysztof
Re: [PATCH 05/10] ASoC: qcom: q6dsp: add support for LPASS LPI MI2S dais
Posted by Srinivas Kandagatla 3 days, 5 hours ago
On 2/6/26 3:00 AM, Krzysztof Kozlowski wrote:
> On Thu, Feb 05, 2026 at 12:14:06PM -0500, Srinivas Kandagatla wrote:
>> Add new dai ids and dai driver entries ior LPASS LPI MI2S lines
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
>> ---
>>  .../sound/qcom,q6dsp-lpass-ports.h            | 12 ++++-
>>  sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c      | 47 +++++++++++++++++++
>>  2 files changed, 58 insertions(+), 1 deletion(-)
>>
> 
> It's impossible to reply via korg - wrong address of Conor...
> 
>> diff --git a/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h b/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h
>> index 609bc278f726..0febc641f351 100644
>> --- a/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h
>> +++ b/include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h
>> @@ -140,7 +140,17 @@
>>  #define DISPLAY_PORT_RX_6	134
>>  #define DISPLAY_PORT_RX_7	135
>>  #define USB_RX			136
>> -#define LPASS_MAX_PORT		(USB_RX + 1)
>> +#define	LPI_MI2S_RX_0		137
> 
> Odd indentation appeared.
> 

>> +#define	LPI_MI2S_TX_0		138
>> +#define	LPI_MI2S_RX_1		139
>> +#define	LPI_MI2S_TX_1		140
>> +#define	LPI_MI2S_RX_2		141
>> +#define	LPI_MI2S_TX_2		142
>> +#define	LPI_MI2S_RX_3		143
>> +#define	LPI_MI2S_TX_3		144
>> +#define	LPI_MI2S_RX_4		145
>> +#define	LPI_MI2S_TX_4		146
>> +#define	LPASS_MAX_PORT		(LPI_MI2S_TX_4 + 1)
> 
> Confusing change or actual proof that my previous comments for similar
> patch are valid:
> 1. not a binding> or
> 2. you cannot change this, because you break ABI.
> Choose only one from these options.
Is this because the max port keeps changing?, I can try to see how this
can be dealt within the drivers in next version without adding
LPASS_MAX_PORT to bindings.

--srini
> 
> Drop.
> 
> Best regards,
> Krzysztof
>
Re: [PATCH 05/10] ASoC: qcom: q6dsp: add support for LPASS LPI MI2S dais
Posted by Krzysztof Kozlowski 3 days, 5 hours ago
On 06/02/2026 11:02, Srinivas Kandagatla wrote:
>> Confusing change or actual proof that my previous comments for similar
>> patch are valid:
>> 1. not a binding> or
>> 2. you cannot change this, because you break ABI.
>> Choose only one from these options.
> Is this because the max port keeps changing?, I can try to see how this

Yes.

Best regards,
Krzysztof