]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: qcom: audioreach: use cached shared memory module IID
authorSrinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Thu, 28 May 2026 18:58:00 +0000 (19:58 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 1 Jun 2026 16:19:10 +0000 (17:19 +0100)
audioreach currently calls q6apm_graph_get_rx_shmem_module_iid() to get
the shared memory module IID.

The graph already caches this value in graph->shm_iid, so use it directly
in audioreach_compr_set_param() and audioreach_shared_memory_send_eos().
This prepares for removing the helper in a later patch.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260528185806.6316-2-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/qdsp6/audioreach.c

index a13f753eff98cb532db04290d84468e4f4a03173..5b73f1d81c9b8f6a0f0731d61c08dd769de81a01 100644 (file)
@@ -955,7 +955,7 @@ int audioreach_compr_set_param(struct q6apm_graph *graph,
        struct media_format *header;
        int rc;
        void *p;
-       int iid = q6apm_graph_get_rx_shmem_module_iid(graph);
+       int iid = graph->shm_iid;
        int payload_size = sizeof(struct apm_sh_module_media_fmt_cmd);
 
        struct gpr_pkt *pkt __free(kfree) = audioreach_alloc_cmd_pkt(payload_size,
@@ -1404,7 +1404,7 @@ EXPORT_SYMBOL_GPL(audioreach_graph_free_buf);
 int audioreach_shared_memory_send_eos(struct q6apm_graph *graph)
 {
        struct data_cmd_wr_sh_mem_ep_eos *eos;
-       int iid = q6apm_graph_get_rx_shmem_module_iid(graph);
+       int iid = graph->shm_iid;
        struct gpr_pkt *pkt __free(kfree) = audioreach_alloc_cmd_pkt(sizeof(*eos),
                                        DATA_CMD_WR_SH_MEM_EP_EOS, 0, graph->port->id, iid);
        if (IS_ERR(pkt))