Skip to content
Snippets Groups Projects
Commit 1b720eb7 authored by Ludovico de Nittis's avatar Ludovico de Nittis
Browse files

wrap: Set PulseAudio as the default ALSA driver if available

To avoid audio issues, if we have successfully bound a PulseAudio
socket, we should also set it as the default driver in ALSA.

Addresses: #65
Partially addresses:
https://github.com/ValveSoftware/steam-runtime/issues/371



Signed-off-by: default avatarLudovico de Nittis <ludovico.denittis@collabora.com>
parent 4bb50537
No related branches found
No related tags found
1 merge request!269wrap: Set PulseAudio as the default ALSA driver if available
Pipeline #10302 passed
......@@ -2417,6 +2417,21 @@ main (int argc,
(runtime != NULL),
is_flatpak_env);
if (pv_environ_is_locked(container_env, "PULSE_SERVER")
|| is_flatpak_env)
{
/* Make the PulseAudio driver the default.
* We do this unconditionally when we are under Flatpak for parity
* with the freedesktop.org Platform. */
const gchar *alsa_config = "pcm.!default pulse\n"
"ctl.!default pulse\n";
flatpak_bwrap_add_args_data (bwrap, "99-pulseaudio-default.conf",
alsa_config, -1,
"/etc/alsa/conf.d/99-pulseaudio-default.conf",
NULL);
}
if (is_flatpak_env)
{
g_autoptr(GList) vars = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment