mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
acp; fall back to default when profile-set is not accessible
This commit is contained in:
parent
ac861a86c0
commit
6a9552a4ac
1 changed files with 6 additions and 5 deletions
|
|
@ -4938,12 +4938,13 @@ pa_alsa_profile_set* pa_alsa_profile_set_new(const char *fname, const pa_channel
|
|||
|
||||
items[0].data = &ps->auto_profiles;
|
||||
|
||||
if (!fname)
|
||||
fname = "default.conf";
|
||||
|
||||
fn = pa_maybe_prefix_path(fname,
|
||||
fn = pa_maybe_prefix_path(fname ? fname : "default.conf",
|
||||
get_default_profile_dir());
|
||||
|
||||
if (access(fn, R_OK) != 0 && fname != NULL) {
|
||||
pa_log_error("profile-set '%s' can't be accessed, trying default.conf", fn);
|
||||
fn = pa_maybe_prefix_path("default.conf",
|
||||
get_default_profile_dir());
|
||||
}
|
||||
r = pa_config_parse(fn, NULL, items, NULL, false, ps);
|
||||
pa_xfree(fn);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue