I want my reliable laptop based Amarok jukebox back

Martin Steigerwald Martin at lichtvoll.de
Sun Aug 11 12:49:36 UTC 2013


Am Samstag, 10. August 2013, 14:55:51 schrieb Myriam Schweingruber:
> On Sat, Aug 10, 2013 at 2:37 PM, Martin Steigerwald <Martin at lichtvoll.de> 
wrote:
> > Am Samstag, 10. August 2013, 14:29:59 schrieb Myriam Schweingruber:
> >> Hi Martin,
> >> 
> >> On Thu, Aug 8, 2013 at 3:08 PM, Martin Steigerwald <Martin at lichtvoll.de>
> 
> ...
> 
> > I still wonder how I can say in which layer a given problem is and how I
> > can debug stuff effectively. Do you know any HOWTO for this?
> 
> That's quite easy, Amarok does little to the sound itself, it lets
> Phonon do all the work, so if you have sound issues, then most likely
> it is somewhere in either Phonon or the underlying Alsa (once the
> hardware is ruled out).
> 
> The only thing I know of that can interfere with sound quality where
> Amarok is doing something is the ReplayGain function. Everything else
> should be handled by PA - Phonon - Alsa. Crashes can be caused by
> those as well, and there is a known crash due to a QtWebKit -
> gstreamer interaction that was fixed in 2.7.1 already (actually a
> workaround in Amarok to cope with the QtWebKit issue).
> 
> Mind you, I am not a developer, but I would debug sound problems in
> Amarok in the following way:

Thank you a lot for the debugging hints.

> I strongly suggest you use distribution default settings when it comes
> to Phonon and Pulseaudio, so if a basic installation gives you PA,
> don't remove it afterwards, as it was obviously meant to be used with
> it. Since Kubuntu uses basically what Sid provides, with rather small
> changes to KDE, I think you should first rule out that you didn't
> inadvertently disable PA when ti was meant to be used.

Okay. I hear you:

I removed the USB sound card after having this interference noise during bath 
once again.

Now I also installed pulseaudio 4.0-6 and removed all phonon related I could 
find (.config/kde.org/libphonon.conf, .kde/share/config/phonondevicesrc and some 
service files for vlc and gstreamer plugins in ./kde/share/config)

I also installed rtkit.


And I got audio glitches again. Dropouts.

During 100% disk activity with Nepomuk.

I didn´t have these without Pulseaudio.


rtkit worked:

Aug 11 14:24:33 localhost rtkit-daemon[1919]: Successfully made thread 3265 of 
process 3265 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level 
-11.
Aug 11 14:24:33 localhost rtkit-daemon[1919]: Supervising 1 threads of 1 
processes of 1 users.
Aug 11 14:24:33 localhost rtkit-daemon[1919]: Successfully made thread 3266 of 
process 3265 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.
Aug 11 14:24:33 localhost rtkit-daemon[1919]: Supervising 2 threads of 1 
processes of 1 users.
Aug 11 14:24:33 localhost rtkit-daemon[1919]: Successfully made thread 3267 of 
process 3265 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.
Aug 11 14:24:33 localhost rtkit-daemon[1919]: Supervising 3 threads of 1 
processes of 1 users.


Well, now after high disk activity has ended its almost okay.

I will keep an eye on it.

If dropouts only happen on high Virtuoso / Nepomuk activity I just disable 
desktop search again. Still with just ALSA I did not have these dropouts, but 
then it was not a fresh login. I may compare behavior after fresh login some 
time.

Occassionally still a dropout happens even after initial disk activity has 
droppen. Thats not acceptable for me.


This machine may be old, but it should be capable of playing back some audio. 
A Pentium M 1.8 GHz CPU and a 320 GB Western Digital 2,5 inch harddrive should 
be able to get the job done. Heck, a Rockbox Sansa e260 can do it…


Well maybe the CFQ I/O scheduler was not up to the task of delivering audio 
data quickly enough, even with low latency mode. But then there is readahead 
and the possibility to load a bit more than what is needed for the next few 
seconds of playback.


Anyway, I do think the hardware is capable, and for each and any dropout it is 
the software that is not working properly, be it Linux Kernel, ALSA, 
Pulseaudio – I still suspect Pulseaudio, even at 4.0 – or Amarok.


Well, lets see. As far as I see I am on standard setup now. Lets see how it 
behaves after hibernation and resume. At least I hope the occassional audio 
noise interference this has gone. It has to stop. I am not going to put up 
with it any longer.


If dropouts continue, its apt-get purge pulseaudio again, unless someone has 
any suggestion on how to diagnose audio dropouts and buffer underruns. Testing 
like

$ gst-launch filesrc location=/usr/share/sounds/KDE-Sys-Log-In.ogg ! decodebin2 
! audioresample ! audioconvert ! pulsesink

$ gst-launch filesrc location=/usr/share/sounds/KDE-Sys-Log-In.ogg ! decodebin2 
! audioresample ! audioconvert ! alsasink

but with a longer song may help.


I may also just try with Phonon VLC again.


Anyway, for this sunday I am through with it again.

> To answer one question you had previously: I have very good sound
> quality here from a rather generic built-in sound card, but I do send
> the output to external speakers, and the speaker quality is important
> here.

I have the impression that the sound quality is lower. High frequencies appear 
to be capped. With USB sound card I had crystal clear sound, with internal 
Intel audio it appears somewhat dull, muffled.

I knew why I had the USB soundcard in.


Do you have Intel HD audio? I bet you have. Here it is just:

shambhala:~> lspci -nn | grep -i audio
00:1f.5 Multimedia audio controller [0401]: Intel Corporation 82801DB/DBL/DBM 
(ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller [8086:24c5] (rev 01)


Maybe I just accept that Amarok + Phonon + Pulseaudio do not work drop out 
free on hardware that IMHO is up to the task by margins and use a newer Intel 
HD audio capable ThinkPad to get dropout free audio. But I won´t go as far as 
throwing a Sandybridge based ThinkPad T520 or better at it. Its ridiculous as 
it is already IMHO.

Ciao,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7



More information about the Amarok mailing list