mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-24 07:00:01 -05:00
Added snd_config_hook_load_for_all_cards.
Added private_data parameter for snd_config_hooks function. Fixed the return value mess in the config parser routines. The include file could begin with 'confdir:' which is replaced with /usr/share/alsa. The snd_config_search_definitions looks for raw name at first (without suggested root). Added snd_func_private_card_strtype function. All configuration files moved to the src/conf directory. Configuration files modified to use load-on-demand feature using hooks.
This commit is contained in:
parent
be5529bc3a
commit
bc581b87ae
24 changed files with 909 additions and 199 deletions
7
src/conf/pcm/Makefile.am
Normal file
7
src/conf/pcm/Makefile.am
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
cfg_files = front.conf rear.conf center_lfe.conf surround40.conf \
|
||||
surround51.conf
|
||||
|
||||
EXTRA_DIST = $(cfg_files)
|
||||
|
||||
alsadir = $(datadir)/alsa/pcm
|
||||
alsa_DATA = $(cfg_files)
|
||||
47
src/conf/pcm/center_lfe.conf
Normal file
47
src/conf/pcm/center_lfe.conf
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
#
|
||||
# Hardware output from center & lfe speakers
|
||||
#
|
||||
|
||||
pcm.!center_lfe {
|
||||
@args [ CARD DEV ]
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_CENTER_LFE_CARD
|
||||
ALSA_PCM_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.center_lfe.card
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.DEV {
|
||||
type integer
|
||||
default {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_CENTER_LFE_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.center_lfe.device
|
||||
}
|
||||
}
|
||||
}
|
||||
@func refer
|
||||
name {
|
||||
@func concat
|
||||
strings [
|
||||
"cards."
|
||||
{
|
||||
@func card_strtype
|
||||
card $CARD
|
||||
}
|
||||
".pcm.center_lfe." $DEV ":CARD=" $CARD
|
||||
]
|
||||
}
|
||||
}
|
||||
47
src/conf/pcm/front.conf
Normal file
47
src/conf/pcm/front.conf
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
#
|
||||
# Hardware output from front speakers
|
||||
#
|
||||
|
||||
pcm.!front {
|
||||
@args [ CARD DEV ]
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_FRONT_CARD
|
||||
ALSA_PCM_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.front.card
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.DEV {
|
||||
type integer
|
||||
default {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_FRONT_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.front.device
|
||||
}
|
||||
}
|
||||
}
|
||||
@func refer
|
||||
name {
|
||||
@func concat
|
||||
strings [
|
||||
"cards."
|
||||
{
|
||||
@func card_strtype
|
||||
card $CARD
|
||||
}
|
||||
".pcm.front." $DEV ":CARD=" $CARD
|
||||
]
|
||||
}
|
||||
}
|
||||
47
src/conf/pcm/rear.conf
Normal file
47
src/conf/pcm/rear.conf
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
#
|
||||
# Hardware output from rear speakers
|
||||
#
|
||||
|
||||
pcm.!rear {
|
||||
@args [ CARD DEV ]
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_REAR_CARD
|
||||
ALSA_PCM_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.rear.card
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.DEV {
|
||||
type integer
|
||||
default {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_REAR_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.rear.device
|
||||
}
|
||||
}
|
||||
}
|
||||
@func refer
|
||||
name {
|
||||
@func concat
|
||||
strings [
|
||||
"cards."
|
||||
{
|
||||
@func card_strtype
|
||||
card $CARD
|
||||
}
|
||||
".pcm.rear." $DEV ":CARD=" $CARD
|
||||
]
|
||||
}
|
||||
}
|
||||
52
src/conf/pcm/surround40.conf
Normal file
52
src/conf/pcm/surround40.conf
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#
|
||||
# Hardware output from 4.0 speakers.
|
||||
# Samples must be positioned:
|
||||
# chn0 - front left
|
||||
# chn1 - front right
|
||||
# chn2 - rear left
|
||||
# chn3 - rear right
|
||||
#
|
||||
|
||||
pcm.!surround40 {
|
||||
@args [ CARD DEV ]
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_SURROUND40_CARD
|
||||
ALSA_PCM_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.surround40.card
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.DEV {
|
||||
type integer
|
||||
default {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_SURROUND40_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.surround40.device
|
||||
}
|
||||
}
|
||||
}
|
||||
@func refer
|
||||
name {
|
||||
@func concat
|
||||
strings [
|
||||
"cards."
|
||||
{
|
||||
@func card_strtype
|
||||
card $CARD
|
||||
}
|
||||
".pcm.surround40." $DEV ":CARD=" $CARD
|
||||
]
|
||||
}
|
||||
}
|
||||
54
src/conf/pcm/surround51.conf
Normal file
54
src/conf/pcm/surround51.conf
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
#
|
||||
# Hardware output from 5.1 speakers
|
||||
# Samples must be positioned:
|
||||
# chn0 - front left
|
||||
# chn1 - front right
|
||||
# chn2 - rear left
|
||||
# chn3 - rear right
|
||||
# chn4 - center
|
||||
# chn5 - lfe
|
||||
#
|
||||
|
||||
pcm.!surround51 {
|
||||
@args [ CARD DEV ]
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_SURROUND51_CARD
|
||||
ALSA_PCM_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.surround51.card
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.DEV {
|
||||
type integer
|
||||
default {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_SURROUND51_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.surround51.device
|
||||
}
|
||||
}
|
||||
}
|
||||
@func refer
|
||||
name {
|
||||
@func concat
|
||||
strings [
|
||||
"cards."
|
||||
{
|
||||
@func card_strtype
|
||||
card $CARD
|
||||
}
|
||||
".pcm.surround51." $DEV ":CARD=" $CARD
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue