Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#6174 - Plugins that use IRAM lock up when loaded while playing

Attached to Project: Rockbox
Opened by Jared Stafford (jspenguin) - Friday, 13 October 2006, 06:21 GMT+2
Task Type Bugs
Category Plugins
Status Closed
Assigned To No-one
Player Type Iriver H100 series
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

Since plugins use the same IRAM space as codecs, whenever a plugin (such as mp3_encoder) copies it's data to IRAM, it overwrites the codec data. To fix this, there needs to be a plugin api function that unloads the codec and copies data to IRAM. This function would look like:

int plugin_copy_iram(void* iramstart, void* iramend, void* iramcopy, void* iedata, void* iend);
This task depends upon

Closed by  Steve Bavin (pondlife)
Friday, 13 October 2006, 15:08 GMT+2
Reason for closing:  Accepted
Comment by Jared Stafford (jspenguin) - Friday, 13 October 2006, 06:42 GMT+2
Ok, I found the problem. Calling rb->audio_stop() worked on an older version, but not on current CVS.

Calling rb->audio_stop(); by itself rb->sleep(1); seems to make it work on the current version, but it's just a hack.

The problem is that audio_stop() (in playback.c) yields until playing is false, but audio_stop_playback() (which is called from the audio thread) sets playing to false before it calls audio_stop_codec_flush(), which yields again, causing audio_stop to return before the codec is finalized and unloaded.

The solution is to set playing to false after the call to audio_stop_codec_flush().
(application/octet-stream)    playback.patch (0.6 KiB)
 apps/playback.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment by Steve Bavin (pondlife) - Friday, 13 October 2006, 14:19 GMT+2
Thanks - I'll commit this shortly.

Loading...