From f775870a5a373f8ff68d9b3a4150f18b369ac7a9 Mon Sep 17 00:00:00 2001 From: Mihail Zenkov Date: Sun, 15 Feb 2015 00:42:24 +0000 Subject: AMS: Fix pop-clicks noise on play/stop. This noise itroduced by starting/stopping I2SO MCLK. Enable MCLK permanently fix it. Change-Id: I6d9c51e5ea5bca13026833d2bfdda49d94c6b723 --- firmware/target/arm/as3525/pcm-as3525.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 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 eb22fc2016..0f077b825b 100644 --- a/firmware/target/arm/as3525/pcm-as3525.c +++ b/firmware/target/arm/as3525/pcm-as3525.c @@ -132,8 +132,6 @@ void pcm_play_dma_start(const void *addr, size_t size) /* force writeback */ commit_dcache_range(dma_start_addr, dma_start_size); - bitset32(&CGU_AUDIO, (1<<11)); - play_start_pcm(); } @@ -151,11 +149,6 @@ void pcm_play_dma_stop(void) dma_release(); -#ifdef HAVE_RECORDING - if (!is_recording) - bitclr32(&CGU_AUDIO, (1<<11)); -#endif - play_callback_pending = false; } @@ -221,10 +214,10 @@ void pcm_dma_apply_settings(void) (0<<23) | /* I2SI_MCLK_EN = disabled */ (0<<14) | /* I2SI_MCLK_DIV_SEL = unused */ (0<<12) | /* I2SI_MCLK_SEL = clk_main */ - /* I2SO_MCLK_EN = unchanged */ + (1<<11) | /* I2SO_MCLK_EN */ (mclk_divider() << 2) | /* I2SO_MCLK_DIV_SEL */ (AS3525_MCLK_SEL << 0), /* I2SO_MCLK_SEL */ - 0x01fff7ff); + 0x01ffffff); } size_t pcm_get_bytes_waiting(void) @@ -386,9 +379,6 @@ void pcm_rec_dma_stop(void) rec_dma_addr = NULL; rec_dma_size = 0; - if (!is_playing) - bitclr32(&CGU_AUDIO, (1<<11)); - bitclr32(&CGU_PERI, CGU_I2SIN_APB_CLOCK_ENABLE); } @@ -397,8 +387,6 @@ void pcm_rec_dma_start(void *addr, size_t size) { is_recording = true; - bitset32(&CGU_AUDIO, (1<<11)); - rec_dma_addr = addr; rec_dma_size = size; -- cgit v1.2.3