forked from len0rd/rockbox
Revise the PCM callback system after adding multichannel audio.
Additional status callback is added to pcm_play/rec_data instead of using a special function to set it. Status includes DMA error reporting to the status callback. Playback and recording callback become more alike except playback uses "const void **addr" (because the data should not be altered) and recording uses "void **addr". "const" is put in place throughout where appropriate. Most changes are fairly trivial. One that should be checked in particular because it isn't so much is telechips, if anyone cares to bother. PP5002 is not so trivial either but that tested as working. Change-Id: I4928d69b3b3be7fb93e259f81635232df9bd1df2 Reviewed-on: http://gerrit.rockbox.org/166 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
This commit is contained in:
parent
3f82f3aca1
commit
286a4c5caa
48 changed files with 799 additions and 752 deletions
|
|
@ -34,7 +34,7 @@
|
|||
/* This is global to save some latency when pcm_play_dma_get_peak_buffer is
|
||||
* called.
|
||||
*/
|
||||
static void *start;
|
||||
static const void *start;
|
||||
static int dma_channel;
|
||||
|
||||
void pcm_play_dma_postinit(void)
|
||||
|
|
@ -171,9 +171,7 @@ void DSPHINT(void)
|
|||
|
||||
case MSG_REFILL:
|
||||
/* Buffer empty. Try to get more. */
|
||||
pcm_play_get_more_callback(&start, &size);
|
||||
|
||||
if (size != 0)
|
||||
if (pcm_play_dma_complete_callback(PCM_DMAST_OK, &start, &size))
|
||||
{
|
||||
unsigned long sdem_addr=(unsigned long)start - CONFIG_SDRAM_START;
|
||||
/* Flush any pending cache writes */
|
||||
|
|
@ -187,7 +185,7 @@ void DSPHINT(void)
|
|||
DEBUGF("pcm_sdram at 0x%08lx, sdem_addr 0x%08lx",
|
||||
(unsigned long)start, (unsigned long)sdem_addr);
|
||||
|
||||
pcm_play_dma_started_callback();
|
||||
pcm_play_dma_status_callback(PCM_DMAST_STARTED);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue