Kodi Community Forum

Full Version: activate Pulseaudio -remixing with Kodi 17
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

for the sound i use an active 2.0 loudspeaker system plus active subwoofer (thus 2.1) at my HTPC with Linux (Lubuntu) and Kodi.
So that the subwoofer is also playerd with music in stereo sound, i use the Pulseaudio function lfe-remixing with adjustable crossover frequency.
Until Kodi 17 this setup worked well, but now the subwoofer remains mute .... the reason I found now in the Wiki (lfe-remixing only works with remixing!):
Quote:Starting with the upcoming kodi v17 Krypton the above behaviour is taken care within kodi. You don't have to disable remixing in pulseaudio anymore. That means content is output without further remixing by pulseaudio server if a sane mapping is possible

How can I disable this "feature" and enable the Pulseaudio remixing for Kodi again?
Or is it possible to set a crosover-frq for the stereo upmix audio-featur in Kodi?

greetings,

H.
This "feature" cannot be disabled by any setting. Adjusting of AESinkPULSE is a one liner and easy to do.

In the future this feature will be available with ADSP. Btw. if you ask "why" this was implemented in kodi, I think here is a lengthy thread of people that forced me to implement that here in this linux forum.

Code:
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp
index 31d0039..db1ca7a 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp
@@ -565,7 +565,7 @@ bool CAESinkPULSE::Initialize(AEAudioFormat &format, std::string &device)
     return false;
   }

-  bool use_pa_mixing = false;
+  bool use_pa_mixing = true;

   if(m_passthrough)
   {
sounds like a case for an advancedsetting
* wsnipex ducks from the turds flying his way
(2017-03-26, 21:22)wsnipex Wrote: [ -> ]sounds like a case for an advancedsetting
* wsnipex ducks from the turds flying his way

What about an ENV setting? Making PA mixing again the default?

E.g.
Code:
PA_DISABLE_REMIXING=1
Code:
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp
index 31d0039..b1c4637 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp
@@ -25,6 +25,7 @@
#include "utils/TimeUtils.h"
#include "guilib/LocalizeStrings.h"
#include "Application.h"
+#include <cstdlib>

static const char *ContextStateToString(pa_context_state s)
{
@@ -565,7 +566,14 @@ bool CAESinkPULSE::Initialize(AEAudioFormat &format, std::string &device)
     return false;
   }

-  bool use_pa_mixing = false;
+  bool use_pa_mixing = true;
+  char* env_remix = getenv ("PA_DISABLE_REMIXING");
+  if (env_remix)
+  {
+    std::string env_val(env_remix);
+    if (env_val == "1" || env_val == "TRUE" || env_val == "true")
+      use_pa_mixing = false;
+  }

   if(m_passthrough)
   {
We have no central place to set such ENV vars, which makes it hard to suggest a default way on how to use them.
advancedsettings.xml is more problematic as that one is evaluated too late and the sink does not pick it up on start.

Whatever you prefer I can do.