diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2022-09-20 14:42:46 +0100 |
---|---|---|
committer | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2022-09-20 14:42:46 +0100 |
commit | 2c2605ae710250ad4497e53cec46002d129a190e (patch) | |
tree | b06dae8c1d894b4a628704e5cef986d9794e784f | |
parent | c2da87202bcc4728a702d783c0d2e569b76ab36d (diff) |
localaudioreach/calib
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-rw-r--r-- | sound/soc/qcom/qdsp6/audioreach.c | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audioreach.c index 3c7e9de699151..f4856bafdc3ea 100644 --- a/sound/soc/qcom/qdsp6/audioreach.c +++ b/sound/soc/qcom/qdsp6/audioreach.c @@ -1425,8 +1425,8 @@ uint32_t set_cfg[][16]= { }; - -static int audioreach_set_ecns_cfg(struct q6apm_graph *graph, +#if 0 +static int oldaudioreach_set_ecns_cfg(struct q6apm_graph *graph, struct audioreach_module *module, struct audioreach_module_config *cfg) { @@ -1547,6 +1547,32 @@ static int audioreach_set_ecns_cfg(struct q6apm_graph *graph, return rc; } +#endif + +static int audioreach_set_module_config(struct q6apm_graph *graph, + struct audioreach_module *module, + struct audioreach_module_config *cfg) +{ + struct apm_module_param_data *param_data; + 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_set_cfg(struct q6apm_graph *graph, struct audioreach_module *module, @@ -2053,7 +2079,7 @@ int audioreach_set_media_format(struct q6apm_graph *graph, struct audioreach_mod rc = audioreach_mfc_set_media_format(graph, module, cfg); break; case MODULE_ID_SMECNS_V2: - rc = audioreach_set_ecns_cfg(graph, module, cfg); + rc = audioreach_set_module_config(graph, module, cfg); break; // case MODULE_ID_SPLITTER: // rc = audioreach_set_splitter_cfg(graph, module, cfg); |