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; }