Rockbox

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

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11758 - lock the audio buffer with a mutex and minimise its direct use

Attached to Project: Rockbox
Opened by Jonathan Gordon (jdgordon) - Sunday, 14 November 2010, 01:44 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Sunday, 18 September 2011, 09:39 GMT+2
Task Type Patches
Category Operating System/Drivers
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Release 3.6
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

things shouldnt use audiobuf directly, so this patch works to get rid of that.

buffer_claim() is used to lock the buffer and _unclaim() is to release it. I put a panic in buffer_alloc() when it is unclaimed but that caused problems because untill audio starts nothing really claims the buffer, so we need to work out how to make his actually work.

Right now only playback.c mp3data.c and talk.c still use audiobuf directly (which needs to be changed)

not really sure how far to take this.
   buffer_claim.0.diff (8.8 KiB)
 b/apps/menus/main_menu.c      |    4 ++--
 b/apps/mp3data.c              |    2 ++
 b/apps/playback.c             |    2 ++
 b/apps/tagcache.c             |    8 +++-----
 b/apps/talk.c                 |   15 +++++++++------
 b/firmware/buffer.c           |   29 +++++++++++++++++++++++++++++
 b/firmware/common/dircache.c  |   16 ++++++++++------
 b/firmware/export/buffer.h    |    7 ++++++-
 b/firmware/include/dircache.h |    2 +-
 9 files changed, 64 insertions(+), 21 deletions(-)

This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Sunday, 18 September 2011, 09:39 GMT+2
Reason for closing:  Out of Date

Loading...