Forum
Pulseaudio dropouts in Kodi only - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Testing & Experimental (/forum-21.html)
+--- Thread: Pulseaudio dropouts in Kodi only (/thread-3618.html)

Pages: 1 2


Pulseaudio dropouts in Kodi only - Killerbee - 20th Jun, 2016 01:36 AM

I am almost there..... my perfect xbian-setup.

I am running xbian on a raspberry-pi 3 in combination with a HifiBerry AMP+.
In the background a squeezelite daemon is running as well. I configured kodi and squeezelite in such way that both can use the hifiberry amp. Great sound for my movies and music!.

My next step is to make it possible to stream music (bluetooth) from my phone to raspberry pi.
I installed pulsaudio.
I am able to stream and play my favorite music!

BUT As soon as I install pulsaudio the sound in Kodi is bad! Dropouts when I play a mp3 or watch a movie.

Audio quality from Squeezelite and bluetooth streaming are both OK. Only audio quality in Kodi is bad.

Does somebody have some suggestions? I have tried various audio settings in the expert menu but no luck.

Thanks


RE: Pulseaudio dropouts in Kodi only - Nachteule - 20th Jun, 2016 03:06 AM

Do you have dropouts if you do not load bluetooth stuff?

I have same HifiBerry AMP+ card and have absolutely no sound dropouts if i'm using pulseaudio sound server (difference is using RPi2 and Kodi Krypton alpha2 but don't believe that Krypton makes difference here)


RE: Pulseaudio dropouts in Kodi only - Killerbee - 20th Jun, 2016 04:05 AM

Hello Nachteule

When I add dtoverlay=pi3-disable-bt to my config.txt still I have dropouts.
I have added resample-method = trivial to my pulse/daemon.conf file but no luck

Do you have some more suggestions?


RE: Pulseaudio dropouts in Kodi only - Nachteule - 20th Jun, 2016 11:58 PM

(20th Jun, 2016 04:05 AM)Killerbee Wrote:  Hello Nachteule

When I add dtoverlay=pi3-disable-bt to my config.txt still I have dropouts.
I have added resample-method = trivial to my pulse/daemon.conf file but no luck

Do you have some more suggestions?

Unfortunately no Sad

To make sure that it not RPi2 I plugged Hifiberry card to my RPi3 and made same test again. No difference, sound is absolutely top using PA, no stuttering or anything else (with and without onboard BT enabled)

Did you already made a test with Squeezelite stopped?


RE: Pulseaudio dropouts in Kodi only - Killerbee - 21st Jun, 2016 03:15 AM

Thanks for testing. Unfortunately with squeezelite stopped the result is the same.
It's driving me nuts

May I ask you to post your asound.conf file?
I am using this

Terminal
pcm.!default {
type hw card 0
}
ctl.!default {
type hw card 0
}



RE: Pulseaudio dropouts in Kodi only - IriDium - 21st Jun, 2016 04:06 AM

I would personally remove comment out any of the changes you have made to the sound output. A lot of "internet" ideas/fixes are out of date and no longer valid, so could cause more problems than they are worth.

Test without and modifications, and add them back one at a time.

Most, setups should work out of the box.

Alos, have you got dtparam=audio=on set in config.txt? If so try commenting it out, as this worked for BT transmitter.


RE: Pulseaudio dropouts in Kodi only - Killerbee - 21st Jun, 2016 04:20 AM

#dtparam=audio=on was already the case
I will download a fresh image and install pulseaudio using this how to
http://forum.xbian.org/thread-3578.html?highlight=bluetooth
First thing I will do is play a mp3 file using Kodi
Thanks for the suggestions so far..


RE: Pulseaudio dropouts in Kodi only - Killerbee - 22nd Jun, 2016 04:01 AM

Okay this is what I did.

Start with a fresh image XBian_2016.06.17_rpi3
Installed the next:
Terminal
sudo apt-get install pulseaudio-module-bluetooth bluez-tools alsa-utils (including the dependencies)

