Kodi Community Forum
No Sound with Pulseaudio anymore - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: No Sound with Pulseaudio anymore (/showthread.php?tid=228988)

Pages: 1 2 3 4 5


RE: No Sound with Pulseaudio anymore - fritsch - 2015-06-07

(2015-06-07, 17:04)Manko10 Wrote: Okay, but how to fix it? I'm running a completely fresh configuration now. Deleted all local and system-wide configs, reinstalled Pulseaudio and set the two config options you suggested. Still no audio in Kodi, but everywhere else.


Use ALSA and enjoy the crackeling. Btw. in your second logfile I see completely different audio devices ... like from a completely different computer!

First one was analog audio 5.1 - now there is a G430 headset and a hdmi out. And the default device returns 0 ms buffer. No fun at all. I don't know what your OS broke by default, but it's very severe.


RE: No Sound with Pulseaudio anymore - Manko10 - 2015-06-07

No change.

kodi.log http://xbmclogs.com/p0hoayyja
pacmd list-sinks http://xbmclogs.com/pynugfwey


RE: No Sound with Pulseaudio anymore - Manko10 - 2015-06-07

Oh, regarding the second log portion. Sorry about that. As I said, I reset everything and forgot to reconfigure the device as 5.1 instead of 2.0. The new logs should be accurate again. HDMI out was always there, just disabled because I don't need it. Headset is freely pluggable.

EDIT:
ALSA also seems to work without crackling, but shouldn't there also be a way to make it work with Pulseaudio? I mean, it worked before, but then it stopped for some reason. Really appreciate your help so far.


RE: No Sound with Pulseaudio anymore - fritsch - 2015-06-07

That looks like something "arch" handoptimized once again. The minreq is so minimal - do you use some "low latency" stuff / flags / whatever build in?

I can only imagine how audio sounds on your system, when you open a browser or switch tasks ... Ask in #archlinux why there is such an insane low fragment_size


RE: No Sound with Pulseaudio anymore - Manko10 - 2015-06-07

Audio sounds totally fine. I'm not an audiophile person, but both my 5.1 sound system as well as my headset produce great and enjoyable sound. Now even in Kodi with ALSA, but just not with Pulseaudio. Wine is the only application that (sometimes) has issue with crackling.
I'll ask on the Chakra IRC why they built Pulseaudio like that. I'll come back to you when I have an answer.


RE: No Sound with Pulseaudio anymore - fritsch - 2015-06-07

For completeness, post all the files you edited to get PA working on your system, including default.pa and daemon.conf
Also for completeness: dmesg | pastebinit

and if you can do that a pulseaudio -vvv log, e.g. start PA manually and see what it spits out. Play some files, open kodi and so on, then post this file. That way I can probably help them ...


RE: No Sound with Pulseaudio anymore - fritsch - 2015-06-07

Code:
From f837beed8f16fe308205b1582dd4b754ab50eeef Mon Sep 17 00:00:00 2001
From: fritsch <[email protected]>
Date: Sun, 7 Jun 2015 18:24:25 +0200
Subject: [PATCH] AESinkPULSE: Try a fallback when insane buffer value was
returned

---
xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp
index dcef42c..fd8f56a 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp
@@ -643,6 +643,13 @@ bool CAESinkPULSE::Initialize(AEAudioFormat &format, std::string &device)
     m_BufferSize = a->tlength;

     format.m_frames = packetSize / frameSize;
+    if (format.m_frames < 256)
+    {
+      // This is some misconfiguration on user side - let PA cope with it
+      // let's try with a periodSize of 50 ms
+      format.m_frames = m_BytesPerSecond / 20 / frameSize;
+      CLog::Log(LOGERROR, "Pulseaudio: buffer attribute got insane value - will use computed values: %d", format.m_frames);
+    }
   }

   {
--
2.1.4

^^ if that insanity cannot be fixed, perhaps we can workaround it. Don't forget to post logfiles when you have compiled your kodi with that patch on top.


RE: No Sound with Pulseaudio anymore - Manko10 - 2015-06-07

Okay, I'll try. Thanks. :-)
I haven't changed any files btw. Running a complete standard installation. Made that sure by erasing all files in .config/pulse, .pulse-cookie and /etc/pulse and reinstalling Pulseaudio.


RE: No Sound with Pulseaudio anymore - fritsch - 2015-06-07

Not sure, if that helps you. But you are the very first with "a standard distro" that has issues with standard hw and PA. The above patch is insane workaround I don't want to push at all.


RE: No Sound with Pulseaudio anymore - fritsch - 2015-06-07

Btw. you did not post the logs I wanted to have default.pa, daemon.conf, dmesg | pastebinit and so on and the pulseaudio -vvv would be very interesting.

That needs fixing in your distribution and without those logs I cannot do anything. Workarounding bullshit in a distro stack within a userspace application is the last resort I don't want to consider.


RE: No Sound with Pulseaudio anymore - Manko10 - 2015-06-08

Alright.
daemon.conf: http://xbmclogs.com/pnmycjzni
default.pa: http://xbmclogs.com/pf9jqezhd
dmesg: http://xbmclogs.com/plcrihona

I'll post the rest tomorrow if that's okay. It's very late here.

Quote:That needs fixing in your distribution and without those logs I cannot do anything. Workarounding bullshit in a distro stack within a userspace application is the last resort I don't want to consider.
I understand. Linux distro chaos is sometimes sickening.


RE: No Sound with Pulseaudio anymore - fritsch - 2015-06-08

Okay, thx. This for now looks very standard without anything standing out. If you have any custom alsa configuration, e.g. .asoundrc or /etc/asound.conf please also pastebin them.

Furthermore I am interested in a log with AE_SINK=ALSA kodi (debugging turned on) and you playing some file.

Rest as already requested: pulseaudio -vvv log. Thanks.


RE: No Sound with Pulseaudio anymore - fritsch - 2015-06-08

Besides that I talked with your pulseaudio maintainer, named heftig, today. He does not patch anything at all. Therefore all are curious on your verbose pulseaudio log.


RE: No Sound with Pulseaudio anymore - Manko10 - 2015-06-08

Okay, thanks. I talked to the Chakra guys, they're not patching anything either on Pulseaudio compared to the Arch PKGBUILD.

Here's the missing debug log you requested:
pulseaudio -vvv: http://xbmclogs.com/phdujhmqy
AE_SINK=ALSA kodi: http://xbmclogs.com/pztahky0u

I don't have an .asroundrc, but my /etc/asound.conf looks like this:

Code:
# Use PulseAudio by default
pcm.!default {
  type pulse
  fallback "sysdefault"
  hint {
    show on
    description "Default ALSA Output (currently PulseAudio Sound Server)"
  }
}

ctl.!default {
  type pulse
  fallback "sysdefault"
}

I'll try checking out Kodi from Git now for applying your patch above.


RE: No Sound with Pulseaudio anymore - Manko10 - 2015-06-08

I tried compiling the current Helix branch now with the patch applied. Somehow it always fails with errors about multiple definitions in xbmc/screensavers/rsxs-0.9/lib/argp.h (_option_is_end, _option_is_short and argp_usage).
But fortunately, it only fails after linking kodi.bin, so I just tried make install anyway which seemed to succeed.

Even more fortunate is the fact, that sound seems to be working with this patch.
The log file says:
Quote:Pulseaudio: buffer attribute got insane value - will use computed values: 2205

Full version here: http://xbmclogs.com/pl1zbp6uf