OSDN Git Service

ucm2: add initial alsa library helpers
authorJaroslav Kysela <perex@perex.cz>
Thu, 13 May 2021 14:28:04 +0000 (16:28 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 13 May 2021 14:28:45 +0000 (16:28 +0200)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/lib/card-init.conf [new file with mode: 0644]
ucm2/lib/generic.conf [new file with mode: 0644]

diff --git a/ucm2/lib/card-init.conf b/ucm2/lib/card-init.conf
new file mode 100644 (file)
index 0000000..85b011b
--- /dev/null
@@ -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 (file)
index 0000000..d2b78c9
--- /dev/null
@@ -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
+       }
+
+}