From 222b878629d39ea2576ea54f090898baf7e2372c Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Mon, 4 Jan 2016 09:07:07 -0800 Subject: [PATCH] Use BasebandProcessor::mute_audio(), remove I2S #include dependencies. --- firmware/baseband/proc_ais.cpp | 5 +---- firmware/baseband/proc_ert.cpp | 5 +---- firmware/baseband/proc_nfm_audio.cpp | 12 +++++------- firmware/baseband/proc_tpms.cpp | 5 +---- firmware/baseband/proc_wideband_spectrum.cpp | 5 +---- 5 files changed, 9 insertions(+), 23 deletions(-) diff --git a/firmware/baseband/proc_ais.cpp b/firmware/baseband/proc_ais.cpp index b12e8ba8..295bd8e1 100644 --- a/firmware/baseband/proc_ais.cpp +++ b/firmware/baseband/proc_ais.cpp @@ -23,9 +23,6 @@ #include "portapack_shared_memory.hpp" -#include "i2s.hpp" -using namespace lpc43xx; - #include "dsp_fir_taps.hpp" AISProcessor::AISProcessor() { @@ -56,7 +53,7 @@ void AISProcessor::execute(const buffer_c8_t& buffer) { } } - i2s::i2s0::tx_mute(); + mute_audio(); } void AISProcessor::consume_symbol( diff --git a/firmware/baseband/proc_ert.cpp b/firmware/baseband/proc_ert.cpp index c2b08f47..5708e8ed 100644 --- a/firmware/baseband/proc_ert.cpp +++ b/firmware/baseband/proc_ert.cpp @@ -23,9 +23,6 @@ #include "portapack_shared_memory.hpp" -#include "i2s.hpp" -using namespace lpc43xx; - float ERTProcessor::abs(const complex8_t& v) { // const int16_t r = v.real() - offset_i; // const int16_t i = v.imag() - offset_q; @@ -83,7 +80,7 @@ void ERTProcessor::execute(const buffer_c8_t& buffer) { clock_recovery(data); } - i2s::i2s0::tx_mute(); + mute_audio(); } void ERTProcessor::consume_symbol( diff --git a/firmware/baseband/proc_nfm_audio.cpp b/firmware/baseband/proc_nfm_audio.cpp index 87217851..749d754b 100644 --- a/firmware/baseband/proc_nfm_audio.cpp +++ b/firmware/baseband/proc_nfm_audio.cpp @@ -48,14 +48,12 @@ void NarrowbandFMAudio::execute(const buffer_c8_t& buffer) { static uint64_t audio_present_history = 0; audio_present_history = (audio_present_history << 1) | (audio_present_now ? 1 : 0); const bool audio_present = (audio_present_history != 0); - if( !audio_present ) { - // Zero audio buffer. - for(size_t i=0; i @@ -65,7 +62,7 @@ void WidebandSpectrum::execute(const buffer_c8_t& buffer) { phase++; } - i2s::i2s0::tx_mute(); + mute_audio(); } void WidebandSpectrum::on_message(const Message* const message) {