[alsa-devel] Order of device overrides in config files
Pavel Hofman
pavel.hofman at ivitera.com
Mon Jun 11 15:45:45 CEST 2018
Dne 11.6.2018 v 15:34 Jaroslav Kysela napsal(a):
> Dne 11.6.2018 v 15:18 Pavel Hofman napsal(a):
>> Dne 11.6.2018 v 14:20 Jaroslav Kysela napsal(a):
>
> It seems that there's something different in your system, so the
> ~/.asoundrc file is not parsed as last.
Ubuntu 16:04 (Mint 17)
It is parsed by the same order as specified in
@hooks [
{
func load
files [
{
@func concat
strings [
{ @func datadir }
"/alsa.conf.d/"
]
}
"/etc/asound.conf"
"~/.asoundrc"
]
errors false
}
]
But the last "default" redefinition occurs from
usr/share/alsa/pulse-alsa.conf, which is "scheduled" by
alsa.conf.d/pulse.conf:
hook_func.pulse_load_if_running {
lib "libasound_module_conf_pulse.so"
func "conf_pulse_hook_load_if_running"
}
@hooks [
{
func pulse_load_if_running
files [
"/usr/share/alsa/pulse-alsa.conf"
]
errors false
}
]
According to strace, the function pulse_load_if_running opens
/usr/share/alsa/pulse-alsa.conf AFTER ~/.asoundrc:
strace aplay -v -D default /home/hestia/Hudba/192.wav 2>&1 | nl | grep
-E '/usr/share/alsa|asoundrc'
88 stat("/usr/share/alsa/alsa.conf", {st_mode=S_IFREG|0644,
st_size=9182, ...}) = 0
89 open("/usr/share/alsa/alsa.conf", O_RDONLY) = 3
100 access("/usr/share/alsa/alsa.conf.d/", R_OK) = 0
101 stat("/usr/share/alsa/alsa.conf.d/", {st_mode=S_IFDIR|0755,
st_size=123, ...}) = 0
102 openat(AT_FDCWD, "/usr/share/alsa/alsa.conf.d/",
O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
106 open("/usr/share/alsa/alsa.conf.d//50-pulseaudio.conf",
O_RDONLY) = 3
114 open("/usr/share/alsa/alsa.conf.d//bluetooth.conf", O_RDONLY) = 3
122 open("/usr/share/alsa/alsa.conf.d//pulse.conf", O_RDONLY) = 3
131 access("/home/hestia/.asoundrc", R_OK) = 0
132 stat("/home/hestia/.asoundrc", {st_mode=S_IFREG|0644,
st_size=215, ...}) = 0
133 open("/home/hestia/.asoundrc", O_RDONLY) = 3
540 access("/usr/share/alsa/pulse-alsa.conf", R_OK) = 0
541 stat("/usr/share/alsa/pulse-alsa.conf", {st_mode=S_IFREG|0644,
st_size=340, ...}) = 0
542 open("/usr/share/alsa/pulse-alsa.conf", O_RDONLY) = 6
Best regards,
Pavel.
More information about the Alsa-devel
mailing list