mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Make PCM->driver interface about as simple as it will get. Registered callback, zero data, alignment and stops are handled entirely inside pcm.c; driver merely calls fixed pcm.c callback. Remove pcm_record_more and do it just like playback; the original reason behind it isn't very practical in general. Everything checks out on supported targets. There wer some compat changes I can't check out on many unsupoorted but if there's a problem it will be a minor oops. Plugins become incompatible due to recording tweak-- full update. Sorted API.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26253 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6688988ec4
commit
d56999890f
19 changed files with 277 additions and 460 deletions
|
|
@ -100,23 +100,16 @@ static inline void set_dma(const void *addr, size_t size)
|
|||
|
||||
static inline void play_dma_callback(void)
|
||||
{
|
||||
unsigned char *start = NULL;
|
||||
size_t size = 0;
|
||||
unsigned char *start;
|
||||
size_t size;
|
||||
|
||||
if(pcm_callback_for_more)
|
||||
pcm_callback_for_more(&start, &size);
|
||||
pcm_play_get_more_callback(&start, &size);
|
||||
|
||||
if(LIKELY(size > 0 && start))
|
||||
if (size != 0)
|
||||
{
|
||||
set_dma(start, size);
|
||||
REG_DMAC_DCCSR(DMA_AIC_TX_CHANNEL) |= DMAC_DCCSR_EN;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Error, callback missing or no more DMA to do */
|
||||
pcm_play_dma_stop();
|
||||
pcm_play_dma_stopped_callback();
|
||||
}
|
||||
}
|
||||
|
||||
void DMA_CALLBACK(DMA_AIC_TX_CHANNEL)(void) __attribute__ ((section(".icode")));
|
||||
|
|
@ -292,10 +285,4 @@ const void * pcm_rec_dma_get_peak_buffer(void)
|
|||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void pcm_rec_dma_record_more(void *start, size_t size)
|
||||
{
|
||||
(void) start;
|
||||
(void) size;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue