This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#12310 - Crash when inserting USB while playback (since r30097)
Attached to Project:
Rockbox
Opened by Andree Buschmann (Buschel) - Monday, 03 October 2011, 13:09 GMT+2
Last edited by Michael Sparmann (TheSeven) - Sunday, 06 November 2011, 01:57 GMT+2
Opened by Andree Buschmann (Buschel) - Monday, 03 October 2011, 13:09 GMT+2
Last edited by Michael Sparmann (TheSeven) - Sunday, 06 November 2011, 01:57 GMT+2
|
DetailsWhen connecting USB while playback the device is either crashing or locking up. This is not happening when connecting USB after a clean boot.
|
This task depends upon
Closed by Michael Sparmann (TheSeven)
Sunday, 06 November 2011, 01:57 GMT+2
Reason for closing: Fixed
Additional comments about closing: Fixed in r30906
Sunday, 06 November 2011, 01:57 GMT+2
Reason for closing: Fixed
Additional comments about closing: Fixed in r30906
Edit: This does not happen with my iPod Video.
edit - (Now in SVN)
Some more detail: USB connects and works fine when plugged while playback is not active (e.g. while in paused state or directly after startup).
But, in any case I still don't like buflib. ;-)
(Really, it's making me not want to work on anything at all.)
1) Boot
2) Activate keyclick
3) Navigate in the menu (keyclicks were audible)
4) Connect USB
Result: works :/
Mike, I am helpless here. Fact is that r30096 connects USB fine when inserted during playback, r30097 locks ups.
Edit: Delete confused comment about wrong device.
This means the mixer is in charge, right?
The internal double buffering / buffer splitting is neccessary because a) the pcmbuf is too slow to pass new data in time if the DMA controller runs dry and b) the pcmbuf starts overwriting the data that's being played currently if we request a block in advance. If we had a way to keep pcmbuf blocks locked after requesting the next one, I'd happily get rid of this. Same is true for audio sources like mpegplayer btw.
IRAM on nano2g/classic has dcache enabled (it's NOT that fast!), so the clean_dcache call is neccessary, and IIRC the ARM940T core on that target doesn't support range operations.
Who knows, there could be FIFO watermark setting somewhere. It's not uncommon.
True that it seems unlikely to be the problem with this particular bug.
When we get a PCM chunk, we send the large part to the DMAC immediately, copy the small part to the double buffer, and enqueue another DMA transfer for the small part. Once the DMAC has eaten the large part, we get an interrupt, request the next PCM chunk, and while the small chunk is still playing, enqueue the next large part, but don't do anything with the small part yet. Once the DMAC has eaten the previous small part, we copy the new small part around and enqueue it, and so on.
I think that's pretty much dropout-proof, as long as the pcmbuf doesn't get awfully slow.
Other than playing silence for 3 seconds after the last channel activity, all playback happenings should be identical to prior to said revision.
Is there possibly an alignment issue with the buffers in USB and the mixer? I think a cache cleaning conflict was ruled out.
So, still no idea huh?