* [PATCH 2/6] ASoC: qcom: topology: Constify pointed topology and vendor structs
2025-11-29 14:02 [PATCH 0/6] ASoC: qcom: Constify few things in audioreach and topology Krzysztof Kozlowski
2025-11-29 14:02 ` [PATCH 1/6] ASoC: qcom: audioreach: Drop unused audioreach_control_load_mix() arguments Krzysztof Kozlowski
@ 2025-11-29 14:02 ` Krzysztof Kozlowski
2025-11-29 14:02 ` [PATCH 3/6] ASoC: qcom: topology: Constify pointed ar control structs Krzysztof Kozlowski
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-11-29 14:02 UTC (permalink / raw)
To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai
Cc: linux-sound, linux-arm-msm, linux-kernel, Krzysztof Kozlowski
Several functions in topology.c receive pointers to 'struct
snd_soc_tplg_vendor_array' and 'struct snd_soc_tplg_private', and do not
modify their contents. Constify the pointers for self-explanatory code
(pointed memory is not modified by the function) and a bit safer code.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
sound/soc/qcom/qdsp6/topology.c | 70 ++++++++++++++++++++---------------------
1 file changed, 35 insertions(+), 35 deletions(-)
diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topology.c
index 5d138a956ca8..748a3b7fa78d 100644
--- a/sound/soc/qcom/qdsp6/topology.c
+++ b/sound/soc/qcom/qdsp6/topology.c
@@ -206,15 +206,15 @@ static struct audioreach_module *audioreach_tplg_alloc_module(struct q6apm *apm,
return mod;
}
-static struct snd_soc_tplg_vendor_array *audioreach_get_sg_array(
- struct snd_soc_tplg_private *private)
+static const struct snd_soc_tplg_vendor_array *
+audioreach_get_sg_array(const struct snd_soc_tplg_private *private)
{
- struct snd_soc_tplg_vendor_array *sg_array = NULL;
+ const struct snd_soc_tplg_vendor_array *sg_array = NULL;
bool found = false;
int sz;
for (sz = 0; !found && (sz < le32_to_cpu(private->size)); ) {
- struct snd_soc_tplg_vendor_value_elem *sg_elem;
+ const struct snd_soc_tplg_vendor_value_elem *sg_elem;
int tkn_count = 0;
sg_array = (struct snd_soc_tplg_vendor_array *)((u8 *)private->array + sz);
@@ -239,15 +239,15 @@ static struct snd_soc_tplg_vendor_array *audioreach_get_sg_array(
return NULL;
}
-static struct snd_soc_tplg_vendor_array *audioreach_get_cont_array(
- struct snd_soc_tplg_private *private)
+static const struct snd_soc_tplg_vendor_array *
+audioreach_get_cont_array(const struct snd_soc_tplg_private *private)
{
- struct snd_soc_tplg_vendor_array *cont_array = NULL;
+ const struct snd_soc_tplg_vendor_array *cont_array = NULL;
bool found = false;
int sz;
for (sz = 0; !found && (sz < le32_to_cpu(private->size)); ) {
- struct snd_soc_tplg_vendor_value_elem *cont_elem;
+ const struct snd_soc_tplg_vendor_value_elem *cont_elem;
int tkn_count = 0;
cont_array = (struct snd_soc_tplg_vendor_array *)((u8 *)private->array + sz);
@@ -272,15 +272,15 @@ static struct snd_soc_tplg_vendor_array *audioreach_get_cont_array(
return NULL;
}
-static struct snd_soc_tplg_vendor_array *audioreach_get_module_array(
- struct snd_soc_tplg_private *private)
+static const struct snd_soc_tplg_vendor_array *
+audioreach_get_module_array(const struct snd_soc_tplg_private *private)
{
- struct snd_soc_tplg_vendor_array *mod_array = NULL;
+ const struct snd_soc_tplg_vendor_array *mod_array = NULL;
bool found = false;
int sz = 0;
for (sz = 0; !found && (sz < le32_to_cpu(private->size)); ) {
- struct snd_soc_tplg_vendor_value_elem *mod_elem;
+ const struct snd_soc_tplg_vendor_value_elem *mod_elem;
int tkn_count = 0;
mod_array = (struct snd_soc_tplg_vendor_array *)((u8 *)private->array + sz);
@@ -305,13 +305,13 @@ 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)
+static struct audioreach_module_priv_data *
+audioreach_get_module_priv_data(const 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;
+ const struct snd_soc_tplg_vendor_array *mod_array;
mod_array = (struct snd_soc_tplg_vendor_array *)((u8 *)private->array + sz);
if (le32_to_cpu(mod_array->type) == SND_SOC_AR_TPLG_MODULE_CFG_TYPE) {
@@ -334,10 +334,10 @@ static struct audioreach_module_priv_data *audioreach_get_module_priv_data(
}
static struct audioreach_sub_graph *audioreach_parse_sg_tokens(struct q6apm *apm,
- struct snd_soc_tplg_private *private)
+ const struct snd_soc_tplg_private *private)
{
- struct snd_soc_tplg_vendor_value_elem *sg_elem;
- struct snd_soc_tplg_vendor_array *sg_array;
+ const struct snd_soc_tplg_vendor_value_elem *sg_elem;
+ const struct snd_soc_tplg_vendor_array *sg_array;
struct audioreach_graph_info *info = NULL;
int graph_id, sub_graph_id, tkn_count = 0;
struct audioreach_sub_graph *sg;
@@ -392,10 +392,10 @@ static struct audioreach_sub_graph *audioreach_parse_sg_tokens(struct q6apm *apm
static struct audioreach_container *audioreach_parse_cont_tokens(struct q6apm *apm,
struct audioreach_sub_graph *sg,
- struct snd_soc_tplg_private *private)
+ const struct snd_soc_tplg_private *private)
{
- struct snd_soc_tplg_vendor_value_elem *cont_elem;
- struct snd_soc_tplg_vendor_array *cont_array;
+ const struct snd_soc_tplg_vendor_value_elem *cont_elem;
+ const struct snd_soc_tplg_vendor_array *cont_array;
struct audioreach_container *cont;
int container_id, tkn_count = 0;
bool found = false;
@@ -437,7 +437,7 @@ static struct audioreach_container *audioreach_parse_cont_tokens(struct q6apm *a
static struct audioreach_module *audioreach_parse_common_tokens(struct q6apm *apm,
struct audioreach_container *cont,
- struct snd_soc_tplg_private *private,
+ const struct snd_soc_tplg_private *private,
struct snd_soc_dapm_widget *w)
{
uint32_t max_ip_port = 0, max_op_port = 0;
@@ -447,8 +447,8 @@ static struct audioreach_module *audioreach_parse_common_tokens(struct q6apm *ap
uint32_t src_mod_inst_id = 0;
int module_id = 0, instance_id = 0, tkn_count = 0;
- struct snd_soc_tplg_vendor_value_elem *mod_elem;
- struct snd_soc_tplg_vendor_array *mod_array;
+ const struct snd_soc_tplg_vendor_value_elem *mod_elem;
+ const struct snd_soc_tplg_vendor_array *mod_array;
struct audioreach_module *mod = NULL;
uint32_t token;
bool found;
@@ -622,8 +622,8 @@ static int audioreach_widget_load_enc_dec_cnv(struct snd_soc_component *componen
int index, struct snd_soc_dapm_widget *w,
struct snd_soc_tplg_dapm_widget *tplg_w)
{
- struct snd_soc_tplg_vendor_value_elem *mod_elem;
- struct snd_soc_tplg_vendor_array *mod_array;
+ const struct snd_soc_tplg_vendor_value_elem *mod_elem;
+ const struct snd_soc_tplg_vendor_array *mod_array;
struct audioreach_module *mod;
struct snd_soc_dobj *dobj;
int tkn_count = 0;
@@ -660,9 +660,9 @@ static int audioreach_widget_load_enc_dec_cnv(struct snd_soc_component *componen
}
static int audioreach_widget_log_module_load(struct audioreach_module *mod,
- struct snd_soc_tplg_vendor_array *mod_array)
+ const struct snd_soc_tplg_vendor_array *mod_array)
{
- struct snd_soc_tplg_vendor_value_elem *mod_elem;
+ const struct snd_soc_tplg_vendor_value_elem *mod_elem;
int tkn_count = 0;
mod_elem = mod_array->value;
@@ -690,9 +690,9 @@ static int audioreach_widget_log_module_load(struct audioreach_module *mod,
}
static int audioreach_widget_dma_module_load(struct audioreach_module *mod,
- struct snd_soc_tplg_vendor_array *mod_array)
+ const struct snd_soc_tplg_vendor_array *mod_array)
{
- struct snd_soc_tplg_vendor_value_elem *mod_elem;
+ const struct snd_soc_tplg_vendor_value_elem *mod_elem;
int tkn_count = 0;
mod_elem = mod_array->value;
@@ -719,9 +719,9 @@ static int audioreach_widget_dma_module_load(struct audioreach_module *mod,
}
static int audioreach_widget_i2s_module_load(struct audioreach_module *mod,
- struct snd_soc_tplg_vendor_array *mod_array)
+ const struct snd_soc_tplg_vendor_array *mod_array)
{
- struct snd_soc_tplg_vendor_value_elem *mod_elem;
+ const struct snd_soc_tplg_vendor_value_elem *mod_elem;
int tkn_count = 0;
mod_elem = mod_array->value;
@@ -754,9 +754,9 @@ static int audioreach_widget_i2s_module_load(struct audioreach_module *mod,
}
static int audioreach_widget_dp_module_load(struct audioreach_module *mod,
- struct snd_soc_tplg_vendor_array *mod_array)
+ const struct snd_soc_tplg_vendor_array *mod_array)
{
- struct snd_soc_tplg_vendor_value_elem *mod_elem;
+ const struct snd_soc_tplg_vendor_value_elem *mod_elem;
int tkn_count = 0;
mod_elem = mod_array->value;
@@ -780,7 +780,7 @@ static int audioreach_widget_load_buffer(struct snd_soc_component *component,
int index, struct snd_soc_dapm_widget *w,
struct snd_soc_tplg_dapm_widget *tplg_w)
{
- struct snd_soc_tplg_vendor_array *mod_array;
+ const struct snd_soc_tplg_vendor_array *mod_array;
struct audioreach_module *mod;
struct snd_soc_dobj *dobj;
int ret;
--
2.48.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 6/6] ASoC: qcom: audioreach: Constify function arguments
2025-11-29 14:02 [PATCH 0/6] ASoC: qcom: Constify few things in audioreach and topology Krzysztof Kozlowski
` (4 preceding siblings ...)
2025-11-29 14:02 ` [PATCH 5/6] ASoC: qcom: topology: Constify pointed snd_soc_tplg_dapm_widget Krzysztof Kozlowski
@ 2025-11-29 14:02 ` Krzysztof Kozlowski
5 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-11-29 14:02 UTC (permalink / raw)
To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai
Cc: linux-sound, linux-arm-msm, linux-kernel, Krzysztof Kozlowski
Several functions receive pointers to parsed Audioreach topology (e.g.
'struct audioreach_container', 'struct audioreach_module') and they do
not modify their contents, but copy their data to send to the ADSP.
Constify the pointers for self-explanatory code (pointed memory is not
modified by the function) and a bit safer code.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
sound/soc/qcom/qdsp6/audioreach.c | 81 ++++++++++++++++++++++-----------------
sound/soc/qcom/qdsp6/audioreach.h | 16 ++++----
2 files changed, 54 insertions(+), 43 deletions(-)
diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audioreach.c
index f3fa0a5b4095..3bb073de03be 100644
--- a/sound/soc/qcom/qdsp6/audioreach.c
+++ b/sound/soc/qcom/qdsp6/audioreach.c
@@ -284,7 +284,7 @@ void audioreach_set_default_channel_mapping(u8 *ch_map, int num_channels)
EXPORT_SYMBOL_GPL(audioreach_set_default_channel_mapping);
static void apm_populate_container_config(struct apm_container_obj *cfg,
- struct audioreach_container *cont)
+ const struct audioreach_container *cont)
{
/* Container Config */
@@ -314,7 +314,7 @@ static void apm_populate_container_config(struct apm_container_obj *cfg,
}
static void apm_populate_sub_graph_config(struct apm_sub_graph_data *cfg,
- struct audioreach_sub_graph *sg)
+ const struct audioreach_sub_graph *sg)
{
cfg->sub_graph_cfg.sub_graph_id = sg->sub_graph_id;
cfg->sub_graph_cfg.num_sub_graph_prop = APM_SUB_GRAPH_CFG_NPROP;
@@ -336,7 +336,7 @@ static void apm_populate_sub_graph_config(struct apm_sub_graph_data *cfg,
}
static void apm_populate_module_prop_obj(struct apm_mod_prop_obj *obj,
- struct audioreach_module *module)
+ const struct audioreach_module *module)
{
obj->instance_id = module->instance_id;
@@ -348,7 +348,7 @@ static void apm_populate_module_prop_obj(struct apm_mod_prop_obj *obj,
}
static void apm_populate_module_list_obj(struct apm_mod_list_obj *obj,
- struct audioreach_container *container,
+ const struct audioreach_container *container,
int sub_graph_id)
{
struct audioreach_module *module;
@@ -365,9 +365,10 @@ static void apm_populate_module_list_obj(struct apm_mod_list_obj *obj,
}
}
-static void audioreach_populate_graph(struct q6apm *apm, struct audioreach_graph_info *info,
+static void audioreach_populate_graph(struct q6apm *apm,
+ const struct audioreach_graph_info *info,
struct apm_graph_open_params *open,
- struct list_head *sg_list,
+ const struct list_head *sg_list,
int num_sub_graphs)
{
struct apm_mod_conn_list_params *mc_data = open->mod_conn_list_data;
@@ -439,7 +440,8 @@ static void audioreach_populate_graph(struct q6apm *apm, struct audioreach_graph
}
}
-void *audioreach_alloc_graph_pkt(struct q6apm *apm, struct audioreach_graph_info *info)
+void *audioreach_alloc_graph_pkt(struct q6apm *apm,
+ const struct audioreach_graph_info *info)
{
int payload_size, sg_sz, cont_sz, ml_sz, mp_sz, mc_sz;
struct apm_module_param_data *param_data;
@@ -452,7 +454,7 @@ void *audioreach_alloc_graph_pkt(struct q6apm *apm, struct audioreach_graph_info
struct audioreach_module *module;
struct audioreach_sub_graph *sgs;
struct apm_mod_list_obj *mlobj;
- struct list_head *sg_list;
+ const struct list_head *sg_list;
int num_connections = 0;
int num_containers = 0;
int num_sub_graphs = 0;
@@ -605,8 +607,8 @@ int audioreach_graph_send_cmd_sync(struct q6apm_graph *graph, struct gpr_pkt *pk
EXPORT_SYMBOL_GPL(audioreach_graph_send_cmd_sync);
static int audioreach_display_port_set_media_format(struct q6apm_graph *graph,
- struct audioreach_module *module,
- struct audioreach_module_config *cfg)
+ const struct audioreach_module *module,
+ const struct audioreach_module_config *cfg)
{
struct apm_display_port_module_intf_cfg *intf_cfg;
struct apm_module_frame_size_factor_cfg *fs_cfg;
@@ -662,8 +664,8 @@ static int audioreach_display_port_set_media_format(struct q6apm_graph *graph,
/* LPASS Codec DMA port Module Media Format Setup */
static int audioreach_codec_dma_set_media_format(struct q6apm_graph *graph,
- struct audioreach_module *module,
- struct audioreach_module_config *cfg)
+ const struct audioreach_module *module,
+ const struct audioreach_module_config *cfg)
{
struct apm_codec_dma_module_intf_cfg *intf_cfg;
struct apm_module_frame_size_factor_cfg *fs_cfg;
@@ -728,7 +730,8 @@ static int audioreach_codec_dma_set_media_format(struct q6apm_graph *graph,
return q6apm_send_cmd_sync(graph->apm, pkt, 0);
}
-int audioreach_send_u32_param(struct q6apm_graph *graph, struct audioreach_module *module,
+int audioreach_send_u32_param(struct q6apm_graph *graph,
+ const struct audioreach_module *module,
uint32_t param_id, uint32_t param_val)
{
struct apm_module_param_data *param_data;
@@ -757,36 +760,37 @@ int audioreach_send_u32_param(struct q6apm_graph *graph, struct audioreach_modul
EXPORT_SYMBOL_GPL(audioreach_send_u32_param);
static int audioreach_sal_limiter_enable(struct q6apm_graph *graph,
- struct audioreach_module *module, bool enable)
+ const struct audioreach_module *module,
+ bool enable)
{
return audioreach_send_u32_param(graph, module, PARAM_ID_SAL_LIMITER_ENABLE, enable);
}
static int audioreach_sal_set_media_format(struct q6apm_graph *graph,
- struct audioreach_module *module,
- struct audioreach_module_config *cfg)
+ const struct audioreach_module *module,
+ const struct audioreach_module_config *cfg)
{
return audioreach_send_u32_param(graph, module, PARAM_ID_SAL_OUTPUT_CFG, cfg->bit_width);
}
static int audioreach_module_enable(struct q6apm_graph *graph,
- struct audioreach_module *module,
+ const struct audioreach_module *module,
bool enable)
{
return audioreach_send_u32_param(graph, module, PARAM_ID_MODULE_ENABLE, enable);
}
static int audioreach_gapless_set_media_format(struct q6apm_graph *graph,
- struct audioreach_module *module,
- struct audioreach_module_config *cfg)
+ const struct audioreach_module *module,
+ const struct audioreach_module_config *cfg)
{
return audioreach_send_u32_param(graph, module, PARAM_ID_EARLY_EOS_DELAY,
EARLY_EOS_DELAY_MS);
}
static int audioreach_set_module_config(struct q6apm_graph *graph,
- struct audioreach_module *module,
- struct audioreach_module_config *cfg)
+ const struct audioreach_module *module,
+ const struct audioreach_module_config *cfg)
{
int size = le32_to_cpu(module->data->size);
void *p;
@@ -803,8 +807,8 @@ static int audioreach_set_module_config(struct q6apm_graph *graph,
}
static int audioreach_mfc_set_media_format(struct q6apm_graph *graph,
- struct audioreach_module *module,
- struct audioreach_module_config *cfg)
+ const struct audioreach_module *module,
+ const struct audioreach_module_config *cfg)
{
struct apm_module_param_data *param_data;
struct param_id_mfc_media_format *media_format;
@@ -838,7 +842,8 @@ static int audioreach_mfc_set_media_format(struct q6apm_graph *graph,
}
static int audioreach_set_compr_media_format(struct media_format *media_fmt_hdr,
- void *p, struct audioreach_module_config *mcfg)
+ void *p,
+ const struct audioreach_module_config *mcfg)
{
struct payload_media_fmt_aac_t *aac_cfg;
struct payload_media_fmt_pcm *mp3_cfg;
@@ -919,7 +924,8 @@ static int audioreach_set_compr_media_format(struct media_format *media_fmt_hdr,
return 0;
}
-int audioreach_compr_set_param(struct q6apm_graph *graph, struct audioreach_module_config *mcfg)
+int audioreach_compr_set_param(struct q6apm_graph *graph,
+ const struct audioreach_module_config *mcfg)
{
struct media_format *header;
int rc;
@@ -944,8 +950,8 @@ int audioreach_compr_set_param(struct q6apm_graph *graph, struct audioreach_modu
EXPORT_SYMBOL_GPL(audioreach_compr_set_param);
static int audioreach_i2s_set_media_format(struct q6apm_graph *graph,
- struct audioreach_module *module,
- struct audioreach_module_config *cfg)
+ const struct audioreach_module *module,
+ const struct audioreach_module_config *cfg)
{
struct apm_module_frame_size_factor_cfg *fs_cfg;
struct apm_module_param_data *param_data;
@@ -1012,7 +1018,7 @@ static int audioreach_i2s_set_media_format(struct q6apm_graph *graph,
}
static int audioreach_logging_set_media_format(struct q6apm_graph *graph,
- struct audioreach_module *module)
+ const struct audioreach_module *module)
{
struct apm_module_param_data *param_data;
struct data_logging_config *cfg;
@@ -1041,8 +1047,8 @@ static int audioreach_logging_set_media_format(struct q6apm_graph *graph,
}
static int audioreach_pcm_set_media_format(struct q6apm_graph *graph,
- struct audioreach_module *module,
- struct audioreach_module_config *mcfg)
+ const struct audioreach_module *module,
+ const struct audioreach_module_config *mcfg)
{
struct payload_pcm_output_format_cfg *media_cfg;
uint32_t num_channels = mcfg->num_channels;
@@ -1088,8 +1094,8 @@ static int audioreach_pcm_set_media_format(struct q6apm_graph *graph,
}
static int audioreach_shmem_set_media_format(struct q6apm_graph *graph,
- struct audioreach_module *module,
- struct audioreach_module_config *mcfg)
+ const struct audioreach_module *module,
+ const struct audioreach_module_config *mcfg)
{
uint32_t num_channels = mcfg->num_channels;
struct apm_module_param_data *param_data;
@@ -1145,7 +1151,8 @@ static int audioreach_shmem_set_media_format(struct q6apm_graph *graph,
return audioreach_graph_send_cmd_sync(graph, pkt, 0);
}
-int audioreach_gain_set_vol_ctrl(struct q6apm *apm, struct audioreach_module *module, int vol)
+int audioreach_gain_set_vol_ctrl(struct q6apm *apm,
+ const struct audioreach_module *module, int vol)
{
struct param_id_vol_ctrl_master_gain *cfg;
struct apm_module_param_data *param_data;
@@ -1170,7 +1177,8 @@ int audioreach_gain_set_vol_ctrl(struct q6apm *apm, struct audioreach_module *mo
}
EXPORT_SYMBOL_GPL(audioreach_gain_set_vol_ctrl);
-static int audioreach_gain_set(struct q6apm_graph *graph, struct audioreach_module *module)
+static int audioreach_gain_set(struct q6apm_graph *graph,
+ const struct audioreach_module *module)
{
struct apm_module_param_data *param_data;
struct apm_gain_module_cfg *cfg;
@@ -1192,8 +1200,9 @@ static int audioreach_gain_set(struct q6apm_graph *graph, struct audioreach_modu
return q6apm_send_cmd_sync(graph->apm, pkt, 0);
}
-int audioreach_set_media_format(struct q6apm_graph *graph, struct audioreach_module *module,
- struct audioreach_module_config *cfg)
+int audioreach_set_media_format(struct q6apm_graph *graph,
+ const struct audioreach_module *module,
+ const struct audioreach_module_config *cfg)
{
int rc;
diff --git a/sound/soc/qcom/qdsp6/audioreach.h b/sound/soc/qcom/qdsp6/audioreach.h
index d1b60b36468a..3b7d9bca4820 100644
--- a/sound/soc/qcom/qdsp6/audioreach.h
+++ b/sound/soc/qcom/qdsp6/audioreach.h
@@ -792,8 +792,8 @@ void *audioreach_alloc_apm_pkt(int pkt_size, uint32_t opcode, uint32_t token,
void *audioreach_alloc_pkt(int payload_size, uint32_t opcode,
uint32_t token, uint32_t src_port,
uint32_t dest_port);
-void *audioreach_alloc_graph_pkt(struct q6apm *apm, struct audioreach_graph_info
- *info);
+void *audioreach_alloc_graph_pkt(struct q6apm *apm,
+ const struct audioreach_graph_info *info);
/* Topology specific */
int audioreach_tplg_init(struct snd_soc_component *component);
@@ -809,13 +809,15 @@ int audioreach_send_cmd_sync(struct device *dev, gpr_device_t *gdev, struct gpr_
int audioreach_graph_send_cmd_sync(struct q6apm_graph *graph, struct gpr_pkt *pkt,
uint32_t rsp_opcode);
int audioreach_set_media_format(struct q6apm_graph *graph,
- struct audioreach_module *module,
- struct audioreach_module_config *cfg);
+ const struct audioreach_module *module,
+ const struct audioreach_module_config *cfg);
int audioreach_shared_memory_send_eos(struct q6apm_graph *graph);
int audioreach_gain_set_vol_ctrl(struct q6apm *apm,
- struct audioreach_module *module, int vol);
-int audioreach_send_u32_param(struct q6apm_graph *graph, struct audioreach_module *module,
+ const struct audioreach_module *module, int vol);
+int audioreach_send_u32_param(struct q6apm_graph *graph,
+ const struct audioreach_module *module,
uint32_t param_id, uint32_t param_val);
-int audioreach_compr_set_param(struct q6apm_graph *graph, struct audioreach_module_config *mcfg);
+int audioreach_compr_set_param(struct q6apm_graph *graph,
+ const struct audioreach_module_config *mcfg);
#endif /* __AUDIOREACH_H__ */
--
2.48.1
^ permalink raw reply related [flat|nested] 10+ messages in thread