Re: [PATCH] ucm: Allow empty strings in "${var:...}" substitutions

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

 



Dne 27. 06. 20 v 20:30 Hans de Goede napsal(a):
Recent ucm-conf changes introduce checks like this one in various places:

If.mspk {
         Condition {
                 Type String
                 Empty "${var:MonoSpeaker}"
         }
         True ...
         False ...
}

The 'Empty "${var:MonoSpeaker}"' part can only every succeed if we do:

Define.MonoSpeaker ""

But so far that would result in an error like this one:

ALSA lib ucm_subs.c:367:(uc_mgr_get_substituted_value) variable '${var:MonoSpeaker}' is not defined in this context!
ALSA lib main.c:983:(snd_use_case_mgr_open) error: failed to import cht-bsw-rt5672 use case configuration -22
alsaucm: error failed to open sound card cht-bsw-rt5672: Invalid argument

This commit fixes this by allowing empty values for "${var:...}"
substitutions.

Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>

Mea culpa. I had this change in my local tree, but I forgot to push it upstream. Anyway, thank you for your work and testing. I accepted your commit to retain your credits.

					Jaroslav

--
Jaroslav Kysela <perex@xxxxxxxx>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.



[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