ucm2: use locale-agnostic character classes in parsing regexes
Several UCM configuration regexes parse CardComponents using POSIX
bracket *ranges* such as "[a-z0-9]", "[a-z0-9-]" and "[0-9a-f]".
Range expressions are locale sensitive: the set of characters covered
by "x-y" depends on the current collation order (LC_COLLATE), not on
code points.
Under the Turkish locale (tr_TR.UTF-8) the dotless/dotted 'i' handling
reorders the collation sequence, so "[a-z]" no longer matches every
lowercase ASCII letter. As a result the "mic:...-dmic" component in
sof-soundwire.conf is truncated (e.g. to "dm"), ALSA then tries to open
a non-existent "dm.conf" and the whole UCM import for the SoundWire card
aborts, leaving the user with a dummy-only audio profile (no speaker,
no microphone).
Fix the whole tree by switching to POSIX character classes, which are
defined by character classification instead of collation order and thus
match the intended ASCII set regardless of the active locale:
[[:xdigit:]] is used for the USB vendor/device IDs because it matches
exactly the hexadecimal digits (and, unlike [[:digit:]], stays
restricted to ASCII in glibc). Pure digit ranges such as "[0-9]" are
left untouched: digits do not collation-reorder and the range already
matches only ASCII digits.
Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/824 Signed-off-by: Jaroslav Kysela <perex@perex.cz>