History

ASoC: qcom: audioreach: add support for static calibration

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, ..." } }

Srinivas Kandagatla committed 1 year ago

Commit c7ed4c21 parent f07b81b3 files · +43 −0Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/sound/snd_ar_tokens.h+10−0
@@ -3,6 +3,8 @@ · 2 unmodified lines
33 #ifndef __SND_AR_TOKENS_H__
44 #define __SND_AR_TOKENS_H__
55
6+#include <linux/types.h>
7+
68 #define APM_SUB_GRAPH_PERF_MODE_LOW_POWER 0x1
79 #define APM_SUB_GRAPH_PERF_MODE_LOW_LATENCY 0x2
810
@@ -238,4 +240,12 @@ enum ar_event_types { · 229 unmodified lines
238240 #define AR_TKN_U32_MODULE_LOG_TAP_POINT_ID 260
239241 #define AR_TKN_U32_MODULE_LOG_MODE 261
240242
243+#define SND_SOC_AR_TPLG_MODULE_CFG_TYPE 0x01001006
244+struct audioreach_module_priv_data {
245+ __le32 size; /* size in bytes of the array, including all elements */
246+ __le32 type; /* SND_SOC_AR_TPLG_MODULE_CFG_TYPE */
247+ __le32 priv[2]; /* Private data for future expansion */
248+ __le32 data[0]; /* config data */
249+};
250+
241251 #endif /* __SND_AR_TOKENS_H__ */