[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [plasma-desktop] /: [Multimedia KCM] Kill PulseAudio device setup
From:       Kai Uwe Broulik <null () kde ! org>
Date:       2018-07-26 15:03:07
Message-ID: E1fihnH-0000Am-UC () code ! kde ! org
[Download RAW message or body]

Git commit 06c8b9bade762a756500986a615915b3b0ce3c36 by Kai Uwe Broulik.
Committed on 26/07/2018 at 15:02.
Pushed by broulik into branch 'master'.

[Multimedia KCM] Kill PulseAudio device setup

It is redundant with plasma-pa

Differential Revision: https://phabricator.kde.org/D14340

D  +0    -50   cmake/modules/FindCanberra.cmake
D  +0    -194  kcms/colors/colors.desktop
M  +0    -31   kcms/phonon/CMakeLists.txt
D  +0    -884  kcms/phonon/audiosetup.cpp
D  +0    -98   kcms/phonon/audiosetup.h
D  +0    -224  kcms/phonon/audiosetup.ui
M  +0    -18   kcms/phonon/main.cpp
M  +0    -11   kcms/phonon/main.h
D  +0    -203  kcms/phonon/testspeakerwidget.cpp
D  +0    -52   kcms/phonon/testspeakerwidget.h

https://commits.kde.org/plasma-desktop/06c8b9bade762a756500986a615915b3b0ce3c36

diff --git a/cmake/modules/FindCanberra.cmake b/cmake/modules/FindCanberra.cmake
deleted file mode 100644
index 48e2d546..00000000
--- a/cmake/modules/FindCanberra.cmake
+++ /dev/null
@@ -1,50 +0,0 @@
-# - Find libcanberra's libraries and headers.
-# This module defines the following variables:
-#
-#  CANBERRA_FOUND        - true if libcanberra was found
-#  CANBERRA_LIBRARIES    - libcanberra libraries to link against
-#  CANBERRA_INCLUDE_DIRS - include path for libcanberra
-#
-# Copyright (c) 2012 Raphael Kubo da Costa <rakuco@FreeBSD.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-# 3. Neither the name of the University nor the names of its contributors
-#    may be used to endorse or promote products derived from this software
-#    without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-
-find_package(PkgConfig)
-pkg_check_modules(PC_CANBERRA libcanberra)
-
-find_library(CANBERRA_LIBRARIES
-    NAMES canberra
-    HINTS ${PC_CANBERRA_LIBRARY_DIRS} ${PC_CANBERRA_LIBDIR}
-)
-
-find_path(CANBERRA_INCLUDE_DIRS
-    NAMES canberra.h
-    HINTS ${PC_CANBERRA_INCLUDE_DIRS} ${PC_CANBERRA_INCLUDEDIR}
-)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Canberra REQUIRED_VARS CANBERRA_LIBRARIES \
                CANBERRA_INCLUDE_DIRS)
-
-mark_as_advanced(CANBERRA_LIBRARIES CANBERRA_INCLUDE_DIRS)
diff --git a/kcms/colors/colors.desktop b/kcms/colors/colors.desktop
deleted file mode 100644
index 04565846..00000000
--- a/kcms/colors/colors.desktop
+++ /dev/null
@@ -1,194 +0,0 @@
-[Desktop Entry]
-Exec=kcmshell5 colors
-Icon=preferences-desktop-color
-Type=Service
-X-KDE-ServiceTypes=KCModule
-X-DocPath=kcontrol/colors/index.html
-
-X-KDE-Library=kcm_colors
-X-KDE-ParentApp=kcontrol
-
-X-KDE-System-Settings-Parent-Category=color
-X-KDE-Weight=60
-
-Name=Colors
-Name[af]=Kleure
-Name[ar]=الألوان
-Name[be]=Колеры
-Name[be@latin]=Kolery
-Name[bg]=Цветове
-Name[bn]=রং
-Name[bn_IN]=রং
-Name[br]=Livioù
-Name[bs]=Boje
-Name[ca]=Colors
-Name[ca@valencia]=Colors
-Name[cs]=Barvy
-Name[csb]=Farwë
-Name[cy]=Lliwiau
-Name[da]=Farver
-Name[de]=Farben
-Name[el]=Χρώματα
-Name[en_GB]=Colours
-Name[eo]=Koloroj
-Name[es]=Colores
-Name[et]=Värvid
-Name[eu]=Koloreak
-Name[fa]=رنگها
-Name[fi]=Värit
-Name[fr]=Couleurs
-Name[fy]=Kleuren
-Name[ga]=Dathanna
-Name[gl]=Cores
-Name[gu]=રંગો
-Name[he]=צבעים
-Name[hi]=रंग
-Name[hne]=रंग
-Name[hr]=Boje
-Name[hsb]=Barby
-Name[hu]=Színek
-Name[ia]=Colores
-Name[id]=Warna
-Name[is]=Litir
-Name[it]=Colori
-Name[ja]=色
-Name[ka]=ცვეტები
-Name[kk]=Түстер
-Name[km]=ពណ៌
-Name[kn]=ಬಣ್ಣಗಳು
-Name[ko]=색상
-Name[ku]=Reng
-Name[lt]=Spalvos
-Name[lv]=Krāsas
-Name[mai]=रँग
-Name[mk]=Бои
-Name[ml]=നിറങ്ങള്‍
-Name[mr]=रंग
-Name[ms]=Warna
-Name[nb]=Farger
-Name[nds]=Klören
-Name[ne]=रङ
-Name[nl]=Kleuren
-Name[nn]=Fargar
-Name[oc]=Colors
-Name[or]=ରଙ୍ଗ
-Name[pa]=ਰੰਗ
-Name[pl]=Kolory
-Name[pt]=Cores
-Name[pt_BR]=Cores
-Name[ro]=Culori
-Name[ru]=Цвета
-Name[se]=Ivnnit
-Name[si]=වර්‍ණ
-Name[sk]=Farby
-Name[sl]=Barve
-Name[sr]=Боје
-Name[sr@ijekavian]=Боје
-Name[sr@ijekavianlatin]=Boje
-Name[sr@latin]=Boje
-Name[sv]=Färger
-Name[ta]=வண்ணங்கள்
-Name[te]=రంగులు
-Name[tg]= ангҳо
-Name[th]=สี
-Name[tr]=Renkler
-Name[ug]=رەڭلەر
-Name[uk]=Кольори
-Name[uz]=Ranglar
-Name[uz@cyrillic]= англар
-Name[vi]=M u sắc
-Name[wa]=Coleurs
-Name[xh]=Imibala
-Name[x-test]=xxColorsxx
-Name[zh_CN]=颜色
-Name[zh_TW]=顏色
-
-Comment=Application Color Scheme
-Comment[ca]=Esquema de color de les aplicacions
-Comment[ca@valencia]=Esquema de color de les aplicacions
-Comment[cs]=Barevný motiv aplikací
-Comment[da]=Farvetema til program
-Comment[de]=Farbschema für Anwendungen
-Comment[el]=Θέμα χρωμάτων εφαρμογής
-Comment[en_GB]=Application Colour Scheme
-Comment[es]=Esquema de color de las aplicaciones
-Comment[eu]=Aplikazioen kolore-eskema
-Comment[fi]=Ohjelmien väriteema
-Comment[fr]=Thème de couleur des applications
-Comment[gl]=Esquema de cores do aplicativo
-Comment[he]=ערכות צבעים של יישומים
-Comment[hu]=Alkalmazások színsémái
-Comment[id]=Skema Warna Aplikasi
-Comment[it]=Schema di colore delle applicazioni
-Comment[ja]=アプリケーションカラースキー 
-Comment[ko]=프로그램 색 배열
-Comment[lt]=Programos spalvų derinys
-Comment[nb]=Fargeoppsett for program
-Comment[nl]=Toepassing Kleurenschema
-Comment[nn]=Fargeoppsett for program
-Comment[pa]=ਐਪਲੀਕੇਸ਼ਨ ਰੰਗ ਸਕੀਮ
-Comment[pl]=Zestaw kolorów programów
-Comment[pt]=Esquema de Cores da Aplicação
-Comment[pt_BR]=Esquema de cores do aplicativo
-Comment[ru]=Цветовая схема для приложений
-Comment[sk]=Farebná schéma aplikácie
-Comment[sl]=Barvna shema programov
-Comment[sr]=Шема боја у програмима
-Comment[sr@ijekavian]=Шема боја у програмима
-Comment[sr@ijekavianlatin]= ema boja u programima
-Comment[sr@latin]= ema boja u programima
-Comment[sv]=Programmets färgschema
-Comment[tr]=Uygulama Renk Şeması
-Comment[uk]=Схема кольорів вікон програм
-Comment[x-test]=xxApplication Color Schemexx
-Comment[zh_CN]=应用程序配色方案
-Comment[zh_TW]=應用程式色彩機制
-
-X-KDE-Keywords=colors,colours,scheme,contrast,Widget colors,Color Scheme,color \
                style,color theme
-X-KDE-Keywords[ar]=لون,ألوان,مخطّط,مخطط,تباين,ألوان \
الودجات,مخطّط ألوان,مخطط ألوان,نمط اللون,سمة \
                اللون
-X-KDE-Keywords[bs]=boje,boje,tema,kontrast,dodatak bojama,tema u boji,stil boja,tema \
                boja
-X-KDE-Keywords[ca]=colors,esquema,contrast,colors d'estris,Esquema de color,estil de \
                color, tema de color
-X-KDE-Keywords[ca@valencia]=colors,esquema,contrast,colors d'estris,Esquema de \
                color,estil de color, tema de color
-X-KDE-Keywords[da]=farver,tema,kontrast,widget-farver,farvetema,farvestil,farveskema
-X-KDE-Keywords[de]=Farben,Schema,Kontrast,Farbschema,Elemente
-X-KDE-Keywords[el]=χρώματα,χρώματα,σχήμα,αντίθεση,χρώματα \
γραφικών συστατικών,χρωματικό \
                σχήμα,χρωματικό στιλ,θέμα χρώματος
-X-KDE-Keywords[en_GB]=colours,scheme,contrast,Widget colours,Colour Scheme,colour \
                style,colour theme
-X-KDE-Keywords[es]=colores,esquema,contraste,colores de elementos gráficos,Esquema \
                de color,estilo de color,tema de color
-X-KDE-Keywords[et]=värv,värvid,skeem,kontrast,vidina \
                värvid,värviskeem,värvistiil,värviteema
-X-KDE-Keywords[eu]=kolore,koloreak,eskema,kontraste,trepetaren \
                koloreak,kolore-eskema,kolore-estilo, kolorearen gai
-X-KDE-Keywords[fi]=värit,teema,kontrasti,käyttöliittymäelementtien \
                värit,elementtien värit,väriteema,värityyli
-X-KDE-Keywords[fr]=couleurs, couleurs, schéma, contraste, couleur des composants \
                graphiques, schéma de couleur, style de couleur, thème de couleur
-X-KDE-Keywords[ga]=dathanna,scéim,codarsnacht,dathanna Giuirléidí,Scéim \
                Datha,téama datha
-X-KDE-Keywords[gl]=cores,esquema,contraste,cores do trebello,esquema de cores, tema \
                de cores
-X-KDE-Keywords[he]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color \
                style,color theme,צבעים,ערכת  ושא,צבע
-X-KDE-Keywords[hu]=színek,színek,séma,kontraszt,Grafikai elemek \
                színei,Színséma,színstílus,színtéma
-X-KDE-Keywords[ia]=colores,colores,schema,contrasto,colores de Widget,Schema de \
                Color,stilo de color, thema de color
-X-KDE-Keywords[id]=warna,warna,skema,kontras,Widget warna,Skema Warna,gaya \
                warna,tema warna
-X-KDE-Keywords[it]=colori,schema,contrasto,colore degli oggetti,schema di \
                colore,stile colore,tema colore
-X-KDE-Keywords[kk]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color \
                style,color theme
-X-KDE-Keywords[km]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color \
                style,color theme
-X-KDE-Keywords[ko]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color \
                style,color theme,색,색 배열, 대비
-X-KDE-Keywords[mr]=रंग, रंग, योजना, \
कॉन्ट्रास्ट, विजेट रंग, \
                रंगयोजना, रंगप्रकार, \
                रंगशैली
-X-KDE-Keywords[nb]=farger,oppsett,kontrast,elementfarger,fargeoppsett,fargestil,fargetema
                
-X-KDE-Keywords[nds]=Klöör,Klören,Schema,Kontrast,Lüttprogramm-Klören,Klöörschema,Klöörstil,Klöörmuster
                
-X-KDE-Keywords[nl]=colors,colours, kleuren,scheme,schema,contrast,Widget \
                colors,Widgetkleuren,Color Scheme,kleurschema,kleurstijl,kleurthema
-X-KDE-Keywords[nn]=fargar,oppsett,kontrast,elementfargar,fargeoppsett,fargestil,fargetema
                
-X-KDE-Keywords[pa]=ਰੰਗ,ਸਕੀਮ,ਕਨਟਰਾਸਟ,ਵਿਜੈਟ \
                ਰੰਗ,ਰੰਗ ਸਕੀ,ਰੰਗ ਸਟਾਈਲ,ਰੰਗ \
                ਥੀਮ
-X-KDE-Keywords[pl]=kolory,schemat,kontrast,kolory elementów interfejsu,zestaw \
                kolorów,styl kolorów,motyw kolorów
-X-KDE-Keywords[pt]=cores,esquema,contraste,cores dos elementos,esquema de \
                cores,estilo de cores,tema de cores
-X-KDE-Keywords[pt_BR]=cor,cores,esquema,contraste,Cores do widget,Esquema de \
                cores,estilo de cores,tema de cores
-X-KDE-Keywords[ru]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color \
style,color theme,цвет,цвета,схема,контраст,цвета \
виджета,цветовая схема,цветовой \
                стиль,цветовая тема
-X-KDE-Keywords[sk]=farba,farby,schéma,kontrast,farby widgetov,Farebná \
                schéma,štýl farieb,téma farieb
-X-KDE-Keywords[sl]=barve,shema,tema,kontrast,barve gradnikov,barvna shema,barvna \
                tema,barvni slog
-X-KDE-Keywords[sr]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color \
style,color theme,боје,шема,контраст,боје виџета,шема \
                боја,стил боја,тема боја
-X-KDE-Keywords[sr@ijekavian]=colors,colours,scheme,contrast,Widget colors,Color \
Scheme,color style,color theme,боје,шема,контраст,боје \
                виџета,шема боја,стил боја,тема боја
-X-KDE-Keywords[sr@ijekavianlatin]=colors,colours,scheme,contrast,Widget colors,Color \
Scheme,color style,color theme,boje,šema,kontrast,boje vidžeta,šema boja,stil \
                boja,tema boja
-X-KDE-Keywords[sr@latin]=colors,colours,scheme,contrast,Widget colors,Color \
Scheme,color style,color theme,boje,šema,kontrast,boje vidžeta,šema boja,stil \
                boja,tema boja
-X-KDE-Keywords[sv]=färger,schema,kontrast,Komponentfärger,Färgschema,färgstil,färgtema
                
-X-KDE-Keywords[tr]=renkler,renk,şema,karşıtlık,kontrast,Gereç \
                renkleri,RenkŞeması,renk biçemi,renk teması,renk biçimi
-X-KDE-Keywords[uk]=кольори,кольори,схема,контраст,кольори \
віджетів,схема кольорів,стиль кольорів,тема \
кольорів,colors,colours,scheme,contrast,Widget colors,Color Scheme,color \
                style,color theme
-X-KDE-Keywords[x-test]=xxcolorsxx,xxcoloursxx,xxschemexx,xxcontrastxx,xxWidget \
                colorsxx,xxColor Schemexx,xxcolor stylexx,xxcolor themexx
-X-KDE-Keywords[zh_CN]=colors,colours,scheme,contrast,Widget colors,Color \
Scheme,color style,color \
theme,颜色,配色方案,对比度,部件颜色,颜色方案,颜色风 \
                ,颜色主题
-X-KDE-Keywords[zh_TW]=colors,colours,scheme,contrast,Widget colors,Color \
                Scheme,color style,color theme
-
-Categories=Qt;KDE;X-KDE-settings-looknfeel;
diff --git a/kcms/phonon/CMakeLists.txt b/kcms/phonon/CMakeLists.txt
index 571f6284..7920b3ea 100644
--- a/kcms/phonon/CMakeLists.txt
+++ b/kcms/phonon/CMakeLists.txt
@@ -5,26 +5,6 @@ add_definitions(-DPHONON_LIB_SONAME=\"${PHONON_LIB_SONAME}\")
 add_definitions(-DTRANSLATION_DOMAIN=\"kcm5_phonon\")
 
 
-find_package(PulseAudio 0.9.16)
-set_package_properties(PulseAudio PROPERTIES DESCRIPTION "PulseAudio Audio Server"
-                       URL "http://www.pulseaudio.org/"
-                       TYPE OPTIONAL
-                       PURPOSE "libpulse is needed for audio setup GUI"
-                      )
-
-find_package(GLIB2)
-set_package_properties(GLIB2 PROPERTIES DESCRIPTION "Low-level core library for data \
                structure handling, portability wrappers, etc."
-                       URL "http://www.gtk.org"
-                       TYPE OPTIONAL
-                      )
-
-find_package(Canberra)
-set_package_properties(Canberra PROPERTIES DESCRIPTION "Audio setup GUI"
-                      PURPOSE "libcanberra is needed for audio setup GUI"
-                      URL "http://0pointer.de/lennart/projects/libcanberra"
-                      TYPE OPTIONAL
-                      )
-
 set(kcmphonon_SRCS main.cpp devicepreference.cpp backendselection.cpp)
 ki18n_wrap_ui(kcmphonon_SRCS devicepreference.ui backendselection.ui)
 set(kcmphonon_LIBS
@@ -35,17 +15,6 @@ set(kcmphonon_LIBS
     KF5::KIOWidgets
     ${PHONON_LIBRARY})
 
-if(GLIB2_FOUND AND PULSEAUDIO_FOUND AND CANBERRA_FOUND)
-  add_definitions(-DHAVE_PULSEAUDIO)
-
-  set(kcmphonon_SRCS ${kcmphonon_SRCS} audiosetup.cpp testspeakerwidget.cpp)
-  ki18n_wrap_ui(kcmphonon_SRCS audiosetup.ui)
-
-  include_directories(${GLIB2_INCLUDE_DIR} ${PULSEAUDIO_INCLUDE_DIR} \
                ${CANBERRA_INCLUDE_DIRS})
-
-  set(kcmphonon_LIBS ${kcmphonon_LIBS} ${GLIB2_LIBRARIES} ${PulseAudio_LIBRARIES} \
                ${PulseAudio_MAINLOOP_LIBRARY} ${CANBERRA_LIBRARIES})
-endif()
-
 ecm_qt_declare_logging_category(kcmphonon_SRCS HEADER phonon_debug.h IDENTIFIER \
KCM_PHONON_LOG CATEGORY_NAME org.kde.kcm.phonon)  
 add_library(kcm_phonon MODULE ${kcmphonon_SRCS})
diff --git a/kcms/phonon/audiosetup.cpp b/kcms/phonon/audiosetup.cpp
deleted file mode 100644
index e8a82549..00000000
--- a/kcms/phonon/audiosetup.cpp
+++ /dev/null
@@ -1,884 +0,0 @@
-/*  This file is part of the KDE project
-    Copyright (C) 2010 Colin Guthrie <cguthrie@mandriva.org>
-    Copyright (C) 2011 Harald Sitter <sitter@kde.org>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License version 2
-    as published by the Free Software Foundation.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-    02110-1301, USA.
-*/
-
-#include "audiosetup.h"
-
-#include <QAbstractEventDispatcher>
-#include "phonon_debug.h"
-#include <QTimer>
-#include <QLabel>
-
-#include <KLocalizedString>
-#include <KIconLoader>
-#include <KUser>
-
-#include <pulse/glib-mainloop.h>
-
-#include "testspeakerwidget.h"
-
-#define SS_DEFAULT_ICON "audio-card"
-
-#define THAT(userdata) Q_ASSERT(userdata); AudioSetup *ss = static_cast<AudioSetup \
                *>(userdata)
-
-static pa_glib_mainloop *s_mainloop = NULL;
-static pa_context *s_context = NULL;
-
-QMap<quint32, cardInfo> s_Cards;
-QMap<quint32, deviceInfo> s_Sinks;
-QMap<quint32, deviceInfo> s_Sources;
-
-static void card_cb(pa_context *c, const pa_card_info *i, int eol, void *userdata) {
-    Q_ASSERT(c);
-    THAT(userdata);
-
-    if (eol < 0) {
-        if (pa_context_errno(c) == PA_ERR_NOENTITY)
-            return;
-
-        qCDebug(KCM_PHONON_LOG) << "Card callback failure";
-        return;
-    }
-
-    if (eol > 0) {
-        ss->updateFromPulse();
-        return;
-    }
-
-    Q_ASSERT(i);
-    ss->updateCard(i);
-}
-
-static void sink_cb(pa_context *c, const pa_sink_info *i, int eol, void *userdata) {
-    Q_ASSERT(c);
-    THAT(userdata);
-
-    if (eol < 0) {
-        if (pa_context_errno(c) == PA_ERR_NOENTITY)
-            return;
-        qCDebug(KCM_PHONON_LOG) << "Sink callback failure";
-        return;
-    }
-
-    if (eol > 0) {
-        ss->updateIndependantDevices();
-        ss->updateFromPulse();
-        return;
-    }
-
-    Q_ASSERT(i);
-    ss->updateSink(i);
-}
-
-static void source_cb(pa_context *c, const pa_source_info *i, int eol, void \
                *userdata) {
-    Q_ASSERT(c);
-    THAT(userdata);
-
-    if (eol < 0) {
-        if (pa_context_errno(c) == PA_ERR_NOENTITY)
-            return;
-
-        qCDebug(KCM_PHONON_LOG) << "Source callback failure";
-        return;
-    }
-
-    if (eol > 0) {
-        ss->updateIndependantDevices();
-        ss->updateFromPulse();
-        return;
-    }
-
-    Q_ASSERT(i);
-    ss->updateSource(i);
-}
-
-static void subscribe_cb(pa_context *c, pa_subscription_event_type_t t, uint32_t \
                index, void *userdata) {
-    Q_ASSERT(c);
-    THAT(userdata);
-
-    switch (t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) {
-    case PA_SUBSCRIPTION_EVENT_CARD:
-        if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) {
-            ss->removeCard(index);
-        } else {
-            pa_operation *operation =
-                    pa_context_get_card_info_by_index(c, index, card_cb, ss);
-            if (!operation) {
-                qCDebug(KCM_PHONON_LOG) << "pa_context_get_card_info_by_index() \
                failed";
-                return;
-            }
-            pa_operation_unref(operation);
-        }
-        break;
-
-    case PA_SUBSCRIPTION_EVENT_SINK:
-        if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) {
-            ss->removeSink(index);
-        } else {
-            pa_operation *operation =
-                    pa_context_get_sink_info_by_index(c, index, sink_cb, ss);
-            if (!operation) {
-                qCDebug(KCM_PHONON_LOG) << "pa_context_get_sink_info_by_index() \
                failed";
-                return;
-            }
-            pa_operation_unref(operation);
-        }
-        break;
-
-    case PA_SUBSCRIPTION_EVENT_SOURCE:
-        if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) {
-            ss->removeSource(index);
-        } else {
-            pa_operation *o;
-            if (!(o = pa_context_get_source_info_by_index(c, index, source_cb, ss))) \
                {
-                qCDebug(KCM_PHONON_LOG) << "pa_context_get_source_info_by_index() \
                failed";
-                return;
-            }
-            pa_operation_unref(o);
-        }
-        break;
-    }
-}
-
-static void context_state_callback(pa_context *c, void *userdata)
-{
-    Q_ASSERT(c);
-    THAT(userdata);
-
-    qCDebug(KCM_PHONON_LOG) << "context_state_callback" << pa_context_get_state(c);
-    pa_context_state_t state = pa_context_get_state(c);
-    if (state == PA_CONTEXT_READY) {
-        // Attempt to load things up
-        pa_operation *o;
-
-        pa_context_set_subscribe_callback(c, subscribe_cb, ss);
-
-        if (!(o = pa_context_subscribe(c, (pa_subscription_mask_t)
-                                       (PA_SUBSCRIPTION_MASK_CARD|
-                                        PA_SUBSCRIPTION_MASK_SINK|
-                                        PA_SUBSCRIPTION_MASK_SOURCE), NULL, NULL))) \
                {
-            qCDebug(KCM_PHONON_LOG) << "pa_context_subscribe() failed";
-            return;
-        }
-        pa_operation_unref(o);
-
-        if (!(o = pa_context_get_card_info_list(c, card_cb, ss))) {
-            qCDebug(KCM_PHONON_LOG) << "pa_context_get_card_info_list() failed";
-            return;
-        }
-        pa_operation_unref(o);
-
-        if (!(o = pa_context_get_sink_info_list(c, sink_cb, ss))) {
-            qCDebug(KCM_PHONON_LOG) << "pa_context_get_sink_info_list() failed";
-            return;
-        }
-        pa_operation_unref(o);
-
-        if (!(o = pa_context_get_source_info_list(c, source_cb, ss))) {
-            qCDebug(KCM_PHONON_LOG) << "pa_context_get_source_info_list() failed";
-            return;
-        }
-        pa_operation_unref(o);
-
-        ss->load();
-
-    } else if (!PA_CONTEXT_IS_GOOD(state)) {
-        // If this is our probe phase, exit our context immediately
-        if (s_context != c)
-            pa_context_disconnect(c);
-        else {
-            qCWarning(KCM_PHONON_LOG) << "PulseAudio context lost. Scheduling \
                reconnect in eventloop.";
-            pa_context_unref(s_context);
-            s_context = 0;
-            QMetaObject::invokeMethod(ss, "connectToDaemon", Qt::QueuedConnection);
-        }
-    }
-}
-
-static void suspended_callback(pa_stream *s, void *userdata) {
-    THAT(userdata);
-
-    if (pa_stream_is_suspended(s))
-        ss->updateVUMeter(-1);
-}
-
-static void read_callback(pa_stream *s, size_t length, void *userdata) {
-    THAT(userdata);
-
-    const void *data;
-    int v;
-    if (pa_stream_peek(s, &data, &length) < 0) {
-        qCDebug(KCM_PHONON_LOG) << "Failed to read data from stream";
-        return;
-    }
-
-    Q_ASSERT(length > 0);
-    Q_ASSERT(length % sizeof(float) == 0);
-
-    v = ((const float*) data)[length / sizeof(float) -1] * 100;
-
-    pa_stream_drop(s);
-
-    if (v < 0)
-        v = 0;
-    if (v > 100)
-        v = 100;
-
-    ss->updateVUMeter(v);
-}
-
-
-AudioSetup::AudioSetup(QWidget *parent)
-    : QWidget(parent)
-    , m_OutstandingRequests(3)
-    , m_Canberra(0)
-    , m_VUStream(0)
-    , m_VURealValue(0)
-{
-    setupUi(this);
-
-    cardLabel->setEnabled(false);
-    cardBox->setEnabled(false);
-    profileLabel->setVisible(false);
-    profileBox->setVisible(false);
-
-    deviceLabel->setEnabled(false);
-    deviceBox->setEnabled(false);
-    portLabel->setVisible(false);
-    portBox->setVisible(false);
-
-    for (int i = 0; i < 5; ++i)
-        placementGrid->setColumnStretch(i, 1);
-    for (int i = 0; i < 3; ++i)
-        placementGrid->setRowStretch(i, 1);
-
-    m_icon = new QLabel(this);
-    m_icon->setPixmap(QPixmap(KUser().faceIconPath()));
-    if (m_icon->pixmap()->isNull())
-        m_icon->setPixmap(QIcon::fromTheme("system-users").pixmap(KIconLoader::SizeHuge, \
                KIconLoader::SizeHuge));
-    m_icon->setMaximumSize(KIconLoader::SizeHuge, KIconLoader::SizeHuge);
-    m_icon->setScaledContents(true);
-    placementGrid->addWidget(m_icon, 1, 2, Qt::AlignCenter);
-
-    update();
-    connect(cardBox, static_cast<void \
(KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, \
                &AudioSetup::cardChanged);
-    connect(profileBox, static_cast<void \
(KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, \
                &AudioSetup::profileChanged);
-    connect(deviceBox, static_cast<void \
(KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, \
                &AudioSetup::deviceChanged);
-    connect(portBox, static_cast<void \
(KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, \
                &AudioSetup::portChanged);
-
-    m_VUTimer = new QTimer(this);
-    m_VUTimer->setInterval(10);
-    connect(m_VUTimer, &QTimer::timeout, this, &AudioSetup::reallyUpdateVUMeter);
-
-    // We require a glib event loop
-    const QByteArray eventDispatcher(
-                QAbstractEventDispatcher::instance()->metaObject()->className());
-    if (!eventDispatcher.contains("EventDispatcherGlib")) {
-        qCDebug(KCM_PHONON_LOG) << "Disabling PulseAudio integration for lack of \
                GLib event loop.";
-        return;
-    }
-
-    int ret = ca_context_create(&m_Canberra);
-    if (ret < 0) {
-        qCDebug(KCM_PHONON_LOG) << "Disabling PulseAudio integration. Canberra \
                context failed.";
-        return;
-    }
-
-    s_mainloop = pa_glib_mainloop_new(NULL);
-    if (!s_mainloop) {
-        qCDebug(KCM_PHONON_LOG) << "Disabling PulseAudio integration for lack of \
                working GLib event loop.";
-        ca_context_destroy(m_Canberra);
-        m_Canberra = 0;
-        return;
-    }
-
-    connectToDaemon();
-}
-
-AudioSetup::~AudioSetup()
-{
-    if (m_Canberra)
-        ca_context_destroy(m_Canberra);
-    if (s_context) {
-        pa_context_unref(s_context);
-        s_context = 0;
-    }
-    if (s_mainloop) {
-        pa_glib_mainloop_free(s_mainloop);
-        s_mainloop = 0;
-    }
-    s_Cards.clear();
-    s_Sinks.clear();
-    s_Sources.clear();
-}
-
-void AudioSetup::load()
-{
-}
-
-void AudioSetup::save()
-{
-}
-
-void AudioSetup::defaults()
-{
-}
-
-void AudioSetup::updateCard(const pa_card_info *pInfo)
-{
-    cardInfo info;
-    info.index = pInfo->index;
-
-    const char *description = pa_proplist_gets(pInfo->proplist, \
                PA_PROP_DEVICE_DESCRIPTION);
-    if(description)
-        info.name = QString::fromUtf8(description);
-    else
-        info.name = QString::fromUtf8(pInfo->name);
-
-    const char *icon = pa_proplist_gets(pInfo->proplist, PA_PROP_DEVICE_ICON_NAME);
-    if (icon)
-        info.icon = QString::fromUtf8(icon);
-    else
-        info.icon = QString::fromUtf8(SS_DEFAULT_ICON);
-
-    for (quint32 i = 0; i < pInfo->n_profiles; ++i) {
-        const pa_card_profile_info *profile = &(pInfo->profiles[i]);
-        const quint32 priority = profile->priority;
-        const QPair<QString, QString> name(profile->name ? \
                QString::fromUtf8(profile->name) : QString(),
-                                           profile->description ? \
                QString::fromUtf8(profile->description) : QString());
-        info.profiles.insert(priority, name);
-    }
-
-    if (pInfo->active_profile)
-        info.activeProfile = pInfo->active_profile->name;
-
-    cardBox->blockSignals(true);
-    if (s_Cards.contains(pInfo->index)) {
-        int idx = cardBox->findData(pInfo->index);
-        if (idx >= 0) {
-            cardBox->setItemIcon(idx, QIcon::fromTheme(info.icon));
-            cardBox->setItemText(idx, info.name);
-        }
-    } else {
-        cardBox->addItem(QIcon::fromTheme(info.icon), info.name, pInfo->index);
-    }
-    cardBox->blockSignals(false);
-
-    s_Cards[pInfo->index] = info;
-
-    cardChanged();
-    qCDebug(KCM_PHONON_LOG) << "Got info about card" << info.name;
-}
-
-void AudioSetup::removeCard(uint32_t index)
-{
-    s_Cards.remove(index);
-    updateFromPulse();
-    const int idx = cardBox->findData(index);
-    if (idx >= 0)
-        cardBox->removeItem(idx);
-}
-
-void AudioSetup::updateSink(const pa_sink_info* i)
-{
-    deviceInfo info;
-    info.index = i->index;
-    info.cardIndex = i->card;
-    info.name = QString::fromUtf8(i->description);
-
-    const char *icon = pa_proplist_gets(i->proplist, PA_PROP_DEVICE_ICON_NAME);
-    info.icon = icon ? icon : SS_DEFAULT_ICON;
-
-    info.channelMap = i->channel_map;
-
-    for (uint32_t j = 0; j < i->n_ports; ++j)
-        info.ports[i->ports[j]->priority] = \
QPair<QString,QString>(i->ports[j]->name, \
                QString::fromUtf8(i->ports[j]->description));
-    if (i->active_port)
-        info.activePort = i->active_port->name;
-
-    s_Sinks[i->index] = info;
-
-    // Need to update the currently displayed port if this sink is the currently \
                displayed one.
-    if (info.ports.size()) {
-        int idx = deviceBox->currentIndex();
-        if (idx >= 0) {
-            qint64 index = deviceBox->itemData(idx).toInt();
-            if (index >= 0 && index == i->index) {
-                portBox->blockSignals(true);
-                portBox->setCurrentIndex(portBox->findData(info.activePort));
-                portBox->blockSignals(false);
-            }
-        }
-    }
-
-    qCDebug(KCM_PHONON_LOG) << "Got info about sink" << info.name;
-}
-
-void AudioSetup::removeSink(uint32_t index)
-{
-    s_Sinks.remove(index);
-    updateIndependantDevices();
-    updateFromPulse();
-    int idx = deviceBox->findData(index);
-    if (idx >= 0)
-        deviceBox->removeItem(idx);
-}
-
-void AudioSetup::updateSource(const pa_source_info* i)
-{
-    if (i->monitor_of_sink != PA_INVALID_INDEX)
-        return;
-
-    deviceInfo info;
-    info.index = i->index;
-    info.cardIndex = i->card;
-    info.name = QString::fromUtf8(i->description);
-
-    const char* icon = pa_proplist_gets(i->proplist, PA_PROP_DEVICE_ICON_NAME);
-    info.icon = icon ? icon : SS_DEFAULT_ICON;
-
-    info.channelMap = i->channel_map;
-
-    for (uint32_t j = 0; j < i->n_ports; ++j)
-        info.ports[i->ports[j]->priority] = \
QPair<QString,QString>(i->ports[j]->name, \
                QString::fromUtf8(i->ports[j]->description));
-    if (i->active_port)
-        info.activePort = i->active_port->name;
-
-    s_Sources[i->index] = info;
-
-    // Need to update the currently displayed port if this source is the currently \
                displayed one.
-    if (false && info.ports.size()) {
-        int idx = deviceBox->currentIndex();
-        if (idx >= 0) {
-            qint64 index = deviceBox->itemData(idx).toInt();
-            if (index < 0 && ((-1*index) - 1) == i->index) {
-                portBox->blockSignals(true);
-                portBox->setCurrentIndex(portBox->findData(info.activePort));
-                portBox->blockSignals(false);
-            }
-        }
-    }
-
-    qCDebug(KCM_PHONON_LOG) << "Got info about source" << info.name;
-}
-
-void AudioSetup::removeSource(uint32_t index)
-{
-    s_Sources.remove(index);
-    updateIndependantDevices();
-    updateFromPulse();
-    int idx = deviceBox->findData(index);
-    if (false && idx >= 0)
-        deviceBox->removeItem(idx);
-}
-
-void AudioSetup::updateFromPulse()
-{
-    bool setupReady = false;
-    if (m_OutstandingRequests > 0) {
-        if (0 == --m_OutstandingRequests) {
-            // Work out which seclector to pick by default (we want to choose a real \
                Card if possible)
-            if (s_Cards.size() != cardBox->count())
-                cardBox->setCurrentIndex(1);
-            setupReady = true;
-        }
-    }
-
-    if (!m_OutstandingRequests) {
-        if (!s_Cards.size() && !s_Sinks.size()) {
-            cardLabel->setEnabled(false);
-            cardBox->setEnabled(false);
-            profileLabel->setVisible(false);
-            profileBox->setVisible(false);
-
-            deviceLabel->setEnabled(false);
-            deviceBox->setEnabled(false);
-            portLabel->setVisible(false);
-            portBox->setVisible(false);
-        }
-        if (s_Cards.size() && !cardBox->isEnabled()) {
-            cardLabel->setEnabled(true);
-            cardBox->setEnabled(true);
-            cardChanged();
-        }
-        if (s_Sinks.size() && !deviceBox->isEnabled()) {
-            deviceLabel->setEnabled(true);
-            deviceBox->setEnabled(true);
-            deviceChanged();
-        }
-
-        if (setupReady) {
-            emit ready();
-        }
-    }
-}
-
-void AudioSetup::cardChanged()
-{
-    int idx = cardBox->currentIndex();
-    if (idx < 0) {
-        profileLabel->setVisible(false);
-        profileBox->setVisible(false);
-        return;
-    }
-
-    uint32_t card_index = cardBox->itemData(idx).toUInt();
-    Q_ASSERT(PA_INVALID_INDEX == card_index || s_Cards.contains(card_index));
-    bool show_profiles = (PA_INVALID_INDEX != card_index && \
                s_Cards[card_index].profiles.size());
-    if (show_profiles) {
-        cardInfo &card_info = s_Cards[card_index];
-        profileBox->blockSignals(true);
-        profileBox->clear();
-        QMap<quint32, QPair<QString, QString> >::const_iterator it;
-        for (it = card_info.profiles.constBegin(); it != \
                card_info.profiles.constEnd(); ++it)
-            profileBox->insertItem(0, it.value().second, it.value().first);
-        profileBox->setCurrentIndex(profileBox->findData(card_info.activeProfile));
-        profileBox->blockSignals(false);
-    }
-    profileLabel->setVisible(show_profiles);
-    profileBox->setVisible(show_profiles);
-
-    deviceBox->blockSignals(true);
-    deviceBox->clear();
-    QMap<quint32, deviceInfo>::const_iterator it;
-    for (it = s_Sinks.constBegin(); it != s_Sinks.constEnd(); ++it) {
-        if (it->cardIndex == card_index)
-            deviceBox->addItem(QIcon::fromTheme(it->icon), i18n("Playback (%1)", \
                it->name), it->index);
-    }
-    for (it = s_Sources.constBegin(); it != s_Sources.constEnd(); ++it) {
-        if (it->cardIndex == card_index)
-            deviceBox->addItem(QIcon::fromTheme(it->icon), i18n("Recording (%1)", \
                it->name), ((-1*it->index) - 1));
-    }
-    deviceBox->blockSignals(false);
-
-    deviceGroupBox->setEnabled(!!deviceBox->count());
-
-    deviceChanged();
-
-    qCDebug(KCM_PHONON_LOG) << "Doing update" << cardBox->currentIndex();
-
-    emit changed();
-}
-
-void AudioSetup::profileChanged()
-{
-    quint32 card_index = cardBox->itemData(cardBox->currentIndex()).toUInt();
-    Q_ASSERT(PA_INVALID_INDEX != card_index);
-
-    QString profile = profileBox->itemData(profileBox->currentIndex()).toString();
-    qCDebug(KCM_PHONON_LOG) << "Changing profile to" << profile;
-
-    Q_ASSERT(s_Cards[card_index].profiles.size());
-
-    pa_operation *operation =
-            pa_context_set_card_profile_by_index(s_context,
-                                                 card_index,
-                                                 qPrintable(profile),
-                                                 NULL,
-                                                 NULL);
-    if (!operation)
-        qCDebug(KCM_PHONON_LOG) << "pa_context_set_card_profile_by_name() failed";
-    else
-        pa_operation_unref(operation);
-
-    emit changed();
-}
-
-void AudioSetup::updateIndependantDevices()
-{
-    // Should we display the "Independent Devices" drop down?
-    // Count all the sinks without cards
-    bool showID = false;
-    QMap<quint32, deviceInfo>::const_iterator it;
-    for (it = s_Sinks.constBegin(); it != s_Sinks.constEnd(); ++it) {
-        if (PA_INVALID_INDEX == it->cardIndex) {
-            showID = true;
-            break;
-        }
-    }
-
-    bool haveID = (PA_INVALID_INDEX == cardBox->itemData(0).toUInt());
-
-    qCDebug(KCM_PHONON_LOG) << QString("Want ID: %1; Have ID: \
                %2").arg(showID?"Yes":"No").arg(haveID?"Yes":"No");
-
-    cardBox->blockSignals(true);
-    if (haveID && !showID)
-        cardBox->removeItem(0);
-    else if (!haveID && showID)
-        cardBox->insertItem(0, QIcon::fromTheme(SS_DEFAULT_ICON), i18n("Independent \
                Devices"), PA_INVALID_INDEX);
-    cardBox->blockSignals(false);
-}
-
-void AudioSetup::updateVUMeter(int vol)
-{
-    if (vol < 0) {
-        inputLevels->setEnabled(false);
-        inputLevels->setValue(0);
-        m_VURealValue = 0;
-    } else {
-        inputLevels->setEnabled(true);
-        if (vol > inputLevels->value())
-            inputLevels->setValue(vol);
-        m_VURealValue = vol;
-    }
-}
-
-void AudioSetup::reallyUpdateVUMeter()
-{
-    int val = inputLevels->value();
-    if (val > m_VURealValue)
-        inputLevels->setValue(val-1);
-}
-
-bool AudioSetup::connectToDaemon()
-{
-    pa_mainloop_api *api = pa_glib_mainloop_get_api(s_mainloop);
-
-    s_context = pa_context_new(api, i18n("KDE Audio Hardware \
                Setup").toUtf8().constData());
-    if (pa_context_connect(s_context, NULL, PA_CONTEXT_NOFAIL, 0) < 0) {
-        qCDebug(KCM_PHONON_LOG) << "Disabling PulseAudio integration. Context \
                connection failed: " << pa_strerror(pa_context_errno(s_context));
-        pa_context_unref(s_context);
-        s_context = 0;
-        pa_glib_mainloop_free(s_mainloop);
-        s_mainloop = 0;
-        ca_context_destroy(m_Canberra);
-        m_Canberra = 0;
-        setEnabled(false);
-        return false;
-    }
-
-    pa_context_set_state_callback(s_context, &context_state_callback, this);
-    setEnabled(true);
-    return true;
-}
-
-static deviceInfo &getDeviceInfo(qint64 index)
-{
-    if (index >= 0) {
-        Q_ASSERT(s_Sinks.contains(index));
-        return s_Sinks[index];
-    }
-
-    index = (-1 * index) - 1;
-    Q_ASSERT(s_Sources.contains(index));
-    return s_Sources[index];
-}
-
-void AudioSetup::deviceChanged()
-{
-    int idx = deviceBox->currentIndex();
-    if (idx < 0) {
-        portLabel->setVisible(false);
-        portBox->setVisible(false);
-        _updatePlacementTester();
-        return;
-    }
-    qint64 index = deviceBox->itemData(idx).toInt();
-    deviceInfo &device_info = getDeviceInfo(index);
-
-    qCDebug(KCM_PHONON_LOG) << QString("Updating ports for device '%1' (%2 ports \
                available)")
-                .arg(device_info.name)
-                .arg(device_info.ports.size());
-
-    bool showPorts = !!device_info.ports.size();
-    if (showPorts) {
-        portBox->blockSignals(true);
-        portBox->clear();
-        QMap<quint32, QPair<QString, QString> >::const_iterator it;
-        for (it = device_info.ports.constBegin(); it != \
                device_info.ports.constEnd(); ++it)
-            portBox->insertItem(0, it.value().second, it.value().first);
-        portBox->setCurrentIndex(portBox->findData(device_info.activePort));
-        portBox->blockSignals(false);
-    }
-    portLabel->setVisible(showPorts);
-    portBox->setVisible(showPorts);
-
-    if (deviceBox->currentIndex() >= 0) {
-        if (index < 0)
-            _createMonitorStreamForSource((-1*index) - 1);
-        else if (m_VUStream) {
-            pa_stream_disconnect(m_VUStream);
-            m_VUStream = NULL;
-        }
-
-        _updatePlacementTester();
-    }
-
-    emit changed();
-}
-
-void AudioSetup::portChanged()
-{
-    qint64 index = deviceBox->itemData(deviceBox->currentIndex()).toInt();
-
-    QString port = portBox->itemData(portBox->currentIndex()).toString();
-    qCDebug(KCM_PHONON_LOG) << "Changing port to" << port;
-
-#ifndef QT_NO_DEBUG
-    deviceInfo &device_info = getDeviceInfo(index);
-    Q_ASSERT(device_info.ports.size());
-#endif /* QT_NO_DEBUG */
-
-    pa_operation *o;
-    if (index >= 0) {
-        if (!(o = pa_context_set_sink_port_by_index(s_context, (uint32_t)index, \
                port.toLatin1().constData(), NULL, NULL)))
-            qCDebug(KCM_PHONON_LOG) << "pa_context_set_sink_port_by_index() failed";
-        else
-            pa_operation_unref(o);
-    } else {
-        if (!(o = pa_context_set_source_port_by_index(s_context, \
                (uint32_t)((-1*index) - 1), port.toLatin1().constData(), NULL, \
                NULL)))
-            qCDebug(KCM_PHONON_LOG) << "pa_context_set_source_port_by_index() \
                failed";
-        else
-            pa_operation_unref(o);
-    }
-
-    emit changed();
-}
-
-void AudioSetup::_updatePlacementTester()
-{
-    static const int position_table[] = {
-        /* Position, X, Y */
-        PA_CHANNEL_POSITION_FRONT_LEFT,            0, 0,
-        PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER,  1, 0,
-        PA_CHANNEL_POSITION_FRONT_CENTER,          2, 0,
-        PA_CHANNEL_POSITION_MONO,                  2, 0,
-        PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER, 3, 0,
-        PA_CHANNEL_POSITION_FRONT_RIGHT,           4, 0,
-        PA_CHANNEL_POSITION_SIDE_LEFT,             0, 1,
-        PA_CHANNEL_POSITION_SIDE_RIGHT,            4, 1,
-        PA_CHANNEL_POSITION_REAR_LEFT,             0, 2,
-        PA_CHANNEL_POSITION_REAR_CENTER,           2, 2,
-        PA_CHANNEL_POSITION_REAR_RIGHT,            4, 2,
-        PA_CHANNEL_POSITION_LFE,                   3, 2
-    };
-
-    QLayoutItem* w;
-    while ((w = placementGrid->takeAt(0))) {
-        if (w->widget() != m_icon) {
-            if (w->widget())
-                delete w->widget();
-            delete w;
-        }
-    }
-    placementGrid->addWidget(m_icon, 1, 2, Qt::AlignCenter);
-    int idx = deviceBox->currentIndex();
-    if (idx < 0)
-        return;
-
-    qint64 index = deviceBox->itemData(idx).toInt();
-    deviceInfo& sink_info = getDeviceInfo(index);
-
-    if (index < 0) {
-        playbackOrCaptureStack->setCurrentIndex(1);
-        m_VUTimer->start();
-        return;
-    }
-
-    playbackOrCaptureStack->setCurrentIndex(0);
-    m_VUTimer->stop();
-
-    for (int i = 0; i < 36; i += 3) {
-        pa_channel_position_t pos = (pa_channel_position_t)position_table[i];
-        // Check to see if we have this item in our current channel map.
-        bool have = false;
-        for (uint32_t j = 0; j < sink_info.channelMap.channels; ++j) {
-            if (sink_info.channelMap.map[j] == pos) {
-                have = true;
-                break;
-            }
-        }
-        if (!have) {
-            continue;
-        }
-
-        QPushButton *btn = new TestSpeakerWidget(pos, m_Canberra, this);
-        placementGrid->addWidget(btn, position_table[i+2], position_table[i+1], \
                Qt::AlignCenter);
-    }
-}
-
-void AudioSetup::_createMonitorStreamForSource(uint32_t source_idx)
-{
-    if (m_VUStream) {
-        pa_stream_disconnect(m_VUStream);
-        m_VUStream = NULL;
-    }
-
-    char t[16];
-    pa_buffer_attr attr;
-    pa_sample_spec ss;
-
-    ss.channels = 1;
-    ss.format = PA_SAMPLE_FLOAT32;
-    ss.rate = 25;
-
-    memset(&attr, 0, sizeof(attr));
-    attr.fragsize = sizeof(float);
-    attr.maxlength = static_cast<quint32>(-1);
-
-    snprintf(t, sizeof(t), "%u", source_idx);
-
-    m_VUStream = pa_stream_new(s_context, "Peak detect", &ss, NULL);
-    if (!m_VUStream) {
-        qCDebug(KCM_PHONON_LOG) << "Failed to create monitoring stream";
-        return;
-    }
-
-    pa_stream_set_read_callback(m_VUStream, read_callback, this);
-    pa_stream_set_suspended_callback(m_VUStream, suspended_callback, this);
-
-    if (pa_stream_connect_record(m_VUStream, t, &attr, (pa_stream_flags_t) \
                (PA_STREAM_DONT_MOVE|PA_STREAM_PEAK_DETECT|PA_STREAM_ADJUST_LATENCY)) \
                < 0) {
-        qCDebug(KCM_PHONON_LOG) << "Failed to connect monitoring stream";
-        pa_stream_unref(m_VUStream);
-        m_VUStream = NULL;
-    }
-}
-
-quint32 AudioSetup::getCurrentSinkIndex()
-{
-    int idx = deviceBox->currentIndex();
-    if (idx < 0)
-        return PA_INVALID_INDEX;
-
-    qint64 index = deviceBox->itemData(idx).toInt();
-    if (index >= 0)
-        return static_cast<quint32>(index);
-
-    return PA_INVALID_INDEX;
-}
-
-QDebug operator<<(QDebug dbg, const pa_context_state_t &state)
-{
-    QString name;
-    switch (state) {
-    case PA_CONTEXT_UNCONNECTED:  name = QLatin1Literal("Unconnected"); break;
-    case PA_CONTEXT_CONNECTING:   name = QLatin1Literal("Connecting"); break;
-    case PA_CONTEXT_AUTHORIZING:  name = QLatin1Literal("Authorizing"); break;
-    case PA_CONTEXT_SETTING_NAME: name = QLatin1Literal("Setting Name"); break;
-    case PA_CONTEXT_READY:        name = QLatin1Literal("Ready"); break;
-    case PA_CONTEXT_FAILED:       name = QLatin1Literal("Failed"); break;
-    case PA_CONTEXT_TERMINATED:   name = QLatin1Literal("Terminated"); break;
-    }
-
-    if (name.isEmpty())
-        name = QString("Unknown state(%1)").arg(state);
-
-    dbg.nospace() << name;
-    return dbg;
-}
-
diff --git a/kcms/phonon/audiosetup.h b/kcms/phonon/audiosetup.h
deleted file mode 100644
index 72fb2beb..00000000
--- a/kcms/phonon/audiosetup.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*  This file is part of the KDE project
-    Copyright (C) 2010 Colin Guthrie <cguthrie@mandriva.org>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License version 2
-    as published by the Free Software Foundation.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-    02110-1301, USA.
-
-*/
-
-#ifndef PHONON_AUDIOSETUP_H
-#define PHONON_AUDIOSETUP_H
-
-#include <canberra.h>
-#include <pulse/pulseaudio.h>
-
-#include "ui_audiosetup.h"
-
-class QTimer;
-
-struct pa_glib_mainloop;
-
-typedef struct {
-    quint32 index;
-    QString name;
-    QString icon;
-    QMultiMap<quint32, QPair<QString, QString> > profiles;
-    QString activeProfile;
-} cardInfo;
-
-typedef struct {
-    quint32 index;
-    quint32 cardIndex;
-    QString name;
-    QString icon;
-    pa_channel_map channelMap;
-    QMap<quint32, QPair<QString, QString> > ports;
-    QString activePort;
-} deviceInfo;
-
-class AudioSetup : public QWidget, private Ui::AudioSetup
-{
-    Q_OBJECT
-
-public:
-    explicit AudioSetup(QWidget *parent = 0);
-    ~AudioSetup();
-
-    void load();
-    void save();
-    void defaults();
-    uint32_t getCurrentSinkIndex();
-    void updateCard(const pa_card_info*);
-    void removeCard(uint32_t idx);
-    void updateSink(const pa_sink_info*);
-    void removeSink(uint32_t idx);
-    void updateSource(const pa_source_info*);
-    void removeSource(uint32_t idx);
-    void updateFromPulse();
-    void updateIndependantDevices();
-    void updateVUMeter(int vol);
-
-public Q_SLOTS:
-    void cardChanged();
-    void profileChanged();
-    void deviceChanged();
-    void portChanged();
-    void reallyUpdateVUMeter();
-    bool connectToDaemon();
-
-Q_SIGNALS:
-    void changed();
-    void ready();
-
-private:
-    void _updatePlacementTester();
-    void _createMonitorStreamForSource(uint32_t);
-
-    QLabel *m_icon;
-    int m_OutstandingRequests;
-    ca_context* m_Canberra;
-    pa_stream* m_VUStream;
-    int m_VURealValue;
-    QTimer* m_VUTimer;
-};
-
-QDebug operator<<(QDebug dbg, const pa_context_state_t &state);
-
-#endif // PHONON_AUDIOSETUP_H
diff --git a/kcms/phonon/audiosetup.ui b/kcms/phonon/audiosetup.ui
deleted file mode 100644
index 51f3b76c..00000000
--- a/kcms/phonon/audiosetup.ui
+++ /dev/null
@@ -1,224 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <author>Colin Guthrie</author>
- <class>AudioSetup</class>
- <widget class="QWidget" name="AudioSetup">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>654</width>
-    <height>480</height>
-   </rect>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout_3">
-   <item>
-    <widget class="QGroupBox" name="hardwareGroupBox">
-     <property name="title">
-      <string>Hardware</string>
-     </property>
-     <layout class="QGridLayout" name="_3">
-      <item row="3" column="1">
-       <widget class="KComboBox" name="profileBox">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="1">
-       <widget class="KComboBox" name="cardBox">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-       </widget>
-      </item>
-      <item row="3" column="0">
-       <widget class="QLabel" name="profileLabel">
-        <property name="text">
-         <string>Profile</string>
-        </property>
-        <property name="buddy">
-         <cstring>profileBox</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="0">
-       <widget class="QLabel" name="cardLabel">
-        <property name="text">
-         <string>Sound Card</string>
-        </property>
-        <property name="buddy">
-         <cstring>cardBox</cstring>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <widget class="QGroupBox" name="deviceGroupBox">
-     <property name="title">
-      <string>Device Configuration</string>
-     </property>
-     <layout class="QGridLayout" name="_2">
-      <item row="0" column="1">
-       <widget class="KComboBox" name="deviceBox">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="0">
-       <widget class="QLabel" name="portLabel">
-        <property name="text">
-         <string>Connector</string>
-        </property>
-        <property name="buddy">
-         <cstring>portBox</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="1">
-       <widget class="KComboBox" name="portBox">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="0">
-       <widget class="QLabel" name="deviceLabel">
-        <property name="text">
-         <string>Sound Device</string>
-        </property>
-        <property name="buddy">
-         <cstring>deviceBox</cstring>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <widget class="QStackedWidget" name="playbackOrCaptureStack">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="currentIndex">
-      <number>1</number>
-     </property>
-     <widget class="QWidget" name="playbackPage">
-      <property name="enabled">
-       <bool>true</bool>
-      </property>
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <layout class="QVBoxLayout" name="verticalLayout">
-       <item>
-        <widget class="QGroupBox" name="outputGroupBox">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="title">
-          <string>Speaker Placement and Testing</string>
-         </property>
-         <layout class="QVBoxLayout" name="_4">
-          <item>
-           <layout class="QGridLayout" name="placementGrid"/>
-          </item>
-         </layout>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="capturePage">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <layout class="QVBoxLayout" name="verticalLayout_4">
-       <item>
-        <widget class="QGroupBox" name="inputGroupBox">
-         <property name="enabled">
-          <bool>true</bool>
-         </property>
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="minimumSize">
-          <size>
-           <width>0</width>
-           <height>26</height>
-          </size>
-         </property>
-         <property name="title">
-          <string>Input Levels</string>
-         </property>
-         <layout class="QVBoxLayout" name="verticalLayout_2">
-          <item>
-           <widget class="QProgressBar" name="inputLevels">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="maximumSize">
-             <size>
-              <width>16777215</width>
-              <height>10</height>
-             </size>
-            </property>
-            <property name="value">
-             <number>50</number>
-            </property>
-            <property name="textVisible">
-             <bool>false</bool>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>KComboBox</class>
-   <extends>QComboBox</extends>
-   <header>kcombobox.h</header>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/kcms/phonon/main.cpp b/kcms/phonon/main.cpp
index 74db1cb1..b980fdf3 100644
--- a/kcms/phonon/main.cpp
+++ b/kcms/phonon/main.cpp
@@ -26,9 +26,6 @@
 #include <KPluginFactory>
 #include <KLocalizedString>
 
-#ifdef HAVE_PULSEAUDIO
-#  include "audiosetup.h"
-#endif
 #include "backendselection.h"
 #include "devicepreference.h"
 
@@ -64,12 +61,6 @@ PhononKcm::PhononKcm(QWidget *parent, const QVariantList &args)
     connect(m_devicePreferenceWidget, SIGNAL(changed()), SLOT(changed()));
 
     setButtons( KCModule::Default|KCModule::Apply|KCModule::Help );
-
-#ifdef HAVE_PULSEAUDIO
-    m_speakerSetup = new AudioSetup(this);
-    m_speakerSetup->setVisible(false);
-    connect(m_speakerSetup, SIGNAL(ready()), SLOT(speakerSetupReady()));
-#endif
 }
 
 void PhononKcm::load()
@@ -90,13 +81,4 @@ void PhononKcm::defaults()
     m_backendSelection->defaults();
 }
 
-#ifdef HAVE_PULSEAUDIO
-void PhononKcm::speakerSetupReady()
-{
-    m_tabs->insertTab(1, m_speakerSetup, i18n("Audio Hardware Setup"));
-    m_devicePreferenceWidget->pulseAudioEnabled();
-    connect(m_speakerSetup, SIGNAL(changed()), SLOT(changed()));
-}
-#endif
-
 #include "main.moc"
diff --git a/kcms/phonon/main.h b/kcms/phonon/main.h
index 79344e28..9e07cce6 100644
--- a/kcms/phonon/main.h
+++ b/kcms/phonon/main.h
@@ -27,9 +27,6 @@ class DevicePreference;
 }
 class BackendSelection;
 
-#ifdef HAVE_PULSEAUDIO
-class AudioSetup;
-#endif
 class QTabWidget;
 
 class PhononKcm : public KCModule
@@ -42,18 +39,10 @@ public:
     void save() override;
     void defaults() override;
 
-#ifdef HAVE_PULSEAUDIO
-private Q_SLOTS:
-    void speakerSetupReady();
-#endif
-
 private:
     QTabWidget* m_tabs;
     Phonon::DevicePreference *m_devicePreferenceWidget;
     BackendSelection *m_backendSelection;
-#ifdef HAVE_PULSEAUDIO
-    AudioSetup *m_speakerSetup;
-#endif
 };
 
 #endif // MAIN_H
diff --git a/kcms/phonon/testspeakerwidget.cpp b/kcms/phonon/testspeakerwidget.cpp
deleted file mode 100644
index bae0cb06..00000000
--- a/kcms/phonon/testspeakerwidget.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-/*  This file is part of the KDE project
-    Copyright (C) 2010 Colin Guthrie <cguthrie@mandriva.org>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License version 2
-    as published by the Free Software Foundation.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-    02110-1301, USA.
-*/
-
-#include "testspeakerwidget.h"
-
-#include <KLocalizedString>
-
-#include "audiosetup.h"
-
-static uint32_t s_CurrentIndex = PA_INVALID_INDEX;
-static TestSpeakerWidget *s_CurrentWidget = NULL;
-
-static void finish_cb(ca_context *, uint32_t id, int, void *)
-{
-    Q_ASSERT(id == 0);
-    Q_UNUSED(id); // Suppress compiler warning if QT_NO_DEBUG
-    // Mustn't access QWidgets from a foreign thread, so queue a slot call.
-    QMetaObject::invokeMethod(s_CurrentWidget, "onFinish", Qt::QueuedConnection);
-}
-
-TestSpeakerWidget::TestSpeakerWidget(const pa_channel_position_t pos, ca_context \
                *canberra, AudioSetup* ss)
-    : QPushButton(QIcon::fromTheme("preferences-desktop-sound"), "Test", ss)
-    , m_Ss(ss)
-    , m_Pos(pos)
-    , m_Canberra(canberra)
-{
-    setCheckable(true);
-    setText(_positionName());
-    connect(this, &TestSpeakerWidget::toggled, this, &TestSpeakerWidget::onToggle);
-}
-
-TestSpeakerWidget::~TestSpeakerWidget()
-{
-    if (this == s_CurrentWidget)
-        s_CurrentWidget = NULL;
-}
-
-void TestSpeakerWidget::onToggle(bool state)
-{
-    if (s_CurrentIndex != PA_INVALID_INDEX) {
-        ca_context_cancel(m_Canberra, s_CurrentIndex);
-        s_CurrentIndex = PA_INVALID_INDEX;
-    }
-    if (s_CurrentWidget) {
-        if (this != s_CurrentWidget && state)
-            s_CurrentWidget->setChecked(false);
-        s_CurrentWidget = nullptr;
-    }
-    if (!state)
-        return;
-
-    uint32_t sink_index = m_Ss->getCurrentSinkIndex();
-    char dev[64];
-    snprintf(dev, sizeof(dev), "%lu", (unsigned long) sink_index);
-    ca_context_change_device(m_Canberra, dev);
-
-    const char* sound_name = _positionSoundName();
-    ca_proplist* proplist;
-    ca_proplist_create(&proplist);
-    
-    ca_proplist_sets(proplist, CA_PROP_MEDIA_ROLE, "test");
-    ca_proplist_sets(proplist, CA_PROP_MEDIA_NAME, \
                _positionName().toLatin1().constData());
-    ca_proplist_sets(proplist, CA_PROP_CANBERRA_FORCE_CHANNEL, _positionAsString());
-    ca_proplist_sets(proplist, CA_PROP_CANBERRA_ENABLE, "1");
-
-    ca_proplist_sets(proplist, CA_PROP_EVENT_ID, sound_name);
-    s_CurrentIndex = 0;
-    s_CurrentWidget = this;
-    if (ca_context_play_full(m_Canberra, s_CurrentIndex, proplist, finish_cb, NULL) \
                < 0) {
-        // Try a different sound name.
-        ca_proplist_sets(proplist, CA_PROP_EVENT_ID, "audio-test-signal");
-        if (ca_context_play_full(m_Canberra, s_CurrentIndex, proplist, finish_cb, \
                NULL) < 0) {
-            // Finaly try this... if this doesn't work, then stuff it.
-            ca_proplist_sets(proplist, CA_PROP_EVENT_ID, "bell-window-system");
-            if (ca_context_play_full(m_Canberra, s_CurrentIndex, proplist, \
                finish_cb, NULL) < 0) {
-                s_CurrentIndex = PA_INVALID_INDEX;
-                s_CurrentWidget = NULL;
-                setChecked(false);
-            }
-        }
-    }
-
-    ca_context_change_device(m_Canberra, nullptr);
-    ca_proplist_destroy(proplist);
-}
-
-void TestSpeakerWidget::onFinish()
-{
-    if (s_CurrentWidget && s_CurrentWidget->isChecked()) {
-        s_CurrentIndex = PA_INVALID_INDEX;
-        s_CurrentWidget->setChecked(false);
-        s_CurrentWidget = nullptr;
-    }
-}
-
-const char* TestSpeakerWidget::_positionAsString()
-{
-    switch (m_Pos) {
-    case PA_CHANNEL_POSITION_FRONT_LEFT:
-        return "front-left";
-    case PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER:
-        return "front-left-of-center";
-    case PA_CHANNEL_POSITION_FRONT_CENTER:
-        return "front-center";
-    case PA_CHANNEL_POSITION_MONO:
-        return "mono";
-    case PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER:
-        return "front-right-of-center";
-    case PA_CHANNEL_POSITION_FRONT_RIGHT:
-        return "front-right";
-    case PA_CHANNEL_POSITION_SIDE_LEFT:
-        return "side-left";
-    case PA_CHANNEL_POSITION_SIDE_RIGHT:
-        return "side-right";
-    case PA_CHANNEL_POSITION_REAR_LEFT:
-        return "rear-left";
-    case PA_CHANNEL_POSITION_REAR_CENTER:
-        return "rear-center";
-    case PA_CHANNEL_POSITION_REAR_RIGHT:
-        return "rear-right";
-    case PA_CHANNEL_POSITION_LFE:
-        return "lfe";
-    default:
-        break;
-    }
-    return "invalid";
-}
-
-QString TestSpeakerWidget::_positionName()
-{
-    switch (m_Pos) {
-    case PA_CHANNEL_POSITION_FRONT_LEFT:
-        return i18n("Front Left");
-    case PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER:
-        return i18n("Front Left of Center");
-    case PA_CHANNEL_POSITION_FRONT_CENTER:
-        return i18n("Front Center");
-    case PA_CHANNEL_POSITION_MONO:
-        return i18n("Mono");
-    case PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER:
-        return i18n("Front Right of Center");
-    case PA_CHANNEL_POSITION_FRONT_RIGHT:
-        return i18n("Front Right");
-    case PA_CHANNEL_POSITION_SIDE_LEFT:
-        return i18n("Side Left");
-    case PA_CHANNEL_POSITION_SIDE_RIGHT:
-        return i18n("Side Right");
-    case PA_CHANNEL_POSITION_REAR_LEFT:
-        return i18n("Rear Left");
-    case PA_CHANNEL_POSITION_REAR_CENTER:
-        return i18n("Rear Center");
-    case PA_CHANNEL_POSITION_REAR_RIGHT:
-        return i18n("Rear Right");
-    case PA_CHANNEL_POSITION_LFE:
-        return i18n("Subwoofer");
-    default:
-        break;
-    }
-    return i18n("Unknown Channel");
-}
-
-const char* TestSpeakerWidget::_positionSoundName()
-{
-    switch (m_Pos) {
-    case PA_CHANNEL_POSITION_FRONT_LEFT:
-        return "audio-channel-front-left";
-    case PA_CHANNEL_POSITION_FRONT_RIGHT:
-        return "audio-channel-front-right";
-    case PA_CHANNEL_POSITION_FRONT_CENTER:
-        return "audio-channel-front-center";
-    case PA_CHANNEL_POSITION_REAR_LEFT:
-        return "audio-channel-rear-left";
-    case PA_CHANNEL_POSITION_REAR_RIGHT:
-        return "audio-channel-rear-right";
-    case PA_CHANNEL_POSITION_REAR_CENTER:
-        return "audio-channel-rear-center";
-    case PA_CHANNEL_POSITION_LFE:
-        return "audio-channel-lfe";
-    case PA_CHANNEL_POSITION_SIDE_LEFT:
-        return "audio-channel-side-left";
-    case PA_CHANNEL_POSITION_SIDE_RIGHT:
-        return "audio-channel-side-right";
-    default:
-        break;
-    }
-    return nullptr;
-}
-
diff --git a/kcms/phonon/testspeakerwidget.h b/kcms/phonon/testspeakerwidget.h
deleted file mode 100644
index e719049c..00000000
--- a/kcms/phonon/testspeakerwidget.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*  This file is part of the KDE project
-    Copyright (C) 2010 Colin Guthrie <cguthrie@mandriva.org>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License version 2
-    as published by the Free Software Foundation.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-    02110-1301, USA.
-*/
-
-#ifndef PHONON_TESTSPEAKERWIDGET_H
-#define PHONON_TESTSPEAKERWIDGET_H
-
-#include <QPushButton>
-
-#include <canberra.h>
-#include <pulse/pulseaudio.h>
-
-class AudioSetup;
-
-class TestSpeakerWidget: public QPushButton
-{
-    Q_OBJECT
-public:
-    TestSpeakerWidget(const pa_channel_position_t pos, ca_context *canberra, \
                AudioSetup* ss);
-    ~TestSpeakerWidget();
-
-public slots:
-    void onFinish();
-
-private slots:
-    void onToggle(bool);
-
-private:
-    QString _positionName();
-    const char* _positionAsString();
-    const char* _positionSoundName();
-
-    AudioSetup* m_Ss;
-    pa_channel_position_t m_Pos;
-    ca_context* m_Canberra;
-};
-
-#endif // PHONON_TESTSPEAKERWIDGET_H


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic