linux-sound.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: qcom: audioreach: cleanup and statiic
@ 2025-08-18 11:28 srinivas.kandagatla
  2025-08-18 11:28 ` [PATCH 1/4] ASoC: qcom: audioreach: deprecate AR_TKN_U32_MODULE_[IN/OUT]_PORTS srinivas.kandagatla
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: srinivas.kandagatla @ 2025-08-18 11:28 UTC (permalink / raw)
  To: broonie
  Cc: perex, tiwai, srini, lgirdwood, linux-sound, linux-kernel,
	linux-arm-msm, krzysztof.kozlowski, Srinivas Kandagatla

From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>

This patchset:
 - cleans up some of the audioreach tokens which are unused
 - adds missing documention 
 - add support for static calibration support which is required for ECNS
   an speaker protection support.

Tested this with Single Mic ECNS on SM8450 platform.

thanks,
Srini

Srinivas Kandagatla (4):
  ASoC: qcom: audioreach: deprecate AR_TKN_U32_MODULE_[IN/OUT]_PORTS
  ASoC: qcom: audioreach: add documentation for i2s interface type
  ASoC: qcom: audioreach: add support for static calibration
  ASoC: qcom: audioreach: add support for SMECNS module

 include/uapi/sound/snd_ar_tokens.h | 18 +++++++++++--
 sound/soc/qcom/qdsp6/audioreach.c  | 27 ++++++++++++++++++++
 sound/soc/qcom/qdsp6/audioreach.h  |  6 ++---
 sound/soc/qcom/qdsp6/topology.c    | 41 +++++++++++++++++++++++-------
 4 files changed, 78 insertions(+), 14 deletions(-)

-- 
2.50.0


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

* [PATCH 1/4] ASoC: qcom: audioreach: deprecate AR_TKN_U32_MODULE_[IN/OUT]_PORTS
  2025-08-18 11:28 [PATCH 0/4] ASoC: qcom: audioreach: cleanup and statiic srinivas.kandagatla
@ 2025-08-18 11:28 ` srinivas.kandagatla
  2025-08-18 11:53   ` Krzysztof Kozlowski
  2025-08-18 11:28 ` [PATCH 2/4] ASoC: qcom: audioreach: add documentation for i2s interface type srinivas.kandagatla
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: srinivas.kandagatla @ 2025-08-18 11:28 UTC (permalink / raw)
  To: broonie
  Cc: perex, tiwai, srini, lgirdwood, linux-sound, linux-kernel,
	linux-arm-msm, krzysztof.kozlowski, Srinivas Kandagatla

From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>

Deprecate usage of AR_TKN_U32_MODULE_IN_PORTS and
AR_TKN_U32_MODULE_OUT_PORTS as the connectivity of modules is taken care
by AR_TKN_U32_MODULE_SRC_OP_PORT_ID* and AR_TKN_U32_MODULE_DST_IN_PORT_ID*

