[ALSA-LIB PATCH] topology: Use bool parser to parse boolean value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 src/topology/dapm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/topology/dapm.c b/src/topology/dapm.c
index 70645126..cd1a8770 100644
--- a/src/topology/dapm.c
+++ b/src/topology/dapm.c
@@ -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;
-- 
2.17.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux