From a2b6703a369f6cdbfec1f150c408dadc877631fb Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 29 Jun 2011 06:37:04 +0000 Subject: Commit FS#12150 - Fully-functional audio mixer - and finally whip old limitations about playback of voice and other sounds when paused. Channels are independent in state and amplitude. Fade on stop/pause is handled by the channel's volume control rather than global volume which means it now works from anywhere. Opens up the possibility of plugin sounds during music playback by merely adding an additional channel enum. If any PCM drivers were not properly modified, see one of the last comments in the task for a description of the simple change that is expected. Some params are tunable in firmware/export/pcm-mixer.h as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30097 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/as3525/pcm-as3525.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'firmware/target/arm/as3525/pcm-as3525.c') diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c index 469833b05c..1b22d48f7f 100644 --- a/firmware/target/arm/as3525/pcm-as3525.c +++ b/firmware/target/arm/as3525/pcm-as3525.c @@ -29,6 +29,7 @@ #include "as3514.h" #include "audiohw.h" #include "mmu-arm.h" +#include "pcm-internal.h" #define MAX_TRANSFER (4*((1<<11)-1)) /* maximum data we can transfer via DMA * i.e. 32 bits at once (size of I2SO_DATA) @@ -104,9 +105,13 @@ static void dma_callback(void) /* force writeback */ clean_dcache_range(dma_start_addr, dma_start_size); + play_start_pcm(); + pcm_play_dma_started_callback(); + } + else + { + play_start_pcm(); } - - play_start_pcm(); } void pcm_play_dma_start(const void *addr, size_t size) -- cgit v1.2.3