alsa-mixer: Respect XDG base directory spec when loading profile sets

Try $XDG_DATA_HOME, then $XDG_DATA_DIRS, and finally fall back to old behaviour.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/311>
This commit is contained in:
SimonP 2020-06-17 12:33:11 +02:00 committed by Arun Raghavan
parent 7d063d6544
commit 095ad5f4f8
3 changed files with 35 additions and 32 deletions

View file

@ -21,7 +21,7 @@ static const char *get_default_paths_dir(void) {
if (pa_run_from_build_tree())
return PA_SRCDIR "/modules/alsa/mixer/paths/";
else
return PA_ALSA_PATHS_DIR;
return PA_ALSA_DATA_DIR PA_PATH_SEP "paths/";
}
static pa_strlist *load_makefile() {