Run these commands
Terminal
sudo gpasswd -a xbian pulse
sudo gpasswd -a xbian lp
sudo gpasswd -a pulse lp
sudo gpasswd -a xbian audio
sudo gpasswd -a pulse audio
sudo sh -c "echo 'extra-arguments = --exit-idle-time=-1 --log-target=syslog' >> /etc/pulse/client.conf"
sudo hciconfig hci0 up
sudo hciconfig hci0 class 0x200420

Modified the /boot/config.txt file:
uncomment these two line
Terminal
dtoverlay=lirc-rpi,gpio_out_pin=17,gpio_in_pin=22,debug
dtoverlay=hifiberry-amp
comment this line
Terminal
#dtoverlay=pi3-disable-bt

Reboot

In kodi set audio output to ALSA: Pulseaudio sound server

login with terminal and run alsamixer to reduce volume

Play a mp3 file using Kodi (several) => Audio is still horrible. Dropouts/skips

Terminal
sudo apt-get remove pulseaudio
Reboot

In kodi set audio output to ALSA: Default (snd_pi_hifiberry_amp Analog)
Play a mp3 file using Kodi (several) => Audio is OK

Could somebody try to reproduce this?


RE: Pulseaudio dropouts in Kodi only - IriDium - 22nd Jun, 2016 04:35 AM

I wonder if you are possibly a little confused.

The ALSA: Pulseaudio sound server is for transmitting the audio output to a bluetooth audio device (e.g. headphones) - yes the quality can be a bit bad. See Thread

You want to receive bluetooth audio.

So to use the hifiberry-amp, just select (snd_pi_hifiberry_amp)

(Somewhere is a thread I wrote about receiving BT audio, but I'll be damned if I can find it)


RE: Pulseaudio dropouts in Kodi only - Nachteule - 22nd Jun, 2016 05:47 AM

(22nd Jun, 2016 04:35 AM)IriDium Wrote:  I wonder if you are possibly a little confused.

I think you are Tongue

Quote:The ALSA: Pulseaudio sound server is for transmitting the audio output to a bluetooth audio device (e.g. headphones) - yes the quality can be a bit bad. See Thread

Not only for this. Kodi uses PA as sound device, PA sends audio to first ALSA device (this is onboard sound if enabled or Hifiberry AMP+)

Quote:So to use the hifiberry-amp, just select (snd_pi_hifiberry_amp)

If you have PA running, you can not select ALSA device in Kodi


So the question is, why does it work for me and not for @Killerbee

it rhymes Big Grin lol


RE: Pulseaudio dropouts in Kodi only - Killerbee - 22nd Jun, 2016 06:14 AM

Thank you both for your feedback
As far as I know we are not able to receive bluetooth audio without pulseaudio.
By the way the quality of bluetooth audio (when using pulseaudio ) is OK!
Only play audio in Kodi, using pulseaudio, is bad.......


RE: Pulseaudio dropouts in Kodi only - Nachteule - 22nd Jun, 2016 07:45 AM

(22nd Jun, 2016 06:14 AM)Killerbee Wrote:  Thank you both for your feedback
As far as I know we are not able to receive bluetooth audio without pulseaudio.

That is correct. We have xbian-package-a2dp, but this can be used with Bluez4 only and Jessie has Bluez5

A patch for Bluez5 exists, but did not had time to build package for Jessie (and of course for testing)[/quote]


RE: Pulseaudio dropouts in Kodi only - Killerbee - 24th Jun, 2016 03:06 AM

Hello Nachteule
May I ask you a favor?
If you have a spare SD card could you please do the same as I did post #8?
I wonder if you have good sound in Kodi.
Thanks for your help
KB


RE: Pulseaudio dropouts in Kodi only - Nachteule - 24th Jun, 2016 07:20 AM

@Killerbee

Sure, will try it this weekend


RE: Pulseaudio dropouts in Kodi only - Killerbee - 26th Jun, 2016 07:08 AM

(20th Jun, 2016 03:06 AM)Nachteule Wrote:  (difference is using RPi2 and Kodi Krypton alpha2 but don't believe that Krypton makes difference here)

Guess what......

I have updated to Krypton alpha 2 and no dropouts when using pulseaudio!
I love the new default theme by the way...