Also this property is never used in the drivers.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
 include/uapi/sound/snd_ar_tokens.h |  4 ++--
 sound/soc/qcom/qdsp6/audioreach.h  |  3 ---
 sound/soc/qcom/qdsp6/topology.c    | 10 +---------
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/include/uapi/sound/snd_ar_tokens.h b/include/uapi/sound/snd_ar_tokens.h
index b9b9093b4396..bc0b1bede00c 100644
--- a/include/uapi/sound/snd_ar_tokens.h
+++ b/include/uapi/sound/snd_ar_tokens.h
@@ -184,8 +184,8 @@ enum ar_event_types {
 #define AR_TKN_U32_MODULE_INSTANCE_ID		201
 #define AR_TKN_U32_MODULE_MAX_IP_PORTS		202
 #define AR_TKN_U32_MODULE_MAX_OP_PORTS		203
-#define AR_TKN_U32_MODULE_IN_PORTS		204
-#define AR_TKN_U32_MODULE_OUT_PORTS		205
+#define AR_TKN_U32_MODULE_IN_PORTS		204 /* deprecated */
+#define AR_TKN_U32_MODULE_OUT_PORTS		205 /* deprecated */
 #define AR_TKN_U32_MODULE_SRC_OP_PORT_ID	206
 #define AR_TKN_U32_MODULE_DST_IN_PORT_ID	207
 #define AR_TKN_U32_MODULE_SRC_INSTANCE_ID	208
diff --git a/sound/soc/qcom/qdsp6/audioreach.h b/sound/soc/qcom/qdsp6/audioreach.h
index 61a69df4f50f..9b30177463e6 100644
--- a/sound/soc/qcom/qdsp6/audioreach.h
+++ b/sound/soc/qcom/qdsp6/audioreach.h
@@ -707,9 +707,6 @@ struct audioreach_module {
 	uint32_t max_ip_port;
 	uint32_t max_op_port;
 
-	uint32_t in_port;
-	uint32_t out_port;
-
 	uint32_t num_connections;
 	/* Connections */
 	uint32_t src_mod_inst_id;
diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topology.c
index 83319a928f29..a3b0f558260c 100644
--- a/sound/soc/qcom/qdsp6/topology.c
+++ b/sound/soc/qcom/qdsp6/topology.c
@@ -412,7 +412,7 @@ static struct audioreach_module *audioreach_parse_common_tokens(struct q6apm *ap
 							struct snd_soc_tplg_private *private,
 							struct snd_soc_dapm_widget *w)
 {
-	uint32_t max_ip_port = 0, max_op_port = 0, in_port = 0, out_port = 0;
+	uint32_t max_ip_port = 0, max_op_port = 0;
 	uint32_t src_mod_op_port_id[AR_MAX_MOD_LINKS] = { 0, };
 	uint32_t dst_mod_inst_id[AR_MAX_MOD_LINKS] = { 0, };
 	uint32_t dst_mod_ip_port_id[AR_MAX_MOD_LINKS] = { 0, };
@@ -455,12 +455,6 @@ static struct audioreach_module *audioreach_parse_common_tokens(struct q6apm *ap
 		case AR_TKN_U32_MODULE_MAX_OP_PORTS:
 			max_op_port = le32_to_cpu(mod_elem->value);
 			break;
-		case AR_TKN_U32_MODULE_IN_PORTS:
-			in_port = le32_to_cpu(mod_elem->value);
-			break;
-		case AR_TKN_U32_MODULE_OUT_PORTS:
-			out_port = le32_to_cpu(mod_elem->value);
-			break;
 		case AR_TKN_U32_MODULE_SRC_INSTANCE_ID:
 			src_mod_inst_id = le32_to_cpu(mod_elem->value);
 			break;
@@ -550,8 +544,6 @@ static struct audioreach_module *audioreach_parse_common_tokens(struct q6apm *ap
 		mod->module_id = module_id;
 		mod->max_ip_port = max_ip_port;
 		mod->max_op_port = max_op_port;
-		mod->in_port = in_port;
-		mod->out_port = out_port;
 		mod->src_mod_inst_id = src_mod_inst_id;
 		for (pn = 0; pn < mod->max_op_port; pn++) {
 			if (src_mod_op_port_id[pn] && dst_mod_inst_id[pn] &&
-- 
2.50.0


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

* [PATCH 2/4] ASoC: qcom: audioreach: add documentation for i2s interface type
  2025-08-18 11:28 [PATCH 0/4] ASoC: qcom: audioreach: cleanup and statiic srinivas.kandagatla
  2025-08-18 11:28 ` [PATCH 1/4] ASoC: qcom: audioreach: deprecate AR_TKN_U32_MODULE_[IN/OUT]_PORTS srinivas.kandagatla
@ 2025-08-18 11:28 ` srinivas.kandagatla
  2025-08-18 11:56   ` Krzysztof Kozlowski
  2025-08-18 11:28 ` [PATCH 3/4] ASoC: qcom: audioreach: add support for static calibration srinivas.kandagatla
  2025-08-18 11:28 ` [PATCH 4/4] ASoC: qcom: audioreach: add support for SMECNS module srinivas.kandagatla
  3 siblings, 1 reply; 11+ messages in thread
From: srinivas.kandagatla @ 2025-08-18 11:28 UTC (permalink / raw)
  To: broonie
  Cc: perex, tiwai, srini, lgirdwood, linux-sound, linux-kernel,
	linux-arm-msm, krzysztof.kozlowski, Srinivas Kandagatla

From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>

Add documentation of possible values for I2S interface types,
currently this is only documented for DMA module.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
 include/uapi/sound/snd_ar_tokens.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/sound/snd_ar_tokens.h b/include/uapi/sound/snd_ar_tokens.h
index bc0b1bede00c..3aa5f4928a2b 100644
--- a/include/uapi/sound/snd_ar_tokens.h
+++ b/include/uapi/sound/snd_ar_tokens.h
@@ -118,6 +118,12 @@ enum ar_event_types {
  *						LPAIF_WSA = 2,
  *						LPAIF_VA = 3,
  *						LPAIF_AXI = 4
+ * Possible values for MI2S
+ *						I2S_INTF_TYPE_PRIMARY = 0,
+ *						I2S_INTF_TYPE_SECOINDARY = 1,
+ *						I2S_INTF_TYPE_TERTINARY = 2,
+ *						I2S_INTF_TYPE_QUATERNARY = 3,
+ *						I2S_INTF_TYPE_QUINARY = 4,
  *
  * %AR_TKN_U32_MODULE_FMT_INTERLEAVE:		PCM Interleaving
  *						PCM_INTERLEAVED = 1,
-- 
2.50.0


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

* [PATCH 3/4] ASoC: qcom: audioreach: add support for static calibration
  2025-08-18 11:28 [PATCH 0/4] ASoC: qcom: audioreach: cleanup and statiic srinivas.kandagatla
  2025-08-18 11:28 ` [PATCH 1/4] ASoC: qcom: audioreach: deprecate AR_TKN_U32_MODULE_[IN/OUT]_PORTS srinivas.kandagatla
  2025-08-18 11:28 ` [PATCH 2/4] ASoC: qcom: audioreach: add documentation for i2s interface type srinivas.kandagatla
@ 2025-08-18 11:28 ` srinivas.kandagatla
  2025-08-18 11:57   ` Krzysztof Kozlowski
  2025-08-18 11:28 ` [PATCH 4/4] ASoC: qcom: audioreach: add support for SMECNS module srinivas.kandagatla
  3 siblings, 1 reply; 11+ messages in thread
From: srinivas.kandagatla @ 2025-08-18 11:28 UTC (permalink / raw)
  To: broonie
  Cc: perex, tiwai, srini, lgirdwood, linux-sound, linux-kernel,
	linux-arm-msm, krzysztof.kozlowski, Srinivas Kandagatla

From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>

This change adds support for static calibration data via ASoC topology
file. This static calibration data could include binary blob of data
that is required by specific module and is not part of topology tokens.

Reason for adding this support is to allow loading module specific data
that can not be part of the tplg tokens, example, Echo and Noise cancelling
module needs a blob of calibration data to function correctly.

This support is also one of the building block for adding speaker
protection support.

Tested this with Single Mic ECNS(Echo and Noise Cancellation).

tplg can now contain this calibration data like:

SectionWidget."stream2.SMECNS_V224" {
	...
	data [
		...
		"stream2.SMECNS_V224_cfg_data"
	]
}

SectionData."stream2.SMECNS_V224_cfg_data" {
	words "0x00000330, 0x01001006,0x00000000,0x00000000,
		0x00004145,0x08001026,0x00000004,0x00000000,
		..."
	}
}

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
 include/uapi/sound/snd_ar_tokens.h |  8 ++++++++
 sound/soc/qcom/qdsp6/audioreach.h  |  2 ++
 sound/soc/qcom/qdsp6/topology.c    | 31 ++++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+)

diff --git a/include/uapi/sound/snd_ar_tokens.h b/include/uapi/sound/snd_ar_tokens.h
index 3aa5f4928a2b..4896d8f02165 100644
--- a/include/uapi/sound/snd_ar_tokens.h
+++ b/include/uapi/sound/snd_ar_tokens.h
@@ -238,4 +238,12 @@ enum ar_event_types {
 #define AR_TKN_U32_MODULE_LOG_TAP_POINT_ID	260
 #define AR_TKN_U32_MODULE_LOG_MODE		261
 
+#define SND_SOC_AR_TPLG_MODULE_CFG_TYPE 0x01001006
+struct audioreach_module_priv_data {
+	__le32 size;	/* size in bytes of the array, including all elements */
+	__le32 type;	/* SND_SOC_AR_TPLG_MODULE_CFG_TYPE */
+	__le32 priv[2];	/* Private data for future expansion */
+	__le32 data[0];	/* config data */
+};
+
 #endif /* __SND_AR_TOKENS_H__ */
diff --git a/sound/soc/qcom/qdsp6/audioreach.h b/sound/soc/qcom/qdsp6/audioreach.h
index 9b30177463e6..617bda051cf8 100644
--- a/sound/soc/qcom/qdsp6/audioreach.h
+++ b/sound/soc/qcom/qdsp6/audioreach.h
@@ -4,6 +4,7 @@
 #define __AUDIOREACH_H__
 #include <linux/types.h>
 #include <linux/soc/qcom/apr.h>
+#include <uapi/sound/snd_ar_tokens.h>
 #include <sound/soc.h>
 struct q6apm;
 struct q6apm_graph;
@@ -742,6 +743,7 @@ struct audioreach_module {
 	struct list_head node;
 	struct audioreach_container *container;
 	struct snd_soc_dapm_widget *widget;
+	struct audioreach_module_priv_data *data;
 };
 
 struct audioreach_module_config {
diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topology.c
index a3b0f558260c..ec51fabd98cb 100644
--- a/sound/soc/qcom/qdsp6/topology.c
+++ b/sound/soc/qcom/qdsp6/topology.c
@@ -305,6 +305,34 @@ static struct snd_soc_tplg_vendor_array *audioreach_get_module_array(
 	return NULL;
 }
 
+static struct audioreach_module_priv_data *audioreach_get_module_priv_data(
+		struct snd_soc_tplg_private *private)
+{
+	int sz;
+
+	for (sz = 0; sz < le32_to_cpu(private->size); ) {
+		struct snd_soc_tplg_vendor_array *mod_array;
+
+		mod_array = (struct snd_soc_tplg_vendor_array *)((u8 *)private->array + sz);
+		if (mod_array->type == SND_SOC_AR_TPLG_MODULE_CFG_TYPE) {
+			struct audioreach_module_priv_data *pdata;
+
+			pdata = kzalloc(struct_size(pdata, data, le32_to_cpu(mod_array->size)),
+				       GFP_KERNEL);
+			if (!pdata)
+				return ERR_PTR(-ENOMEM);
+
+			memcpy(pdata, ((u8 *)private->data + sz), struct_size(pdata, data,
+						le32_to_cpu(mod_array->size)));
+			return pdata;
+		}
+
+		sz = sz + le32_to_cpu(mod_array->size);
+	}
+
+	return NULL;
+}
+
 static struct audioreach_sub_graph *audioreach_parse_sg_tokens(struct q6apm *apm,
 						       struct snd_soc_tplg_private *private)
 {
@@ -582,6 +610,8 @@ static int audioreach_widget_load_module_common(struct snd_soc_component *compon
 	if (IS_ERR(mod))
 		return PTR_ERR(mod);
 
+	mod->data = audioreach_get_module_priv_data(&tplg_w->priv);
+
 	dobj = &w->dobj;
 	dobj->private = mod;
 
@@ -939,6 +969,7 @@ static int audioreach_widget_unload(struct snd_soc_component *scomp,
 	cont->num_modules--;
 
 	list_del(&mod->node);
+	kfree(mod->data);
 	kfree(mod);
 	/* Graph Info has N sub-graphs, sub-graph has N containers, Container has N Modules */
 	if (list_empty(&cont->modules_list)) { /* if no modules in the container then remove it */
-- 
2.50.0


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

* [PATCH 4/4] ASoC: qcom: audioreach: add support for SMECNS module
  2025-08-18 11:28 [PATCH 0/4] ASoC: qcom: audioreach: cleanup and statiic srinivas.kandagatla
                   ` (2 preceding siblings ...)
  2025-08-18 11:28 ` [PATCH 3/4] ASoC: qcom: audioreach: add support for static calibration srinivas.kandagatla
@ 2025-08-18 11:28 ` srinivas.kandagatla
  2025-08-18 11:58   ` Krzysztof Kozlowski
  3 siblings, 1 reply; 11+ messages in thread
From: srinivas.kandagatla @ 2025-08-18 11:28 UTC (permalink / raw)
  To: broonie
  Cc: perex, tiwai, srini, lgirdwood, linux-sound, linux-kernel,
	linux-arm-msm, krzysztof.kozlowski, Srinivas Kandagatla

From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>

This patch adds support for Single Mic ECNS module, used for echo
cancellation. It also makes use of audioreach_set_module_config to load
the calibration data for this module from ASoC tplg file.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
 sound/soc/qcom/qdsp6/audioreach.c | 27 +++++++++++++++++++++++++++
 sound/soc/qcom/qdsp6/audioreach.h |  1 +
 2 files changed, 28 insertions(+)

diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audioreach.c
index 4ebaaf736fb9..f4c53e84b4dc 100644
--- a/sound/soc/qcom/qdsp6/audioreach.c
+++ b/sound/soc/qcom/qdsp6/audioreach.c
@@ -811,6 +811,30 @@ static int audioreach_gapless_set_media_format(struct q6apm_graph *graph,
 					 EARLY_EOS_DELAY_MS);
 }
 
+static int audioreach_set_module_config(struct q6apm_graph *graph,
+					struct audioreach_module *module,
+					struct audioreach_module_config *cfg)
+{
+	int payload_size = module->data->size;
+	struct gpr_pkt *pkt;
+	int rc;
+	void *p;
+
+	pkt = audioreach_alloc_apm_cmd_pkt(payload_size, APM_CMD_SET_CFG, 0);
+	if (IS_ERR(pkt))
+		return PTR_ERR(pkt);
+
+	p = (void *)pkt + GPR_HDR_SIZE + APM_CMD_HDR_SIZE;
+
+	memcpy(p, module->data->data, payload_size);
+
+	rc = q6apm_send_cmd_sync(graph->apm, pkt, 0);
+
+	kfree(pkt);
+
+	return rc;
+}
+
 static int audioreach_mfc_set_media_format(struct q6apm_graph *graph,
 					   struct audioreach_module *module,
 					   struct audioreach_module_config *cfg)
@@ -1247,6 +1271,9 @@ int audioreach_set_media_format(struct q6apm_graph *graph, struct audioreach_mod
 	case MODULE_ID_DISPLAY_PORT_SINK:
 		rc = audioreach_display_port_set_media_format(graph, module, cfg);
 		break;
+	case  MODULE_ID_SMECNS_V2:
+		rc = audioreach_set_module_config(graph, module, cfg);
+		break;
 	case MODULE_ID_I2S_SOURCE:
 	case MODULE_ID_I2S_SINK:
 		rc = audioreach_i2s_set_media_format(graph, module, cfg);
diff --git a/sound/soc/qcom/qdsp6/audioreach.h b/sound/soc/qcom/qdsp6/audioreach.h
index 617bda051cf8..2ae6420f4b6a 100644
--- a/sound/soc/qcom/qdsp6/audioreach.h
+++ b/sound/soc/qcom/qdsp6/audioreach.h
@@ -30,6 +30,7 @@ struct q6apm_graph;
 #define MODULE_ID_MP3_DECODE		0x0700103B
 #define MODULE_ID_GAPLESS		0x0700104D
 #define MODULE_ID_DISPLAY_PORT_SINK	0x07001069
+#define MODULE_ID_SMECNS_V2		0x07001031
 
 #define APM_CMD_GET_SPF_STATE		0x01001021
 #define APM_CMD_RSP_GET_SPF_STATE	0x02001007
-- 
2.50.0


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

* Re: [PATCH 1/4] ASoC: qcom: audioreach: deprecate AR_TKN_U32_MODULE_[IN/OUT]_PORTS
  2025-08-18 11:28 ` [PATCH 1/4] ASoC: qcom: audioreach: deprecate AR_TKN_U32_MODULE_[IN/OUT]_PORTS srinivas.kandagatla
@ 2025-08-18 11:53   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-18 11:53 UTC (permalink / raw)
  To: srinivas.kandagatla, broonie
  Cc: perex, tiwai, srini, lgirdwood, linux-sound, linux-kernel,
	linux-arm-msm

On 18/08/2025 13:28, srinivas.kandagatla@oss.qualcomm.com wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> 
> Deprecate usage of AR_TKN_U32_MODULE_IN_PORTS and
> AR_TKN_U32_MODULE_OUT_PORTS as the connectivity of modules is taken care
> by AR_TKN_U32_MODULE_SRC_OP_PORT_ID* and AR_TKN_U32_MODULE_DST_IN_PORT_ID*
> 
> Also this property is never used in the drivers.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> ---
>  include/uapi/sound/snd_ar_tokens.h |  4 ++--
>  sound/soc/qcom/qdsp6/audioreach.h  |  3 ---
>  sound/soc/qcom/qdsp6/topology.c    | 10 +---------
>  3 files changed, 3 insertions(+), 14 deletions(-)

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof

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

* Re: [PATCH 2/4] ASoC: qcom: audioreach: add documentation for i2s interface type
  2025-08-18 11:28 ` [PATCH 2/4] ASoC: qcom: audioreach: add documentation for i2s interface type srinivas.kandagatla
@ 2025-08-18 11:56   ` Krzysztof Kozlowski
  2025-08-18 12:02     ` Srinivas Kandagatla
  0 siblings, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-18 11:56 UTC (permalink / raw)
  To: srinivas.kandagatla, broonie
  Cc: perex, tiwai, srini, lgirdwood, linux-sound, linux-kernel,
	linux-arm-msm

On 18/08/2025 13:28, srinivas.kandagatla@oss.qualcomm.com wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> 
> Add documentation of possible values for I2S interface types,
> currently this is only documented for DMA module.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> ---
>  include/uapi/sound/snd_ar_tokens.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/uapi/sound/snd_ar_tokens.h b/include/uapi/sound/snd_ar_tokens.h
> index bc0b1bede00c..3aa5f4928a2b 100644
> --- a/include/uapi/sound/snd_ar_tokens.h
> +++ b/include/uapi/sound/snd_ar_tokens.h
> @@ -118,6 +118,12 @@ enum ar_event_types {
>   *						LPAIF_WSA = 2,
>   *						LPAIF_VA = 3,
>   *						LPAIF_AXI = 4
> + * Possible values for MI2S
> + *						I2S_INTF_TYPE_PRIMARY = 0,
> + *						I2S_INTF_TYPE_SECOINDARY = 1,

Typo: SECONDARY

> + *						I2S_INTF_TYPE_TERTINARY = 2,

And TERTIARY?

Although, they come from audioreach.h so, well, eh...

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof

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

* Re: [PATCH 3/4] ASoC: qcom: audioreach: add support for static calibration
  2025-08-18 11:28 ` [PATCH 3/4] ASoC: qcom: audioreach: add support for static calibration srinivas.kandagatla
@ 2025-08-18 11:57   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-18 11:57 UTC (permalink / raw)
  To: srinivas.kandagatla, broonie
  Cc: perex, tiwai, srini, lgirdwood, linux-sound, linux-kernel,
	linux-arm-msm

On 18/08/2025 13:28, srinivas.kandagatla@oss.qualcomm.com wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> 
> This change adds support for static calibration data via ASoC topology
> file. This static calibration data could include binary blob of data
> that is required by specific module and is not part of topology tokens.
> 
> Reason for adding this support is to allow loading module specific data
> that can not be part of the tplg tokens, example, Echo and Noise cancelling
> module needs a blob of calibration data to function correctly.
> 
> This support is also one of the building block for adding speaker
> protection support.
> 
> Tested this with Single Mic ECNS(Echo and Noise Cancellation).
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof

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

* Re: [PATCH 4/4] ASoC: qcom: audioreach: add support for SMECNS module
  2025-08-18 11:28 ` [PATCH 4/4] ASoC: qcom: audioreach: add support for SMECNS module srinivas.kandagatla
@ 2025-08-18 11:58   ` Krzysztof Kozlowski
  2025-08-18 12:12     ` Srinivas Kandagatla
  0 siblings, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-18 11:58 UTC (permalink / raw)
  To: srinivas.kandagatla, broonie
  Cc: perex, tiwai, srini, lgirdwood, linux-sound, linux-kernel,
	linux-arm-msm

On 18/08/2025 13:28, srinivas.kandagatla@oss.qualcomm.com wrote:
>  		rc = audioreach_i2s_set_media_format(graph, module, cfg);
> diff --git a/sound/soc/qcom/qdsp6/audioreach.h b/sound/soc/qcom/qdsp6/audioreach.h
> index 617bda051cf8..2ae6420f4b6a 100644
> --- a/sound/soc/qcom/qdsp6/audioreach.h
> +++ b/sound/soc/qcom/qdsp6/audioreach.h
> @@ -30,6 +30,7 @@ struct q6apm_graph;
>  #define MODULE_ID_MP3_DECODE		0x0700103B
>  #define MODULE_ID_GAPLESS		0x0700104D
>  #define MODULE_ID_DISPLAY_PORT_SINK	0x07001069
> +#define MODULE_ID_SMECNS_V2		0x07001031

Can we keep these sorted by hex?

Best regards,
Krzysztof

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

* Re: [PATCH 2/4] ASoC: qcom: audioreach: add documentation for i2s interface type
  2025-08-18 11:56   ` Krzysztof Kozlowski
@ 2025-08-18 12:02     ` Srinivas Kandagatla
  0 siblings, 0 replies; 11+ messages in thread
From: Srinivas Kandagatla @ 2025-08-18 12:02 UTC (permalink / raw)
  To: Krzysztof Kozlowski, broonie
  Cc: perex, tiwai, srini, lgirdwood, linux-sound, linux-kernel,
	linux-arm-msm

thanks Krzysztof,
On 8/18/25 12:56 PM, Krzysztof Kozlowski wrote:
> On 18/08/2025 13:28, srinivas.kandagatla@oss.qualcomm.com wrote:
>> From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
>>
>> Add documentation of possible values for I2S interface types,
>> currently this is only documented for DMA module.
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
>> ---
>>  include/uapi/sound/snd_ar_tokens.h | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/include/uapi/sound/snd_ar_tokens.h b/include/uapi/sound/snd_ar_tokens.h
>> index bc0b1bede00c..3aa5f4928a2b 100644
>> --- a/include/uapi/sound/snd_ar_tokens.h
>> +++ b/include/uapi/sound/snd_ar_tokens.h
>> @@ -118,6 +118,12 @@ enum ar_event_types {
>>   *						LPAIF_WSA = 2,
>>   *						LPAIF_VA = 3,
>>   *						LPAIF_AXI = 4
>> + * Possible values for MI2S
>> + *						I2S_INTF_TYPE_PRIMARY = 0,
>> + *						I2S_INTF_TYPE_SECOINDARY = 1,
> 
> Typo: SECONDARY
> 
>> + *						I2S_INTF_TYPE_TERTINARY = 2,
> 
> And TERTIARY?
> 
> Although, they come from audioreach.h so, well, eh...


True, I was doing vi autofill.. we should fix the audioreach.h as well,
let me do that in v2.

thanks,
-srini
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> Best regards,
> Krzysztof


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

* Re: [PATCH 4/4] ASoC: qcom: audioreach: add support for SMECNS module
  2025-08-18 11:58   ` Krzysztof Kozlowski
@ 2025-08-18 12:12     ` Srinivas Kandagatla
  0 siblings, 0 replies; 11+ messages in thread
From: Srinivas Kandagatla @ 2025-08-18 12:12 UTC (permalink / raw)
  To: Krzysztof Kozlowski, broonie
  Cc: perex, tiwai, srini, lgirdwood, linux-sound, linux-kernel,
	linux-arm-msm

On 8/18/25 12:58 PM, Krzysztof Kozlowski wrote:
> On 18/08/2025 13:28, srinivas.kandagatla@oss.qualcomm.com wrote:
>>  		rc = audioreach_i2s_set_media_format(graph, module, cfg);
>> diff --git a/sound/soc/qcom/qdsp6/audioreach.h b/sound/soc/qcom/qdsp6/audioreach.h
>> index 617bda051cf8..2ae6420f4b6a 100644
>> --- a/sound/soc/qcom/qdsp6/audioreach.h
>> +++ b/sound/soc/qcom/qdsp6/audioreach.h
>> @@ -30,6 +30,7 @@ struct q6apm_graph;
>>  #define MODULE_ID_MP3_DECODE		0x0700103B
>>  #define MODULE_ID_GAPLESS		0x0700104D
>>  #define MODULE_ID_DISPLAY_PORT_SINK	0x07001069
>> +#define MODULE_ID_SMECNS_V2		0x07001031
> 
> Can we keep these sorted by hex?
> 
Let me try that in v2, looks like some of these are not sorted.. I can
sort them and patch it.



--srini
> Best regards,
> Krzysztof


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

end of thread, other threads:[~2025-08-18 12:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18 11:28 [PATCH 0/4] ASoC: qcom: audioreach: cleanup and statiic srinivas.kandagatla
2025-08-18 11:28 ` [PATCH 1/4] ASoC: qcom: audioreach: deprecate AR_TKN_U32_MODULE_[IN/OUT]_PORTS srinivas.kandagatla
2025-08-18 11:53   ` Krzysztof Kozlowski
2025-08-18 11:28 ` [PATCH 2/4] ASoC: qcom: audioreach: add documentation for i2s interface type srinivas.kandagatla
2025-08-18 11:56   ` Krzysztof Kozlowski
2025-08-18 12:02     ` Srinivas Kandagatla
2025-08-18 11:28 ` [PATCH 3/4] ASoC: qcom: audioreach: add support for static calibration srinivas.kandagatla
2025-08-18 11:57   ` Krzysztof Kozlowski
2025-08-18 11:28 ` [PATCH 4/4] ASoC: qcom: audioreach: add support for SMECNS module srinivas.kandagatla
2025-08-18 11:58   ` Krzysztof Kozlowski
2025-08-18 12:12     ` Srinivas Kandagatla

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).