mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-14 06:59:54 -05:00
conf: Allow for a directory to be given as a config file.
When this is done, *.conf files can be placed in that directory and they will be processed by as if they were included directly. A directory (typically /usr/share/alsa/alsa.conf.d/) has been added into the distribution. v2: Used existing conf syntax rather than processing via autotools v3: Split file loading into separate function and made error handling more consistent. Signed-off-by: Colin Guthrie <colin@mageia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
26e80c2e32
commit
7924500688
6 changed files with 87 additions and 13 deletions
|
|
@ -1,4 +1,4 @@
|
|||
SUBDIRS=cards pcm
|
||||
SUBDIRS=cards pcm alsa.conf.d
|
||||
|
||||
cfg_files = alsa.conf
|
||||
if BUILD_ALISP
|
||||
|
|
|
|||
|
|
@ -8,6 +8,13 @@
|
|||
{
|
||||
func load
|
||||
files [
|
||||
{
|
||||
@func concat
|
||||
strings [
|
||||
{ @func datadir }
|
||||
"/alsa.conf.d/"
|
||||
]
|
||||
}
|
||||
"/etc/asound.conf"
|
||||
"~/.asoundrc"
|
||||
]
|
||||
|
|
|
|||
8
src/conf/alsa.conf.d/Makefile.am
Normal file
8
src/conf/alsa.conf.d/Makefile.am
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
alsaconfigdir = @ALSA_CONFIG_DIR@
|
||||
alsadir = $(alsaconfigdir)/alsa.conf.d
|
||||
cfg_files = README
|
||||
|
||||
alsa_DATA = $(cfg_files)
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(cfg_files)
|
||||
2
src/conf/alsa.conf.d/README
Normal file
2
src/conf/alsa.conf.d/README
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
You can place files named *.conf in this folder and they will be processed
|
||||
when initialising alsa-lib.
|
||||
Loading…
Add table
Add a link
Reference in a new issue