summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
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();