mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-07-22 18:54:36 +00:00
alsa: use PIPEWIRE_REMOTE env variable
This commit is contained in:
parent
64067bafe3
commit
5bf6acad06
|
@ -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;
|
||||
|
||||
|
|
|
@ -899,6 +899,10 @@ static int snd_pcm_pipewire_open(snd_pcm_t **pcmp, const char *name,
|
|||
if (!pw)
|
||||
return -ENOMEM;
|
||||
|
||||
str = getenv("PIPEWIRE_REMOTE");
|
||||
if (str != NULL)
|
||||
server_name = str;
|
||||
|
||||
str = getenv("PIPEWIRE_NODE");
|
||||
|
||||
pw_log_debug(NAME" %p: open %s %d %d %08x %d %s %d %d '%s'", pw, name,
|
||||
|
|
Loading…
Reference in a new issue