]> git.alsa-project.org Git - alsa-lib.git/commit
ucm: Do not fail to parse configs on cards with an empty CardComponents lists
authorHans de Goede <hdegoede@redhat.com>
Tue, 3 Dec 2019 17:27:39 +0000 (18:27 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 3 Dec 2019 19:37:43 +0000 (20:37 +0100)
commite59034a0bec257cc7422a1e9436d936be8696a6f
treef27ea818ef6c343550d73c89a7b930e44888a6bf
parenta0fc4447bb7c7f9a850a0a85f3a5a32c1509caf4
ucm: Do not fail to parse configs on cards with an empty CardComponents lists

Since the UCM profiles for all Bay- and Cherry-Trail SST cards have been
moved over to UCM2, parsing them fails with:

ALSA lib ucm_subs.c:220:(uc_mgr_get_substituted_value) variable '${CardComponents}' is not defined in this context!

This completely breaks audio support on all Bay- and Cherry-Trail devices.

This is caused by these non-SOF ASoC using cards having an empty
CardComponents list. Which in itself is fine, but is rejected by
the ucm_subs.c code. This commit changes the ucm_subs code to accept
an empty string as a valid value for CardComponents restoring audio
functionality on these boards.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/ucm_subs.c