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);
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);
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);
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) {
}
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;
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;
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;
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;
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;
}
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;
}
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;
}
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;
}
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;
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;