dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: How to debug gapless issues?

How to debug gapless issues?

From: Jonas Wielicki <>
Date: Sun, 06 May 2012 18:21:12 +0200

Hi folks,

I am still struggling with a gapless (or not) playback issue I'm having
since I got the SSD in my player.

As this is nonstandard hardware, I guess its best when I track the bug
by myself, but I need some advice where to look for potential issues.

My first thought was that it might be due to the SSD being slow when
writing changes to the playlist control file. So I tried to disable all
writing by putting a return 0 right at the start of flush_cached_control
in playlist.c, but that did not fix the issue.

It should be no problem in buffering, as the buffers are pretty full in
the buffering thread debug screen. The songs are all ogg/vorbis, so it
should not be an codec issue; also, everything was fine before the SSD

When turning on Crossfade, after an reboot, crossfading works, but it
feels as if there is a lag between the start of crossfade and the press
of the next button on manual skip. Crossfading works then though. On
end-of-track skipping, there is still a lag and no crossfading (although
I set it to be on Always).

I based my work on the v3.11 branch, however, I could not find any
relevant bugs in the bugtracker for this version which would explain
that behaviour.

So basically I'm looking for pointers on where to look for potential
gap-causers or in general means to debug this problem. Any suggestions?

In the meantime, I also implemented support for the CHECK POWER MODE ata
command which may have fixed another issue but did not help on this one.
Do we have any support for hinting the ATA thread that a read/write is
going to occur in the next few seconds or milliseconds so that it can
spin up the drive in advance? Although I thought that rockbox should not
have an issue with the playlist app blocking on a file write when it
comes to playback (threading for the win!).

To summarize the questions:
(1) What are common gap introducers I might've regressed into?
(2) If its not that, where could gaps be introduced if the hard drive
causes lag?
(3) Are there means to properly debug the device?

best regards

ps.: for those who did not follow my previous thread, I am using an
iriver h320 with an SSD.
Received on 2012-05-06

Page was last modified "Mon Nov 16 10:57:21 2020" The Rockbox Crew -- Privacy Policy