Skip to content

Commit

Permalink
AMS: Fix pop-clicks noise on play/stop.
Browse files Browse the repository at this point in the history
This noise itroduced by starting/stopping I2SO MCLK.
Enable MCLK permanently fix it.

Change-Id: I6d9c51e5ea5bca13026833d2bfdda49d94c6b723
  • Loading branch information
MihailZenkov authored and Gerrit Rockbox committed Apr 9, 2015
1 parent 926829c commit f775870
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions firmware/target/arm/as3525/pcm-as3525.c
Expand Up @@ -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();
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}

Expand All @@ -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;

Expand Down

0 comments on commit f775870

Please sign in to comment.