alsa: use PIPEWIRE_REMOTE env variable

This commit is contained in:
Wim Taymans 2020-08-04 14:13:07 +02:00
parent 64067bafe3
commit 5bf6acad06
2 changed files with 11 additions and 0 deletions

View file

@ -1209,6 +1209,10 @@ SND_CTL_PLUGIN_DEFINE_FUNC(pipewire)
return -EINVAL;
}
str = getenv("PIPEWIRE_REMOTE");
if (str != NULL)
server = str;
if (fallback_name && name && !strcmp(name, fallback_name))
fallback_name = NULL; /* no fallback for the same name */
@ -1270,6 +1274,9 @@ SND_CTL_PLUGIN_DEFINE_FUNC(pipewire)
else
pw_properties_set(props, PW_KEY_APP_NAME, "ALSA plug-in");
if (server)
pw_properties_set(props, PW_KEY_REMOTE_NAME, server);
if ((err = pw_thread_loop_start(ctl->mainloop)) < 0)
goto error;