From 7a39fd461efc36f501eab29563483cf47c1d46ec Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sat, 12 Apr 2014 11:54:28 -0500 Subject: [PATCH] Pulse Audio settings lost after reboot / HDMI is set as default (#1035025) --- ...-port-available-Don-t-switch-profile.patch | 35 +++++++++++++++++++ pulseaudio.spec | 10 +++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 0036-module-switch-on-port-available-Don-t-switch-profile.patch diff --git a/0036-module-switch-on-port-available-Don-t-switch-profile.patch b/0036-module-switch-on-port-available-Don-t-switch-profile.patch new file mode 100644 index 0000000..e8ff6e0 --- /dev/null +++ b/0036-module-switch-on-port-available-Don-t-switch-profile.patch @@ -0,0 +1,35 @@ +From ef4a41e8b0ef81a53769d853dbc7679b25252327 Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Fri, 28 Mar 2014 11:59:09 +0100 +Subject: [PATCH 36/38] module-switch-on-port-available: Don't switch profiles + on uninitialized cards + +This could cause the HDMI port to become the default on some systems +where analog output was available. + +BugLink: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1256511 +BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=73375 +Signed-off-by: David Henningsson +--- + src/modules/module-switch-on-port-available.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/modules/module-switch-on-port-available.c b/src/modules/module-switch-on-port-available.c +index 2c7ad17..c560306 100644 +--- a/src/modules/module-switch-on-port-available.c ++++ b/src/modules/module-switch-on-port-available.c +@@ -173,6 +173,11 @@ static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port + return PA_HOOK_OK; + } + ++ if (pa_idxset_size(card->sinks) == 0 && pa_idxset_size(card->sources) == 0) ++ /* This card is not initialized yet. We'll handle it in ++ sink_new / source_new callbacks later. */ ++ return PA_HOOK_OK; ++ + find_sink_and_source(card, port, &sink, &source); + + is_active_profile = card->active_profile == pa_hashmap_get(port->profiles, card->active_profile->name); +-- +1.9.0 + diff --git a/pulseaudio.spec b/pulseaudio.spec index fc6b81e..244eec6 100644 --- a/pulseaudio.spec +++ b/pulseaudio.spec @@ -15,7 +15,7 @@ Name: pulseaudio Summary: Improved Linux Sound Server Version: %{pa_major}%{?pa_minor:.%{pa_minor}} -Release: 12%{?gitcommit:.git%{shortcommit}}%{?dist} +Release: 13%{?gitcommit:.git%{shortcommit}}%{?dist} License: LGPLv2+ URL: http://www.freedesktop.org/wiki/Software/PulseAudio %if 0%{?gitrel} @@ -34,6 +34,9 @@ Patch1: pulseaudio-x11_device_manager.patch Patch2: pulseaudio-4.0-kde_autostart_phase.patch ## upstream patches +# https://bugzilla.redhat.com/show_bug.cgi?id=1035025 +# https://bugs.freedesktop.org/show_bug.cgi?id=73375 +Patch136: 0036-module-switch-on-port-available-Don-t-switch-profile.patch BuildRequires: m4 BuildRequires: libtool-ltdl-devel @@ -210,6 +213,8 @@ This package contains GDM integration hooks for the PulseAudio sound server. %patch1 -p1 -b .x11_device_manager %patch2 -p1 -b .kde_autostart_phase +%patch136 -p1 -b .0036 + sed -i.no_consolekit -e \ 's/^load-module module-console-kit/#load-module module-console-kit/' \ src/daemon/default.pa.in @@ -519,6 +524,9 @@ exit 0 %attr(0600, gdm, gdm) %{_localstatedir}/lib/gdm/.pulse/default.pa %changelog +* Sat Apr 12 2014 Rex Dieter 4.0-13.gitf81e3 +- Pulse Audio settings lost after reboot / HDMI is set as default (#1035025) + * Wed Jan 22 2014 Wim Taymans - 4.0-12.gitf81e3 - Use the statically allocated UID and GID from /usr/share/doc/setup/uidgid (#1056656) - The pulse-rt group doesn't exist (#885020)