mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
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
|
|
@ -255,16 +255,14 @@ void pcm_play_dma_pause(bool pause)
|
|||
|
||||
void fiq_handler(void)
|
||||
{
|
||||
static void *start;
|
||||
static const void *start;
|
||||
static size_t size;
|
||||
|
||||
/* clear any pending interrupt */
|
||||
SRCPND = DMA2_MASK;
|
||||
|
||||
/* 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))
|
||||
return;
|
||||
|
||||
/* Flush any pending cache writes */
|
||||
|
|
@ -277,7 +275,7 @@ void fiq_handler(void)
|
|||
/* Re-Activate the channel */
|
||||
DMASKTRIG2 = 0x2;
|
||||
|
||||
pcm_play_dma_started_callback();
|
||||
pcm_play_dma_status_callback(PCM_DMAST_STARTED);
|
||||
}
|
||||
|
||||
size_t pcm_get_bytes_waiting(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue