aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2021-05-13 16:28:04 +0200
committerJaroslav Kysela <perex@perex.cz>2021-05-13 16:28:45 +0200
commit548036b8ecc92d4e8e2070046551fb0b8acb7d96 (patch)
treedb588c0e980be610a15cefdfa92bc56940cae146
parentf801800b83a64046d86d43d83f04156cf4521c37 (diff)
ucm2: add initial alsa library helpers
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--ucm2/lib/card-init.conf10
-rw-r--r--ucm2/lib/generic.conf29
2 files changed, 39 insertions, 0 deletions
diff --git a/ucm2/lib/card-init.conf b/ucm2/lib/card-init.conf
new file mode 100644
index 0000000..85b011b
--- /dev/null
+++ b/ucm2/lib/card-init.conf
@@ -0,0 +1,10 @@
+#
+# Manage directory for the card specific configuration
+#
+
+Define.LibDir "/var/lib/alsa/card${CardNumber}.conf.d"
+
+FixedBootSequence [
+ exec "/bin/rm -rf ${var:LibDir}/"
+ exec "/bin/mkdir -p -m 0755 ${var:LibDir}"
+]
diff --git a/ucm2/lib/generic.conf b/ucm2/lib/generic.conf
new file mode 100644
index 0000000..d2b78c9
--- /dev/null
+++ b/ucm2/lib/generic.conf
@@ -0,0 +1,29 @@
+#
+# This is generic UCM configuration for alsa-lib
+# Only hw devices are exposed to the UCM application
+# Users are not allowed to overwrite this configuration
+#
+
+LibraryConfig.generic.SubstiConfig {
+
+ ctl.hw {
+ @args [ CARD ]
+ @args.CARD.type string
+ type hw
+ card $CARD
+ }
+
+ pcm.hw {
+ @args [ CARD DEV SUBDEV ]
+ @args {
+ CARD.type string
+ DEV.type integer
+ SUBDEV.type integer
+ }
+ type hw
+ card $CARD
+ device $DEV
+ subdevice $SUBDEV
+ }
+
+}