mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
ASoC: qcom: q6apm: remove shared memory IID helpers
The shared memory module instance ID is now cached in graph->shm_iid when the graph is opened. The old WR/RD shared memory IID helper functions are no longer used. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260528185806.6316-4-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
3075ae5abb
commit
240286ecf1
|
|
@ -417,31 +417,6 @@ int q6apm_graph_media_format_pcm(struct q6apm_graph *graph, struct audioreach_mo
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(q6apm_graph_media_format_pcm);
|
||||
|
||||
static int q6apm_graph_get_tx_shmem_module_iid(struct q6apm_graph *graph)
|
||||
{
|
||||
struct audioreach_module *module;
|
||||
|
||||
module = q6apm_find_module_by_mid(graph, MODULE_ID_RD_SHARED_MEM_EP);
|
||||
if (!module)
|
||||
return -ENODEV;
|
||||
|
||||
return module->instance_id;
|
||||
|
||||
}
|
||||
|
||||
int q6apm_graph_get_rx_shmem_module_iid(struct q6apm_graph *graph)
|
||||
{
|
||||
struct audioreach_module *module;
|
||||
|
||||
module = q6apm_find_module_by_mid(graph, MODULE_ID_WR_SHARED_MEM_EP);
|
||||
if (!module)
|
||||
return -ENODEV;
|
||||
|
||||
return module->instance_id;
|
||||
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(q6apm_graph_get_rx_shmem_module_iid);
|
||||
|
||||
int q6apm_write_async(struct q6apm_graph *graph, uint32_t len, uint32_t msw_ts,
|
||||
uint32_t lsw_ts, uint32_t wflags)
|
||||
{
|
||||
|
|
@ -614,6 +589,18 @@ static int graph_callback(const struct gpr_resp_pkt *data, void *priv, int op)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int q6apm_graph_get_module_iid(struct q6apm_graph *graph, uint32_t mid)
|
||||
{
|
||||
struct audioreach_module *module;
|
||||
|
||||
module = q6apm_find_module_by_mid(graph, mid);
|
||||
if (!module)
|
||||
return -ENODEV;
|
||||
|
||||
return module->instance_id;
|
||||
|
||||
}
|
||||
|
||||
struct q6apm_graph *q6apm_graph_open(struct device *dev, q6apm_cb cb,
|
||||
void *priv, int graph_id, int dir)
|
||||
{
|
||||
|
|
@ -643,9 +630,9 @@ struct q6apm_graph *q6apm_graph_open(struct device *dev, q6apm_cb cb,
|
|||
graph->dev = dev;
|
||||
|
||||
if (dir == SNDRV_PCM_STREAM_PLAYBACK)
|
||||
graph->shm_iid = q6apm_graph_get_rx_shmem_module_iid(graph);
|
||||
graph->shm_iid = q6apm_graph_get_module_iid(graph, MODULE_ID_WR_SHARED_MEM_EP);
|
||||
else
|
||||
graph->shm_iid = q6apm_graph_get_tx_shmem_module_iid(graph);
|
||||
graph->shm_iid = q6apm_graph_get_module_iid(graph, MODULE_ID_RD_SHARED_MEM_EP);
|
||||
|
||||
|
||||
mutex_init(&graph->lock);
|
||||
|
|
|
|||
|
|
@ -148,8 +148,6 @@ int q6apm_send_cmd_sync(struct q6apm *apm, const struct gpr_pkt *pkt,
|
|||
/* Callback for graph specific */
|
||||
struct audioreach_module *q6apm_find_module_by_mid(struct q6apm_graph *graph,
|
||||
uint32_t mid);
|
||||
int q6apm_graph_get_rx_shmem_module_iid(struct q6apm_graph *graph);
|
||||
|
||||
bool q6apm_is_adsp_ready(void);
|
||||
|
||||
int q6apm_enable_compress_module(struct device *dev, struct q6apm_graph *graph, bool en);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user