It may be handy to add hw specific configs.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
# Control interface
#
-ctl.sysdefault {
- type hw
- card {
- @func getenv
- vars [
- ALSA_CTL_CARD
- ALSA_CARD
- ]
- default {
- @func refer
- name defaults.ctl.card
- }
- }
- hint.description "Default control device"
-}
-ctl.default ctl.sysdefault
+ctl.default cards.ctl.default
+ctl.sysdefault cards.ctl.default
ctl.hw {
@args [ CARD ]
pistachio cards.pistachio-card
VC4-HDMI cards.vc4-hdmi
+<confdir:ctl/default.conf>
<confdir:pcm/default.conf>
<confdir:pcm/dmix.conf>
<confdir:pcm/dsnoop.conf>
--- /dev/null
+#
+# Default control device
+#
+
+ctl.!default {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ default {
+ @func getenv
+ vars [
+ ALSA_PCM_CARD
+ ALSA_CARD
+ ]
+ default {
+ @func refer
+ name defaults.ctl.card
+ }
+ }
+ }
+ type empty
+ child {
+ # use card-specific definition if exists
+ @func refer
+ name {
+ @func concat
+ strings [
+ "cards."
+ {
+ @func card_driver
+ card $CARD
+ }
+ ".ctl.default:CARD=" $CARD
+ ]
+ }
+ default {
+ type hw
+ card $CARD
+ }
+ }
+ hint.description "Default Control Device"
+}