mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: use PIPEWIRE_REMOTE env variable
This commit is contained in:
parent
64067bafe3
commit
5bf6acad06
2 changed files with 11 additions and 0 deletions
|
|
@ -1209,6 +1209,10 @@ SND_CTL_PLUGIN_DEFINE_FUNC(pipewire)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
str = getenv("PIPEWIRE_REMOTE");
|
||||||
|
if (str != NULL)
|
||||||
|
server = str;
|
||||||
|
|
||||||
if (fallback_name && name && !strcmp(name, fallback_name))
|
if (fallback_name && name && !strcmp(name, fallback_name))
|
||||||
fallback_name = NULL; /* no fallback for the same name */
|
fallback_name = NULL; /* no fallback for the same name */
|
||||||
|
|
||||||
|
|
@ -1270,6 +1274,9 @@ SND_CTL_PLUGIN_DEFINE_FUNC(pipewire)
|
||||||
else
|
else
|
||||||
pw_properties_set(props, PW_KEY_APP_NAME, "ALSA plug-in");
|
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)
|
if ((err = pw_thread_loop_start(ctl->mainloop)) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -899,6 +899,10 @@ static int snd_pcm_pipewire_open(snd_pcm_t **pcmp, const char *name,
|
||||||
if (!pw)
|
if (!pw)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
str = getenv("PIPEWIRE_REMOTE");
|
||||||
|
if (str != NULL)
|
||||||
|
server_name = str;
|
||||||
|
|
||||||
str = getenv("PIPEWIRE_NODE");
|
str = getenv("PIPEWIRE_NODE");
|
||||||
|
|
||||||
pw_log_debug(NAME" %p: open %s %d %d %08x %d %s %d %d '%s'", pw, name,
|
pw_log_debug(NAME" %p: open %s %d %d %08x %d %s %d %d '%s'", pw, name,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue