Index: libs/libmythtv/NuppelVideoPlayer.cpp
===================================================================
--- libs/libmythtv/NuppelVideoPlayer.cpp	(Revision 17644)
+++ libs/libmythtv/NuppelVideoPlayer.cpp	(Arbeitskopie)
@@ -3724,6 +3724,18 @@
     audio_codec = ac;
 }
 
+bool NuppelVideoPlayer::ToggleUpmixer()
+{
+    if (audioOutput)
+    {
+        const AudioSettings settings(
+                audio_bits, audio_channels, audio_samplerate,
+                audio_passthru, audio_codec);
+        return audioOutput->ToggleUpmixer(settings);
+    } 
+    return false;
+}
+
 void NuppelVideoPlayer::SetEffDsp(int dsprate)
 {
     if (audioOutput)
Index: libs/libmythtv/tv_play.h
===================================================================
--- libs/libmythtv/tv_play.h	(Revision 17644)
+++ libs/libmythtv/tv_play.h	(Arbeitskopie)
@@ -239,6 +239,7 @@
     // Used by EPG
     void ChangeVolume(bool up);
     void ToggleMute(void);
+    void ToggleUpmixer(void);
 
   public slots:
     void HandleOSDClosed(int osdType);
Index: libs/libmythtv/NuppelVideoPlayer.h
===================================================================
--- libs/libmythtv/NuppelVideoPlayer.h	(Revision 17644)
+++ libs/libmythtv/NuppelVideoPlayer.h	(Arbeitskopie)
@@ -128,6 +128,7 @@
     void SetAudioParams(int bits, int channels, int samplerate, bool passthru);
     void SetEffDsp(int dsprate);
     void SetAudioCodec(void *ac);
+    bool ToggleUpmixer();
 
     // Sets
     void SetParentWidget(QWidget *widget)     { parentWidget = widget; }
Index: libs/libmythtv/tv_play.cpp
===================================================================
--- libs/libmythtv/tv_play.cpp	(Revision 17644)
+++ libs/libmythtv/tv_play.cpp	(Arbeitskopie)
@@ -379,6 +379,7 @@
     REG_KEY("TV Playback", "VOLUMEDOWN", "Volume down", "[,{,F10,Volume Down");
     REG_KEY("TV Playback", "VOLUMEUP",   "Volume up",   "],},F11,Volume Up");
     REG_KEY("TV Playback", "MUTE",       "Mute",        "|,\\,F9,Volume Mute");
+    REG_KEY("TV Playback", "TOGGLEUPMIXER",       "Toggle Upmixer",        "F12,Toggle Upmixer");
     REG_KEY("TV Playback", "TOGGLEPIPMODE", "Toggle Picture-in-Picture mode",
             "V");
     REG_KEY("TV Playback", "TOGGLEPIPWINDOW", "Toggle active PiP window", "B");
@@ -2742,7 +2743,7 @@
             else if (action == "VOLUMEDOWN" || action == "VOLUMEUP" ||
                      action == "STRETCHINC" || action == "STRETCHDEC" ||
                      action == "MUTE"       || action == "TOGGLEASPECT" ||
-                     action == "TOGGLEFILL" )
+                     action == "TOGGLEFILL" || action == "TOGGLEUPMIXER")
             {
                 passThru = 1;
                 handled = false;
@@ -2797,7 +2798,7 @@
             else if (action == "VOLUMEDOWN" || action == "VOLUMEUP" ||
                      action == "STRETCHINC" || action == "STRETCHDEC" ||
                      action == "MUTE" || action == "PAUSE" ||
-                     action == "CLEAROSD")
+                     action == "CLEAROSD" || action == "TOGGLEUPMIXER")
             {
                 passThru = 1;
                 handled = false;
@@ -3364,6 +3365,8 @@
             ChangeVolume(true);
         else if (action == "MUTE")
             ToggleMute();
+        else if (action == "TOGGLEUPMIXER")
+            ToggleUpmixer();
         else if (action == "STRETCHINC")
             ChangeTimeStretch(1);
         else if (action == "STRETCHDEC")
@@ -6143,6 +6146,21 @@
         GetOSD()->SetSettingsText(text, 5);
 }
 
+void TV::ToggleUpmixer(void)
+{
+    bool state=nvp->ToggleUpmixer();
+
+    QString text;
+
+    if(state)
+        text = tr("Upmixer enabled");
+    else
+        text = tr("Upmixer disabled");
+
+    if (GetOSD() && !browsemode)
+        GetOSD()->SetSettingsText(text, 5);
+}
+
 void TV::ToggleSleepTimer(void)
 {
     QString text;
@@ -7317,6 +7335,8 @@
 
     if (HandleTrackAction(action))
         ;
+    else if (action == "TOGGLEUPMIXER")
+        ToggleUpmixer();
     else if (action == "TOGGLEMANUALZOOM")
         SetManualZoom(true);
     else if (action == "TOGGLESTRETCH")
@@ -7558,6 +7578,8 @@
         }
     }
 
