mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
topology: Use bool parser to parse boolean value
It should be safe to change this as correct values with int would be 0 or 1 and bool parser handles them correctly. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
4327660c71
commit
496e239e65
1 changed files with 2 additions and 1 deletions
|
|
@ -595,7 +595,8 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg,
|
|||
}
|
||||
|
||||
if (strcmp(id, "invert") == 0) {
|
||||
if (tplg_get_integer(n, &ival, 0))
|
||||
ival = snd_config_get_bool(n);
|
||||
if (ival < 0)
|
||||
return -EINVAL;
|
||||
|
||||
widget->invert = ival;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue