diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-05-26 11:07:49 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-05-26 11:07:49 +0000 |
commit | 1c967b788e324ce648928326efa2fe8a1789987d (patch) | |
tree | 5c55af49255352e4bca8850f856834de37f72ef0 /firmware/target/arm | |
parent | 6ecb4d0344551a4be92755181faa8bd1e4e083ad (diff) |
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.c | 5 | ||||
-rw-r--r-- | firmware/target/arm/as3525/pcm-as3525.c | 3 |
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; 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(); |