Make "default" PCM card-specific

"default" PCM can be card-specific.
The definition is moved to pcm/default.conf, and read on-demmand via
aliases.conf.  The card config can override the default config.
This commit is contained in:
Takashi Iwai 2005-01-03 14:42:11 +00:00
parent eb69df65b3
commit d2a1301073
4 changed files with 47 additions and 33 deletions

View file

@ -1,4 +1,4 @@
cfg_files = front.conf rear.conf center_lfe.conf side.conf\
cfg_files = default.conf front.conf rear.conf center_lfe.conf side.conf\
surround40.conf surround41.conf \
surround50.conf surround51.conf \
surround71.conf iec958.conf modem.conf

39
src/conf/pcm/default.conf Normal file
View file

@ -0,0 +1,39 @@
#
# Default output
#
pcm.!default {
@args [ CARD ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_PCM_CARD
ALSA_CARD
]
default {
@func refer
name defaults.pcm.card
}
}
}
# use card-specific definition if exists
@func refer
name {
@func concat
strings [
"cards."
{
@func card_driver
card $CARD
}
".pcm.default:CARD=" $CARD
]
}
default {
# use plughw as default
type plug
slave.pcm hw
}
}