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:
Amadeusz Sławiński 2020-04-17 12:47:47 -04:00 committed by Jaroslav Kysela
parent 4327660c71
commit 496e239e65

View file

@ -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;