Linux Audio stuttering problem
#1
Hi, my name is Saša, and this is my first post, so if I violate some forum rules I apologize in advance.

I've searched for the problem for about 6 hours, and tried various suggestions, but none have worked, so I decided to ask here.

My problem:
When I play any file (locally 720P, 1080P, youtube, etc.) I get audio stutter with short video pause aswell. It lasts for a few audio samples (for example, the audio repeats a single letter from some word, and the video pauses for that brief moment), and that appears at random moment, random times per video, usually separated by a few seconds (more than 2, less than 30).
I managed to find a way of reproducing this, when I start (or restart) whole computer, the problem is not there, but when I put computer to suspend (standby, sleep), and after wake-up, the problem shows itself, and if I restart the computer, the problem's gone.

What have I tried:
1. altering advancedsettings.xml, changing network settings
Code:
<network>
    <buffermode>1</buffermode>
    <cachemembuffersize>123289600</cachemembuffersize>
    <readbufferfactor>5.0</readbufferfactor>
  </network>
I thought that I've solved it, but then I went to standby

2. changed audio settings from SPDIF to Analog and using passthrough, but with no luck

What I have discovered from debug log:
That I don't have pulseaudio, so xbmc uses ALSA, then it initializes the sink, after fresh start (or restart) things are ok, but after sleep I get these particular errors:
1.
Code:
ERROR: CAESinkALSA - snd_pcm_writei(-32) Broken pipe - trying to recover
2.
Code:
DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:106148514.558585, should be:106048000.000000, error:-100514.558585

Both appear when that stutter appears while playing.

The first error (broken pipe) was appearing when the computer was in idle, but that dissapeared when I've changed audio device from SPDIF to Analog.

My AMP (Sony) is connected via optical link (SPDIF). TV (Sony) via HDMI.
I've enabled passthrough for AC3 and DTS, and set sample rate to 48000 limited.

Computer is:
Lenovo Q190 with Intel Pentium 2127U @ 1.9GHz, 4GB RAM. HDMI, SPDIF
running: XBMCbuntu
Code:
Linux XBMC-Q190 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

with Gotham 13.1


Thanks to everyone in advance.
Reply
#2
Looks like ALSA has a problem after wake-up. Not much we can do at the application level if the drivers don't work properly.
Reply
#3
debug log (wiki)
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#4
(2014-07-11, 08:03)nickr Wrote: debug log (wiki)

OP has attached a debug log.
Reply
#5
There were some hda bugs in kernel 3.13 which were fixed in later kernel revision (currently cannot find the bugtracker link), try:
Code:
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.15.3-utopic/linux-headers-3.15.3-031503-generic_3.15.3-031503.201407010040_amd64.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.15.3-utopic/linux-headers-3.15.3-031503_3.15.3-031503.201407010040_all.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.15.3-utopic/linux-image-3.15.3-031503-generic_3.15.3-031503.201407010040_amd64.deb

sudo dpkg -i *3.15.3*deb
sudo reboot
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#6
(2014-07-11, 08:46)fritsch Wrote: There were some hda bugs in kernel 3.13 which were fixed in later kernel revision (currently cannot find the bugtracker link), try:
Code:
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.15.3-utopic/linux-headers-3.15.3-031503-generic_3.15.3-031503.201407010040_amd64.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.15.3-utopic/linux-headers-3.15.3-031503_3.15.3-031503.201407010040_all.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.15.3-utopic/linux-image-3.15.3-031503-generic_3.15.3-031503.201407010040_amd64.deb

sudo dpkg -i *3.15.3*deb
sudo reboot

I've updated the kernel, and after 3 cycles of standby -> watch I can say that there was no stuttering, so the problem is solved, for now.
Also in the debug log there is no "broken pipe" error, just discontinuity errors, but those didn't affect viewing experience.

Thank you all,
best regards from Croatia.
Reply

Logout Mark Read Team Forum Stats Members Help
Audio stuttering problem0