mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-24 07:00:01 -05:00
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:
parent
eb69df65b3
commit
d2a1301073
4 changed files with 47 additions and 33 deletions
|
|
@ -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
39
src/conf/pcm/default.conf
Normal 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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue