diff --git a/phonon-4.3.80-pulseaudio-device-priorities.patch b/phonon-4.3.80-pulseaudio-device-priorities.patch new file mode 100644 index 0000000..bb993c4 --- /dev/null +++ b/phonon-4.3.80-pulseaudio-device-priorities.patch @@ -0,0 +1,43 @@ +diff -ur phonon-4.3.80/phonon/globalconfig.cpp phonon-4.3.80-pulseaudio-device-priorities/phonon/globalconfig.cpp +--- phonon-4.3.80/phonon/globalconfig.cpp 2009-12-03 20:29:35.000000000 +0100 ++++ phonon-4.3.80-pulseaudio-device-priorities/phonon/globalconfig.cpp 2010-01-22 15:57:25.000000000 +0100 +@@ -33,6 +33,7 @@ + #include "pulsesupport_p.h" + + #include ++#include + #include + + QT_BEGIN_NAMESPACE +@@ -314,6 +315,15 @@ + | ((override & HideUnavailableDevices) ? FilterUnavailableDevices : 0) + ); + } ++ // make PulseAudio the global default (assume it is already default in this list) ++ if (!list.isEmpty()) { ++ int firstIndex = list.first(); ++ if (backendIface->objectDescriptionProperties(Phonon::AudioOutputDeviceType, ++ firstIndex)["icon"].toString() == "audio-backend-pulseaudio") { ++ list.removeFirst(); ++ defaultList.prepend(firstIndex); ++ } ++ } + defaultList += list; + } + +@@ -394,6 +404,15 @@ + | ((override & HideUnavailableDevices) ? FilterUnavailableDevices : 0) + ); + } ++ // make PulseAudio the global default (assume it is already default in this list) ++ if (!list.isEmpty()) { ++ int firstIndex = list.first(); ++ if (backendIface->objectDescriptionProperties(Phonon::AudioCaptureDeviceType, ++ firstIndex)["icon"].toString() == "audio-backend-pulseaudio") { ++ list.removeFirst(); ++ defaultList.prepend(firstIndex); ++ } ++ } + defaultList += list; + } + diff --git a/phonon.spec b/phonon.spec index 93f2e68..4d4828a 100644 --- a/phonon.spec +++ b/phonon.spec @@ -4,7 +4,7 @@ Summary: Multimedia framework api Name: phonon Version: 4.3.80 -Release: 5%{?dist} +Release: 5%{?dist}.1 Group: System Environment/Libraries License: LGPLv2+ URL: http://phonon.kde.org/ @@ -21,9 +21,10 @@ Source14: hi48-phonon-gstreamer.png Source15: hi64-phonon-gstreamer.png Source16: hi128-phonon-gstreamer.png -# Prefer PulseAudio -# This one was easiest to port, but doesn't seem to work by itself as-is -# maybe we can just wait for the improvie PA support to land. +# Make PulseAudio the default when listed by the Xine backend and native +# PulseAudio integration is not available (e.g. F-11 with too old PulseAudio). +Patch0: phonon-4.3.80-pulseaudio-device-priorities.patch +# Give PulseAudio the highest priority in the Xine backend so the above works. Patch1: phonon-4.3.50-xine_pulseaudio.patch ## Mandriva/upstreamable patches @@ -95,6 +96,7 @@ Provides: %{name}-backend-gst = %{version}-%{release} %setup -q -n phonon%{!?snap:-%{version}} %if 0%{?pa_keep_old_hacks} +%patch0 -p1 -b .pulseaudio-device-priorities %patch1 -p1 -b .xine_pulseaudio %endif @@ -208,6 +210,9 @@ gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||: %changelog +* Fri Jan 22 2010 Kevin Kofler - 4.3.80-5.1 +- F11: port the old PA device priorities patch as we don't have PA integration + * Thu Jan 21 2010 Rex Dieter - 4.3.80-5 - no sound with phonon-xine/pulseaudio (kde#223662, rh#553945)