Fixed issue with I2S xcore-slave mode on L1/SU1 where the master clock-block does not have a source causing bad feedback

This commit is contained in:
Ross Owen
2012-09-14 16:10:50 +01:00
parent e769059a81
commit c5f3867c62
2 changed files with 14 additions and 2 deletions

View File

@@ -110,11 +110,16 @@ void ConfigAudioPorts(unsigned int divide)
/* Pause until output completes */
sync(p_bclk);
#else
/* Stop bit and master clock blocks and clear port buffers */
#else /* CODEC_SLAVE = 1 */
/* Stop bit and master clock blocks */
stop_clock(clk_audio_bclk);
stop_clock(clk_audio_mclk);
/* Clock master clock-block from master-clock port -
* though not directly used in I2S slave mode it is required for FB */
configure_clock_src(clk_audio_mclk, p_mclk);
/* Clock bclk clock-block from bclk pin */
configure_clock_src(clk_audio_bclk, p_bclk);
@@ -133,6 +138,7 @@ void ConfigAudioPorts(unsigned int divide)
configure_in_port_no_ready(p_lrclk, clk_audio_bclk);
start_clock(clk_audio_bclk);
start_clock(clk_audio_mclk);
#endif
}