Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Music playback
  • Assigned To No-one
  • Operating System iPod 5G
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Hector Izquierdo - 2009-02-24
Last edited by Michael Sevakis - 2009-03-07

FS#9949 - r20096 - Song not playing, noise instead

Hi. I’ve just updated to revision r20096. My last revision was prior to r20093. Now, sometimes when the tracks change, the playback won’t start, and strange noises are reproduced instead. The time counter stays at 00:00. Pausing and resuming playback fixes it.

Closed by  Michael Sevakis
2009-03-07 05:22
Reason for closing:  Fixed
Additional comments about closing:  

Changes in patch seem to fix the problem.

Thomas Martitz commented on 2009-02-24 15:25

Can you try to find the exact revision? There was 2 changes between that possibly change playback behavior.

Also, please be more specific about the bug.
a) What files do you use
b) how long is the playlist
c) What do you exactly do when this bug appears?
d) Do you have a recipe to reproduce?

Hector Izquierdo commented on 2009-02-24 15:47

All files are vbr mp3 ~160kbps (everything has been ripped with the same compressor and settings).
The playlist is 1558 files long. When this happens I pause, and then resume and it’s fixed. I’m afraid I can’t give a recipe to reproduce this because it seems random and happened with different files. I’ll try to gather more info the next time it happens (I’ll look in the debug screen. If there is any information specially relevant please tell me).

The last rockbox version I used was compiled by me, so I’ll look what revision It was when I get home.

Thomas Martitz commented on 2009-02-24 15:52

Can you tell me what the “View buffering thread” screen shows when such the bug appears? You might even be able to screen shot it (by activating screen dump, then plug the USB cable in in the “View buffering thread” screen)

Hector Izquierdo commented on 2009-02-24 16:02

The next time it happens I’ll do so.

Thomas Martitz commented on 2009-02-26 15:19

Did it happen once more? If not, I’m inclined to believe that it was a random thing, which could be caused by bad tags in some rare condition.

I’ll give it a week, if you don’t experience this anymore, to close this.

Hector Izquierdo commented on 2009-02-27 08:12

I haven’t used my ipod since the report (I didn’t have time). Today I’ll try to get the noise again and report at the end of the day. The day I filled the bug I got the noise again but screwed up when I tried to capture the buffering screen.

Douglas Valentine commented on 2009-02-28 17:57

I am seeing the same thing with current svn builds with both my e200v1 and my ipod video 80GB.

If you disable fade on pause resume and start pausing the resuming with an mp3 you should see the problem quite quickly. All my mps3 are lame encoded vbr files.

I have not had a chance to grab a screen shot but buffering dose appear to stop from looking at the buffering screen and when playback resumes after pausing and resuming playback again playback jumps back by about a second the same word on my audio book played before pause is repeated.

Thomas Martitz commented on 2009-02-28 18:00

It’s weird. I still fail to experience this, and I use my player (e200) quite frequently, with different codecs and stuff.

“If you disable fade on pause resume and start pausing the resuming with an mp3 you should see the problem quite quickly”
Sorry, I didn’t understand that sentence. The initial report claims it happens on track change.
Douglas Valentine commented on 2009-02-28 18:21

If you go into settings - Playback Settings - Fade on Stop/Pause and select No.

Then select a directory full of vbr encoded mp3 you should be able to reproduce the problem by pressing play a few times to pause and resume playback.
I have also seen the problem on track change and first resume of playback after shut down on power saving but it dose not happen that often for me that way.

The problems first started for me after updating to get this fix http://svn.rockbox.org/viewvc.cgi?view=rev;revision=20081 as I was seeing crashes on the default wps if I tried to playback any albums with album art which needed to be rescaled. So I just used to use a theme without album art to work round this problem before, but I have now gone back to using the default theme again.

As such maybe you also need playing back an album with a cover.bmp file in the directory that needs to be rescaled to trigger the bug.

Thomas Martitz commented on 2009-02-28 18:36

It appears to me that you’re experience another issue.

In fact, I could reproduce your problem. BUT it’s so hard to reproduce for me (in like 500 presses, it happend 3 times). It does never occur in every day use for me.

Douglas Valentine commented on 2009-02-28 18:44

It would seem that the problem happens most often just a few seconds before or after a track transition if I pause and attempt to resume playback at that time.

I have now attached a screen shot of the buffering screen while the problem is occurring.

Thomas Martitz commented on 2009-02-28 18:48

Doesn’t look like a screenshot of the buffering though.

