]> git.alsa-project.org Git - alsa-lib.git/commit
ucm: add If condition block
authorJaroslav Kysela <perex@perex.cz>
Tue, 5 Nov 2019 12:02:41 +0000 (13:02 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 14 Nov 2019 14:00:37 +0000 (15:00 +0100)
commit8a36e38dc4eb623013eb40601d575702e033eb86
treee24ba9df1705b15d9cb7d64e43f66df488dc7298
parentb9b2247943751714151dc19de57905caf61c618b
ucm: add If condition block

The syntax is simple:

If./any-if-identificator/ {
  Condition {
    Type /type_here/
    /optional defines/
  }
  True {
    /block used when condition is evaluated as true/
  }
  False {
    /block used when condition is evaluated as false/
  }
}

The Type "ControlExists" is implemented:

Condition {
  Type ControlExists
  Device "hw:${CardId}"
  Control "iface=CARD,name='Headphone Jack'"
}

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
include/conf.h
src/ucm/Makefile.am
src/ucm/main.c
src/ucm/parser.c
src/ucm/ucm_cond.c [new file with mode: 0644]
src/ucm/ucm_local.h
src/ucm/ucm_subs.c [new file with mode: 0644]
src/ucm/utils.c