summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-05-26 11:07:49 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-05-26 11:07:49 +0000
commit1c967b788e324ce648928326efa2fe8a1789987d (patch)
tree5c55af49255352e4bca8850f856834de37f72ef0 /firmware/target/arm
parent6ecb4d0344551a4be92755181faa8bd1e4e083ad (diff)
downloadrockbox-1c967b788e324ce648928326efa2fe8a1789987d.tar.gz
rockbox-1c967b788e324ce648928326efa2fe8a1789987d.zip
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
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/as3525/audio-as3525.c5
-rw-r--r--firmware/target/arm/as3525/pcm-as3525.c3
2 files changed, 4 insertions, 4 deletions
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;
29 29
30void audio_set_output_source(int source) 30void audio_set_output_source(int source)
31{ 31{
32 (void)source; 32 if (source == AUDIO_SRC_PLAYBACK)
33 I2SOUT_CONTROL &= ~(1<<5);
34 else
35 I2SOUT_CONTROL |= 1<<5; /* source = loopback from i2sin fifo */
33} 36}
34 37
35void audio_input_mux(int source, unsigned flags) 38void 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)
291 dma_release(); 291 dma_release();
292 rec_dma_size = 0; 292 rec_dma_size = 0;
293 293
294 I2SOUT_CONTROL &= ~(1<<5); /* source = i2soutif fifo */
295 I2SIN_CONTROL &= ~(1<<11); /* disable dma */ 294 I2SIN_CONTROL &= ~(1<<11); /* disable dma */
296 295
297 CGU_AUDIO &= ~((1<<23)|(1<<11)); 296 CGU_AUDIO &= ~((1<<23)|(1<<11));
@@ -313,8 +312,6 @@ void pcm_rec_dma_start(void *addr, size_t size)
313 CGU_PERI |= CGU_I2SIN_APB_CLOCK_ENABLE|CGU_I2SOUT_APB_CLOCK_ENABLE; 312 CGU_PERI |= CGU_I2SIN_APB_CLOCK_ENABLE|CGU_I2SOUT_APB_CLOCK_ENABLE;
314 CGU_AUDIO |= ((1<<23)|(1<<11)); 313 CGU_AUDIO |= ((1<<23)|(1<<11));
315 314
316 I2SOUT_CONTROL |= 1<<5; /* source = loopback from i2sin fifo */
317
318 I2SIN_CONTROL |= (1<<11)|(1<<5); /* enable dma, 14bits samples */ 315 I2SIN_CONTROL |= (1<<11)|(1<<5); /* enable dma, 14bits samples */
319 316
320 rec_dma_start(); 317 rec_dma_start();