Do some adjustments to alleviate IRAM congestion on some targets from r30097. Include removing pointless IRAM declarations in pcmbuf.c because that callback code runs at a fairly relaxed pace. M5 is still the biggest problem.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30100 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
40ff07140d
commit
5ff641fb81
4 changed files with 29 additions and 24 deletions
|
@ -94,7 +94,7 @@ static FORCE_INLINE void beep_generate(int count)
|
||||||
|
|
||||||
/* Callback to generate the beep frames - also don't want inlining of
|
/* Callback to generate the beep frames - also don't want inlining of
|
||||||
call below in beep_play */
|
call below in beep_play */
|
||||||
static void __attribute__((noinline)) ICODE_ATTR
|
static void __attribute__((noinline))
|
||||||
beep_get_more(unsigned char **start, size_t *size)
|
beep_get_more(unsigned char **start, size_t *size)
|
||||||
{
|
{
|
||||||
int count = beep_count;
|
int count = beep_count;
|
||||||
|
|
|
@ -76,18 +76,18 @@ struct chunkdesc
|
||||||
((bufsize) / PCMBUF_MINAVG_CHUNK)
|
((bufsize) / PCMBUF_MINAVG_CHUNK)
|
||||||
|
|
||||||
/* Size of the PCM buffer. */
|
/* Size of the PCM buffer. */
|
||||||
static size_t pcmbuf_size IDATA_ATTR = 0;
|
static size_t pcmbuf_size = 0;
|
||||||
static char *pcmbuf_bufend IDATA_ATTR;
|
static char *pcmbuf_bufend;
|
||||||
static char *pcmbuffer IDATA_ATTR;
|
static char *pcmbuffer;
|
||||||
/* Current PCM buffer write index. */
|
/* Current PCM buffer write index. */
|
||||||
static size_t pcmbuffer_pos IDATA_ATTR;
|
static size_t pcmbuffer_pos;
|
||||||
/* Amount pcmbuffer_pos will be increased.*/
|
/* Amount pcmbuffer_pos will be increased.*/
|
||||||
static size_t pcmbuffer_fillpos IDATA_ATTR;
|
static size_t pcmbuffer_fillpos;
|
||||||
|
|
||||||
static struct chunkdesc *first_desc;
|
static struct chunkdesc *first_desc;
|
||||||
|
|
||||||
/* Gapless playback */
|
/* Gapless playback */
|
||||||
static bool track_transition IDATA_ATTR;
|
static bool track_transition;
|
||||||
|
|
||||||
/* Fade effect */
|
/* Fade effect */
|
||||||
static unsigned int fade_vol = MIX_AMP_UNITY;
|
static unsigned int fade_vol = MIX_AMP_UNITY;
|
||||||
|
@ -97,33 +97,33 @@ static bool soft_mode = false;
|
||||||
|
|
||||||
#ifdef HAVE_CROSSFADE
|
#ifdef HAVE_CROSSFADE
|
||||||
/* Crossfade buffer */
|
/* Crossfade buffer */
|
||||||
static char *fadebuf IDATA_ATTR;
|
static char *fadebuf;
|
||||||
|
|
||||||
/* Crossfade related state */
|
/* Crossfade related state */
|
||||||
static bool crossfade_enabled;
|
static bool crossfade_enabled;
|
||||||
static bool crossfade_enable_request;
|
static bool crossfade_enable_request;
|
||||||
static bool crossfade_mixmode;
|
static bool crossfade_mixmode;
|
||||||
static bool crossfade_auto_skip;
|
static bool crossfade_auto_skip;
|
||||||
static bool crossfade_active IDATA_ATTR;
|
static bool crossfade_active;
|
||||||
static bool crossfade_track_change_started IDATA_ATTR;
|
static bool crossfade_track_change_started;
|
||||||
|
|
||||||
/* Track the current location for processing crossfade */
|
/* Track the current location for processing crossfade */
|
||||||
static struct chunkdesc *crossfade_chunk IDATA_ATTR;
|
static struct chunkdesc *crossfade_chunk;
|
||||||
static size_t crossfade_sample IDATA_ATTR;
|
static size_t crossfade_sample;
|
||||||
|
|
||||||
/* Counters for fading in new data */
|
/* Counters for fading in new data */
|
||||||
static size_t crossfade_fade_in_total IDATA_ATTR;
|
static size_t crossfade_fade_in_total;
|
||||||
static size_t crossfade_fade_in_rem IDATA_ATTR;
|
static size_t crossfade_fade_in_rem;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct chunkdesc *read_chunk IDATA_ATTR;
|
static struct chunkdesc *read_chunk;
|
||||||
static struct chunkdesc *read_end_chunk IDATA_ATTR;
|
static struct chunkdesc *read_end_chunk;
|
||||||
static struct chunkdesc *write_chunk IDATA_ATTR;
|
static struct chunkdesc *write_chunk;
|
||||||
static struct chunkdesc *write_end_chunk IDATA_ATTR;
|
static struct chunkdesc *write_end_chunk;
|
||||||
static size_t last_chunksize IDATA_ATTR;
|
static size_t last_chunksize;
|
||||||
|
|
||||||
static size_t pcmbuf_unplayed_bytes IDATA_ATTR;
|
static size_t pcmbuf_unplayed_bytes;
|
||||||
static size_t pcmbuf_watermark IDATA_ATTR;
|
static size_t pcmbuf_watermark;
|
||||||
|
|
||||||
static bool low_latency_mode = false;
|
static bool low_latency_mode = false;
|
||||||
static bool flush_pcmbuf = false;
|
static bool flush_pcmbuf = false;
|
||||||
|
@ -635,7 +635,6 @@ bool pcmbuf_start_track_change(bool auto_skip)
|
||||||
* buffer is empty except for uncommitted samples. Then they are committed
|
* buffer is empty except for uncommitted samples. Then they are committed
|
||||||
* and sent to the PCM driver for playback. The third part performs the
|
* and sent to the PCM driver for playback. The third part performs the
|
||||||
* operations involved in sending a new chunk to the DMA. */
|
* operations involved in sending a new chunk to the DMA. */
|
||||||
static void pcmbuf_pcm_callback(unsigned char** start, size_t* size) ICODE_ATTR;
|
|
||||||
static void pcmbuf_pcm_callback(unsigned char** start, size_t* size)
|
static void pcmbuf_pcm_callback(unsigned char** start, size_t* size)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,12 +37,18 @@
|
||||||
#if defined(CPU_COLDFIRE) || defined(CPU_PP)
|
#if defined(CPU_COLDFIRE) || defined(CPU_PP)
|
||||||
/* For Coldfire, it's just faster
|
/* For Coldfire, it's just faster
|
||||||
For PortalPlayer, this also avoids more expensive cache coherency */
|
For PortalPlayer, this also avoids more expensive cache coherency */
|
||||||
#define DOWNMIX_BUF_IBSS IBSS_ATTR
|
#define DOWNMIX_BUF_IBSS IBSS_ATTR
|
||||||
#else
|
#else
|
||||||
/* Otherwise can't DMA from IRAM, IRAM is pointless or worse */
|
/* Otherwise can't DMA from IRAM, IRAM is pointless or worse */
|
||||||
#define DOWNMIX_BUF_IBSS
|
#define DOWNMIX_BUF_IBSS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CPU_COLDFIRE) || defined(CPU_PP)
|
||||||
|
#define MIXER_CALLBACK_ICODE ICODE_ATTR
|
||||||
|
#else
|
||||||
|
#define MIXER_CALLBACK_ICODE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/** Definitions **/
|
/** Definitions **/
|
||||||
|
|
||||||
|
|
|
@ -218,7 +218,7 @@ static void mixer_pcm_callback(unsigned char **start, size_t *size)
|
||||||
|
|
||||||
/* Buffering callback - calls sub-callbacks and mixes the data for next
|
/* Buffering callback - calls sub-callbacks and mixes the data for next
|
||||||
buffer to be sent from mixer_pcm_callback() */
|
buffer to be sent from mixer_pcm_callback() */
|
||||||
static void ICODE_ATTR mixer_buffer_callback(void)
|
static void MIXER_CALLBACK_ICODE mixer_buffer_callback(void)
|
||||||
{
|
{
|
||||||
downmix_index ^= 1; /* Next buffer */
|
downmix_index ^= 1; /* Next buffer */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue