mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-23 01:26:31 +01:00
pre-process-object: skip parent update if parent is NULL
Nothing to do for top-level objects with no parent. Also, add access to the bytes control template. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
268f599d24
commit
3c81766242
1 changed files with 5 additions and 0 deletions
|
@ -87,6 +87,10 @@ int tplg_parent_update(struct tplg_pre_processor *tplg_pp, snd_config_t *parent,
|
||||||
char *item_id;
|
char *item_id;
|
||||||
int ret, id = 0;
|
int ret, id = 0;
|
||||||
|
|
||||||
|
/* Nothing to do if parent is NULL */
|
||||||
|
if (!parent)
|
||||||
|
return 0;
|
||||||
|
|
||||||
child = tplg_object_get_instance_config(tplg_pp, parent);
|
child = tplg_object_get_instance_config(tplg_pp, parent);
|
||||||
ret = snd_config_search(child, "name", &cfg);
|
ret = snd_config_search(child, "name", &cfg);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
@ -963,6 +967,7 @@ const struct config_template_items mixer_control_config = {
|
||||||
|
|
||||||
const struct config_template_items bytes_control_config = {
|
const struct config_template_items bytes_control_config = {
|
||||||
.int_config_ids = {"index", "base", "num_regs", "max", "mask"},
|
.int_config_ids = {"index", "base", "num_regs", "max", "mask"},
|
||||||
|
.compound_config_ids = {"access"}
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct config_template_items scale_config = {
|
const struct config_template_items scale_config = {
|
||||||
|
|
Loading…
Reference in a new issue