]> git.alsa-project.org Git - alsa-lib.git/commit
ucm: add LibraryConfig support
authorJaroslav Kysela <perex@perex.cz>
Mon, 12 Apr 2021 16:09:21 +0000 (18:09 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 13 Apr 2021 15:14:28 +0000 (17:14 +0200)
commit8f5779eb3fe43ba8b61490db5292720413fb2d31
tree88cf1d1fdf41fbc3900e460fd42892a5cf114d99
parent3e0140088c212cfe3840d1b8dd2baab11d1ada44
ucm: add LibraryConfig support

This commit allows to define private alsa-lib's configuration. When
the configuration is present, the device values ("PlaybackCTL",
"CaptureCTL", "PlaybackMixer", "CaptureMixer", "CapturePCM")
are prefixed with '_ucmHEXA.' string where HEXA is replaced by the
unique hexadecimal number identifying the opened ucm manager handle.

    Syntax 4

    LibraryConfig.a_label.SubstiConfig {
            # substituted library configuration like:
            usr_share_dir "${ConfLibDir}"
    }

    LibraryConfig.b_label.Config {
            # non-substituted library configuration like:
            usr_share_dir "/usr/share/alsa"
    }

    The File counterparts:

    LibraryConfig.c_label.SubstiFile "/some/path"
    LibraryConfig.d_label.File "/some/path"

Note that for files the contents is substituted on the request,
but the file name is always substituted (useful for ${ConfDir} etc.).

The private configuration is not saved or preserved. It's life time
belongs to the opened ucm manager handle.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
include/local.h
include/use-case.h
src/control/control.c
src/pcm/pcm.c
src/rawmidi/rawmidi.c
src/seq/seq.c
src/timer/timer.c
src/ucm/main.c
src/ucm/parser.c
src/ucm/ucm_local.h
src/ucm/utils.c