conf: make ctl.default and sysdefault devices more universal

It may be handy to add hw specific configs.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-04-06 18:19:48 +02:00
parent adce5f7b65
commit 42fe3e40ff
3 changed files with 45 additions and 16 deletions

42
src/conf/ctl/default.conf Normal file
View file

@ -0,0 +1,42 @@
#
# 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"
}