Douglas Valentine commented on 2009-02-28 18:53

OK I sounded like the same issue to me as the playback progress counter also says stopped and I get noise played back instead of the selected track.

During a 40 minute car drive yesterday home from work the problem happened 3 times. I guess its all down to how you use rockbox and how often you pause and resume playback as I use the pause feature allot I guess I just trigger the bug more frequently.

Douglas Valentine commented on 2009-02-28 18:55

doh wrong screen shot I will try again.

Thomas Martitz commented on 2009-02-28 19:04

Looks normal to me. I’m unsure what triggers your bug. Is this only on the directory that data aborted pre-r20081 ?

I might have a clue about the initial bug though.

Douglas Valentine commented on 2009-02-28 19:07

And here’s 2 more screen shots as I just triggered the bug again while pausing playback to speak to someone.

one of the wps screen and a second one of the buffering screen.

Douglas Valentine commented on 2009-02-28 19:14

No most directories with cover.bmp files that need to be scaled down to make them the right size for the wps and the problem happened with both my sansa e200 and my ipod video so it was not a hardware issue.

Again the issue tended to ether trigger on start up or when you changed tracks ether with the end of the track or manually selecting a new track from the file view as I dont use the database much I dont know if that is also effected.

Thomas Martitz commented on 2009-03-03 15:52

From another task( FS#9979 ):

From time to time during playback or when you pause playback and start it again WM8731 is fed with random data what you can hear as “digital noise”. The “noise” stays until >you pause for the second time or rewind.
>
>I think the bug was introduced by r20052 (DMA for playback for PP502x targets) as I noticed it a few times since then. It was also confirmed by my friend, who uses H10 too.
>
>I currently use r20110.

It seems it was introduced earlier, before r20093.

Torne Wuff commented on 2009-03-03 16:04

I’m also having this problem. I’ve been mostly listening to audiobooks lately, most of mine are CBR encoded so I’m not sure that VBR matters (I could be wrong though). I also have no album art at all.

I’ve only noticed this since the last time I built rockbox: my build is derived from r20088. I too am at least somewhat inclined to suspect the DMA playback change :)

Boris Gjenero commented on 2009-03-06 00:22

I think this is the same issue discussed in http://forums.rockbox.org/index.php?topic=20849 . It is related to the DMA playback change in r20052. The problem is in play_stop_pcm(). Too much can be subtracted from dma_play_data.size. Normally this is just a very slight error in the resume point, but it can cause dma_play_data.size to wrap around and become very big. I am attaching a patch which rewrites the PP502x DMA branch of that function. The patch works well for me, both in r20052 and r20211.

I am also attaching a separate patch which tries to trigger this bug. It is only meant to help testing, and is not meant for committing. After you start playback, from the main menu you can go to System → Debug (Keep Out!) → Pause unpause loop. That will keep pausing and unpausing playback, which makes it easier to see the problem. Hold the bottom button (ie. stop) to get out of that. When the bug was present I typically heard noise within a few minutes. After the next pause and resume I would typically have music again.

Thomas Martitz commented on 2009-03-06 03:22

I hope you are not checking if an unsigned data type is ⇐ 0, are you? (I think you are, size_t is unsigned).

Michael Sevakis commented on 2009-03-06 03:54

Thomas:
Hehe, don’t make fun of my silliness. :-p

Boris:
The patch aliases two conditions 1) Transfer finished 2) Transfer never got going. In the first case the pointer won’t be incremented but it should be.
There is no concern about the interrupt in device level since pcm.c takes care of that synchronization itself.

There’s some cruft in  FS#9910  in play_stop_pcm that wasn’t updated properly for segmented transfers. Also, I”m wondering if the bits are not actually set atomically by the engine.

Boris Gjenero commented on 2009-03-06 06:08

Oops, I failed to notice:
/* Tranfer was finished - DMA0_STATUS will have been reloaded
* automatically with size in DMA0_CMD. */
I need to examine and think about this some more.

Michael Sevakis commented on 2009-03-06 06:44

It looks like I went rather daft on this one. Besides the cruft the transfer size limiting check in pcm_play_start was also wrong. The only things that ought to mess it up now is some super secret hardware surprise.

Michael Sevakis commented on 2009-03-06 07:13

Throw in some misc. consistency changes for address and size rounding. Don’t limit overall buffer size (quite pointless really when doing segments).

Boris Gjenero commented on 2009-03-07 02:35

Thanks Mike! Patch seems solid.
Sorry about my earlier bad patch.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing