diff options
author | Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> | 2022-12-14 19:54:59 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-12-25 23:33:03 +0000 |
commit | be2b81b519d7121290cfecc5fdfb4907ecc41c39 (patch) | |
tree | f66b3cffdfb0e7a6996cbf6982fd43d2ae3b9d7e /sound/soc/intel/avs/control.c | |
parent | 585b9427edd65ad124e23affb80fca3d15a6375d (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 <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20221214185500.3896902-4-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/avs/control.c')
-rw-r--r-- | sound/soc/intel/avs/control.c | 10 |
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; } |