From 1c967b788e324ce648928326efa2fe8a1789987d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Wed, 26 May 2010 11:07:49 +0000 Subject: as3525: move audio loopback handling to audio_set_output_source git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26308 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/as3525/audio-as3525.c | 5 ++++- firmware/target/arm/as3525/pcm-as3525.c | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'firmware/target/arm') diff --git a/firmware/target/arm/as3525/audio-as3525.c b/firmware/target/arm/as3525/audio-as3525.c index 570ff1491c..350bfb5ee6 100644 --- a/firmware/target/arm/as3525/audio-as3525.c +++ b/firmware/target/arm/as3525/audio-as3525.c @@ -29,7 +29,10 @@ int audio_channels = 2; void audio_set_output_source(int source) { - (void)source; + if (source == AUDIO_SRC_PLAYBACK) + I2SOUT_CONTROL &= ~(1<<5); + else + I2SOUT_CONTROL |= 1<<5; /* source = loopback from i2sin fifo */ } void audio_input_mux(int source, unsigned flags) diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c index a0532c8912..655c89021a 100644 --- a/firmware/target/arm/as3525/pcm-as3525.c +++ b/firmware/target/arm/as3525/pcm-as3525.c @@ -291,7 +291,6 @@ void pcm_rec_dma_stop(void) dma_release(); rec_dma_size = 0; - I2SOUT_CONTROL &= ~(1<<5); /* source = i2soutif fifo */ I2SIN_CONTROL &= ~(1<<11); /* disable dma */ CGU_AUDIO &= ~((1<<23)|(1<<11)); @@ -313,8 +312,6 @@ void pcm_rec_dma_start(void *addr, size_t size) CGU_PERI |= CGU_I2SIN_APB_CLOCK_ENABLE|CGU_I2SOUT_APB_CLOCK_ENABLE; CGU_AUDIO |= ((1<<23)|(1<<11)); - I2SOUT_CONTROL |= 1<<5; /* source = loopback from i2sin fifo */ - I2SIN_CONTROL |= (1<<11)|(1<<5); /* enable dma, 14bits samples */ rec_dma_start(); -- cgit v1.2.3