mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-13 05:33:42 -04:00
topology: use snd_config_get_bool() instead own implementation
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
f373bf1f6e
commit
5925a6d870
4 changed files with 34 additions and 28 deletions
|
|
@ -479,8 +479,7 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg,
|
|||
snd_config_iterator_t i, next;
|
||||
snd_config_t *n;
|
||||
const char *id, *val = NULL;
|
||||
int widget_type, err;
|
||||
int ival;
|
||||
int widget_type, err, ival;
|
||||
|
||||
elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_DAPM_WIDGET);
|
||||
if (!elem)
|
||||
|
|
@ -531,11 +530,11 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg,
|
|||
}
|
||||
|
||||
if (strcmp(id, "no_pm") == 0) {
|
||||
if (snd_config_get_string(n, &val) < 0)
|
||||
ival = snd_config_get_bool(n);
|
||||
if (ival < 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (strcmp(val, "true") == 0)
|
||||
widget->reg = -1;
|
||||
widget->reg = ival ? -1 : 0;
|
||||
|
||||
tplg_dbg("\t%s: %s\n", id, val);
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue