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
377
src/conf/alsa.conf
Normal file
377
src/conf/alsa.conf
Normal file
|
|
@ -0,0 +1,377 @@
|
|||
#
|
||||
# ALSA library configuration file
|
||||
#
|
||||
|
||||
# preload configuration files
|
||||
|
||||
@hooks [
|
||||
{
|
||||
func load
|
||||
files [
|
||||
"/etc/asound.conf"
|
||||
"~/.asoundrc"
|
||||
]
|
||||
errors false
|
||||
}
|
||||
]
|
||||
|
||||
# load card-specific configuration files (on request)
|
||||
|
||||
cards.@hooks [
|
||||
{
|
||||
func load_for_all_cards
|
||||
files [
|
||||
{
|
||||
@func concat
|
||||
strings [
|
||||
{ @func datadir }
|
||||
"/cards/"
|
||||
{ @func private_card_strtype }
|
||||
".conf"
|
||||
]
|
||||
}
|
||||
]
|
||||
errors false
|
||||
}
|
||||
]
|
||||
|
||||
# defaults
|
||||
|
||||
defaults.ctl.card 0
|
||||
defaults.pcm.card 0
|
||||
defaults.pcm.device 0
|
||||
defaults.pcm.subdevice -1
|
||||
defaults.pcm.front.card defaults.pcm.card
|
||||
defaults.pcm.front.device defaults.pcm.device
|
||||
defaults.pcm.rear.card defaults.pcm.card
|
||||
defaults.pcm.rear.device defaults.pcm.device
|
||||
defaults.pcm.surround40.card defaults.pcm.card
|
||||
defaults.pcm.surround40.device defaults.pcm.device
|
||||
defaults.pcm.surround51.card defaults.pcm.card
|
||||
defaults.pcm.surround51.device defaults.pcm.device
|
||||
defaults.rawmidi.card 0
|
||||
defaults.rawmidi.device 0
|
||||
defaults.rawmidi.subdevice -1
|
||||
|
||||
#
|
||||
# PCM interface
|
||||
#
|
||||
|
||||
pcm.hw {
|
||||
@args [ CARD DEV SUBDEV ]
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_PCM_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.card
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.DEV {
|
||||
type integer
|
||||
default {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_PCM_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.device
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.SUBDEV {
|
||||
type integer
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.subdevice
|
||||
}
|
||||
}
|
||||
type hw
|
||||
card $CARD
|
||||
device $DEV
|
||||
subdevice $SUBDEV
|
||||
}
|
||||
|
||||
pcm.plughw {
|
||||
@args [ CARD DEV SUBDEV ]
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_PCM_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.card
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.DEV {
|
||||
type integer
|
||||
default {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_PCM_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.device
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.SUBDEV {
|
||||
type integer
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.subdevice
|
||||
}
|
||||
}
|
||||
type plug
|
||||
slave.pcm {
|
||||
type hw
|
||||
card $CARD
|
||||
device $DEV
|
||||
subdevice $SUBDEV
|
||||
}
|
||||
}
|
||||
|
||||
pcm.plug {
|
||||
@args [ SLAVE ]
|
||||
@args.SLAVE {
|
||||
type string
|
||||
}
|
||||
type plug
|
||||
slave.pcm $SLAVE
|
||||
}
|
||||
|
||||
pcm.shm {
|
||||
@args [ SOCKET PCM ]
|
||||
@args.SOCKET {
|
||||
type string
|
||||
}
|
||||
@args.PCM {
|
||||
type string
|
||||
}
|
||||
type shm
|
||||
server $SOCKET
|
||||
pcm $PCM
|
||||
}
|
||||
|
||||
pcm.tee {
|
||||
@args [ SLAVE FILE FORMAT ]
|
||||
@args.SLAVE {
|
||||
type string
|
||||
}
|
||||
@args.FILE {
|
||||
type string
|
||||
}
|
||||
@args.FORMAT {
|
||||
type string
|
||||
default raw
|
||||
}
|
||||
type file
|
||||
slave.pcm $SLAVE
|
||||
file $FILE
|
||||
format $FORMAT
|
||||
}
|
||||
|
||||
pcm.file {
|
||||
@args [ FILE FORMAT ]
|
||||
@args.FILE {
|
||||
type string
|
||||
}
|
||||
@args.FORMAT {
|
||||
type string
|
||||
default raw
|
||||
}
|
||||
type file
|
||||
slave.pcm null
|
||||
file $FILE
|
||||
format $FORMAT
|
||||
}
|
||||
|
||||
pcm.null {
|
||||
type null
|
||||
}
|
||||
|
||||
pcm.default {
|
||||
type plug
|
||||
slave.pcm {
|
||||
type hw
|
||||
card {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_PCM_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.card
|
||||
}
|
||||
}
|
||||
device {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_PCM_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.device
|
||||
}
|
||||
}
|
||||
subdevice {
|
||||
@func refer
|
||||
name defaults.pcm.subdevice
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# redirect to load-on-demand extended pcm definitions
|
||||
pcm.cards cards.pcm
|
||||
# some links for easy use
|
||||
pcm.front cards.pcm.front
|
||||
pcm.rear cards.pcm.rear
|
||||
pcm.center_lfe cards.pcm.center_lfe
|
||||
pcm.surround40 cards.pcm.surround40
|
||||
pcm.surround51 cards.pcm.surround51
|
||||
|
||||
#
|
||||
# Control interface
|
||||
#
|
||||
|
||||
ctl.hw {
|
||||
@args[ CARD ]
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_CTL_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.ctl.card
|
||||
}
|
||||
}
|
||||
}
|
||||
type hw
|
||||
card $CARD
|
||||
}
|
||||
|
||||
ctl.shm {
|
||||
@args [ SOCKET CTL ]
|
||||
@args.SOCKET {
|
||||
type string
|
||||
}
|
||||
@args.CTL {
|
||||
type string
|
||||
}
|
||||
type shm
|
||||
server $SOCKET
|
||||
ctl $CTL
|
||||
}
|
||||
|
||||
ctl.default {
|
||||
type hw
|
||||
card {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_CTL_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.ctl.card
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# RawMidi interface
|
||||
#
|
||||
|
||||
rawmidi.hw {
|
||||
@args [ CARD DEV SUBDEV ]
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_RAWMIDI_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.rawmidi.card
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.DEV {
|
||||
type integer
|
||||
default {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_RAWMIDI_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.rawmidi.device
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.SUBDEV {
|
||||
type integer
|
||||
default -1
|
||||
}
|
||||
type hw
|
||||
card $CARD
|
||||
device $DEV
|
||||
subdevice $SUBDEV
|
||||
}
|
||||
|
||||
rawmidi.default {
|
||||
type hw
|
||||
card {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_RAWMIDI_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.rawmidi.card
|
||||
}
|
||||
}
|
||||
device {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_RAWMIDI_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.rawmidi.device
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Sequencer interface
|
||||
#
|
||||
|
||||
seq.default {
|
||||
type hw
|
||||
}
|
||||
|
||||
seq.hw {
|
||||
type hw
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue