aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/intel/avs/control.c
diff options
context:
space:
mode:
authorAmadeusz Sławiński <[email protected]>2022-12-14 19:54:59 +0100
committerMark Brown <[email protected]>2022-12-25 23:33:03 +0000
commitbe2b81b519d7121290cfecc5fdfb4907ecc41c39 (patch)
treef66b3cffdfb0e7a6996cbf6982fd43d2ae3b9d7e /sound/soc/intel/avs/control.c
parent585b9427edd65ad124e23affb80fca3d15a6375d (diff)
ASoC: Intel: avs: Parse control tuples
Add callback to handle loading of kcontrol and linking it to active widget. In order to link kcontrol to specific modules add additional field to module data, as well as specify control id in kcontrol data. Co-authored-by: Cezary Rojewski <[email protected]> Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'sound/soc/intel/avs/control.c')
-rw-r--r--sound/soc/intel/avs/control.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/intel/avs/control.c b/sound/soc/intel/avs/control.c
index 92b3aad0baca..a8b14b784f8a 100644
--- a/sound/soc/intel/avs/control.c
+++ b/sound/soc/intel/avs/control.c
@@ -23,6 +23,16 @@ static struct avs_dev *avs_get_kcontrol_adev(struct snd_kcontrol *kcontrol)
static struct avs_path_module *avs_get_kcontrol_module(struct avs_dev *adev, u32 id)
{
+ struct avs_path *path;
+ struct avs_path_pipeline *ppl;
+ struct avs_path_module *mod;
+
+ list_for_each_entry(path, &adev->path_list, node)
+ list_for_each_entry(ppl, &path->ppl_list, node)
+ list_for_each_entry(mod, &ppl->mod_list, node)
+ if (mod->template->ctl_id && mod->template->ctl_id == id)
+ return mod;
+
return NULL;
}