Move I2S management to application side.

This commit is contained in:
Jared Boone 2016-02-05 15:22:28 -08:00
parent cefab197da
commit 9430c94dec
9 changed files with 32 additions and 30 deletions

View file

@ -77,10 +77,7 @@ void AudioOutput::on_block(
audio_present_history = (audio_present_history << 1) | (audio_present_now ? 1 : 0);
const bool audio_present = (audio_present_history != 0);
if( audio_present ) {
i2s::i2s0::tx_unmute();
} else {
i2s::i2s0::tx_mute();
if( !audio_present ) {
for(size_t i=0; i<audio.count; i++) {
audio.p[i] = 0;
}