mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-10 05:32:40 -05:00
Flush DMA buffers for DMA
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11905 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6eb81e2dc8
commit
dd7b75bd2c
1 changed files with 18 additions and 11 deletions
|
|
@ -22,6 +22,7 @@
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
#include "wm8975.h"
|
#include "wm8975.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
|
#include "mmu-meg-fx.h"
|
||||||
|
|
||||||
static int pcm_freq = HW_SAMPR_DEFAULT; /* 44.1 is default */
|
static int pcm_freq = HW_SAMPR_DEFAULT; /* 44.1 is default */
|
||||||
|
|
||||||
|
|
@ -61,6 +62,9 @@ void fiq(void)
|
||||||
|
|
||||||
if (p_size)
|
if (p_size)
|
||||||
{
|
{
|
||||||
|
/* Flush any pending cache writes */
|
||||||
|
clean_dcache_range(p, p_size);
|
||||||
|
|
||||||
/* set the new DMA values */
|
/* set the new DMA values */
|
||||||
DCON2 = DMA_CONTROL_SETUP | (p_size >> 1);
|
DCON2 = DMA_CONTROL_SETUP | (p_size >> 1);
|
||||||
DISRC2 = (int)p + 0x30000000;
|
DISRC2 = (int)p + 0x30000000;
|
||||||
|
|
@ -152,6 +156,9 @@ void pcm_play_dma_start(const void *addr, size_t size)
|
||||||
/* unmask the DMA interrupt */
|
/* unmask the DMA interrupt */
|
||||||
INTMSK &= ~(1<<19);
|
INTMSK &= ~(1<<19);
|
||||||
|
|
||||||
|
/* Flush any pending writes */
|
||||||
|
clean_dcache_range(addr, size);
|
||||||
|
|
||||||
/* Activate the channel */
|
/* Activate the channel */
|
||||||
DMASKTRIG2 = 0x2;
|
DMASKTRIG2 = 0x2;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue