[alsa-lib] ucm: setup conf_format after getting ALSA_CONFIG_UCM_VAR successfully
diff mbox series

Message ID 1576044439-2158-1-git-send-email-libin.yang@linux.intel.com
State New
Headers show
Series
  • [alsa-lib] ucm: setup conf_format after getting ALSA_CONFIG_UCM_VAR successfully
Related show

Commit Message

libin.yang@linux.intel.com Dec. 11, 2019, 6:07 a.m. UTC
From: Libin Yang <libin.yang@linux.intel.com>

Set the conf_format to 1 after getting ALSA_CONFIG_UCM_VAR successfully.
Otherwise, the conf_format is not set in this scenario.

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
---
 src/ucm/parser.c | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox series

diff --git a/src/ucm/parser.c b/src/ucm/parser.c
index ba50027..d61124a 100644
--- a/src/ucm/parser.c
+++ b/src/ucm/parser.c
@@ -89,6 +89,8 @@  static void configuration_filename(snd_use_case_mgr_t *uc_mgr,
 		env = getenv(ALSA_CONFIG_UCM2_VAR);
 		if (env == NULL) {
 			env = getenv(ALSA_CONFIG_UCM_VAR);
+			if (env)
+				uc_mgr->conf_format = 1;
 		} else {
 			uc_mgr->conf_format = 2;
 		}