+    new OSDGenericTree(treeMenu, tr("Toggle Upmixer"), "TOGGLEUPMIXER");
+
     new OSDGenericTree(treeMenu, tr("Manual Zoom Mode"), "TOGGLEMANUALZOOM");
 
     new OSDGenericTree(treeMenu, tr("Adjust Audio Sync"), "TOGGLEAUDIOSYNC");
Index: libs/libmyth/audiooutputbase.h
===================================================================
--- libs/libmyth/audiooutputbase.h	(Revision 17644)
+++ libs/libmyth/audiooutputbase.h	(Arbeitskopie)
@@ -76,6 +76,7 @@
     /// Audio Buffer Size -- should be divisible by 12,10,8,6,4,2..
     static const uint kAudioRingBufferSize   = 1536000;
 
+    virtual bool ToggleUpmixer(const AudioSettings&);
  protected:
     // You need to implement the following functions
     virtual bool OpenDevice(void) = 0;
@@ -153,6 +154,7 @@
     int source_audio_channels;
     int source_audio_bytes_per_sample;
     bool needs_upmix;
+    bool upmixer_enabled;
     int surround_mode;
 
     bool blocking; // do AddSamples calls block?
Index: libs/libmyth/audiooutputbase.cpp
===================================================================
--- libs/libmyth/audiooutputbase.cpp	(Revision 17644)
+++ libs/libmyth/audiooutputbase.cpp	(Arbeitskopie)
@@ -53,6 +53,7 @@
     source_audio_channels(-1),
     source_audio_bytes_per_sample(0),
     needs_upmix(false),
+    upmixer_enabled(false),
     surround_mode(FreeSurround::SurroundModePassive),
 
     blocking(false),
@@ -223,7 +224,7 @@
     }
 
     if ((configured_audio_channels == 6) &&
-        !(settings.codec || audio_codec))
+        !(settings.codec || audio_codec) && upmixer_enabled)
     {
         settings.channels = configured_audio_channels;
         lneeds_upmix = true;
@@ -245,7 +246,7 @@
         return;
     }
 
-    if (general_deps && !upmix_deps && lneeds_upmix && upmixer)
+    if (general_deps && !upmix_deps && lneeds_upmix && upmixer && upmixer_enabled)
     {
         upmixer->flush();
         source_audio_channels = lsource_audio_channels;
@@ -654,7 +655,7 @@
                               audio_bytes_per_sample) / audio_stretchfactor);
     }
 
-    if (upmixer && needs_upmix)
+    if (upmixer && needs_upmix && upmixer_enabled)
     {
         totalbuffer += upmixer->sampleLatency() * audio_bytes_per_sample;
     }
@@ -700,7 +701,7 @@
         len = (int)ceilf(float(len) * src_data.src_ratio);
 
     // include samples in upmix buffer that may be flushed
-    if (needs_upmix && upmixer)
+    if (needs_upmix && upmixer && upmixer_enabled)
         len += upmixer->numUnprocessedSamples() * abps;
 
     if (pSoundStretch)
@@ -767,7 +768,7 @@
         len = (int)ceilf(float(len) * src_data.src_ratio);
 
     // include samples in upmix buffer that may be flushed
-    if (needs_upmix && upmixer)
+    if (needs_upmix && upmixer && upmixer_enabled)
         len += upmixer->numUnprocessedSamples() * abps;
 
     if (pSoundStretch)
@@ -854,6 +855,13 @@
     return len;
 }
 
+bool AudioOutputBase::ToggleUpmixer(const AudioSettings& settings)
+{
+    upmixer_enabled = !upmixer_enabled;
+    this->Reconfigure(settings);
+    return upmixer_enabled;
+}
+
 void AudioOutputBase::_AddSamples(void *buffer, bool interleaved, int samples,
                                   long long timecode)
 {
@@ -870,13 +878,13 @@
 
     VERBOSE(VB_AUDIO+VB_TIMESTAMP,
             LOC + QString("_AddSamples samples=%1 bytes=%2, used=%3, "
-                          "free=%4, timecode=%5 needsupmix %6")
+                          "free=%4, timecode=%5 needsupmix %6 upmixer enabled %7")
             .arg(samples)
             .arg(samples * abps)
             .arg(kAudioRingBufferSize-afree).arg(afree).arg(timecode)
-            .arg(needs_upmix));
+            .arg(needs_upmix).arg(upmixer_enabled));
 
-    if (upmixer && needs_upmix)
+    if (upmixer && needs_upmix && upmixer_enabled)
     {
         int out_samples = 0;
         int step = (interleaved)?source_audio_channels:1;
Index: libs/libmyth/audiooutput.h
===================================================================
--- libs/libmyth/audiooutput.h	(Revision 17644)
+++ libs/libmyth/audiooutput.h	(Arbeitskopie)
@@ -69,6 +69,8 @@
     virtual void bufferOutputData(bool y) = 0;
     virtual int readOutputData(unsigned char *read_buffer, int max_length) = 0;
 
+    virtual bool ToggleUpmixer(const AudioSettings&) = 0;
+
   protected:
     void Error(const QString &msg);
     void Warn(const QString &msg);
