
27 Sep
2021
27 Sep
'21
6:21 p.m.
+static int audioreach_control_load_mix(struct snd_soc_component *scomp,
struct snd_ar_control *scontrol,
struct snd_kcontrol_new *kc,
struct snd_soc_tplg_ctl_hdr *hdr)
+{
- struct snd_soc_tplg_vendor_value_elem *c_elem;
- struct snd_soc_tplg_vendor_array *c_array;
- struct snd_soc_tplg_mixer_control *mc;
- int tkn_count = 0;
- mc = container_of(hdr, struct snd_soc_tplg_mixer_control, hdr);
- c_array = (struct snd_soc_tplg_vendor_array *)mc->priv.data;
- c_elem = c_array->value;
- while (tkn_count <= (le32_to_cpu(c_array->num_elems) - 1)) {
switch (le32_to_cpu(c_elem->token)) {
case AR_TKN_U32_SUB_GRAPH_INSTANCE_ID:
scontrol->sgid = le32_to_cpu(c_elem->value);
break;
default:
/* Ignore other tokens */
break;
indentation still off
}
c_elem++;
tkn_count++;
- }
- return 0;
+}