#endif | #endif | ||||
DMAChannel AudioOutputPT8211_2::dma(false); | DMAChannel AudioOutputPT8211_2::dma(false); | ||||
PROGMEM | |||||
FLASHMEM | |||||
void AudioOutputPT8211_2::begin(void) | void AudioOutputPT8211_2::begin(void) | ||||
{ | { | ||||
dma.begin(true); // Allocate the DMA channel first | dma.begin(true); // Allocate the DMA channel first | ||||
} | } | ||||
} | } | ||||
PROGMEM | |||||
FLASHMEM | |||||
void AudioOutputPT8211_2::config_i2s(void) | void AudioOutputPT8211_2::config_i2s(void) | ||||
{ | { | ||||
#endif | #endif | ||||
PROGMEM | |||||
FLASHMEM | |||||
void AudioOutputSPDIF::begin(void) | void AudioOutputSPDIF::begin(void) | ||||
{ | { | ||||
#endif | #endif | ||||
#endif | #endif | ||||
PROGMEM | |||||
FLASHMEM | |||||
void AudioOutputSPDIF::config_SPDIF(void) | void AudioOutputSPDIF::config_SPDIF(void) | ||||
{ | { | ||||
#if defined(KINETISK) | #if defined(KINETISK) |
uint32_t AudioOutputSPDIF2::vucp = VUCP_VALID; | uint32_t AudioOutputSPDIF2::vucp = VUCP_VALID; | ||||
PROGMEM | |||||
FLASHMEM | |||||
void AudioOutputSPDIF2::begin(void) | void AudioOutputSPDIF2::begin(void) | ||||
{ | { | ||||
} | } | ||||
PROGMEM | |||||
FLASHMEM | |||||
void AudioOutputSPDIF2::config_SPDIF(void) | void AudioOutputSPDIF2::config_SPDIF(void) | ||||
{ | { | ||||
CCM_CCGR5 |= CCM_CCGR5_SAI2(CCM_CCGR_ON); | CCM_CCGR5 |= CCM_CCGR5_SAI2(CCM_CCGR_ON); |
#if defined(__IMXRT1052__) || defined(__IMXRT1062__) | #if defined(__IMXRT1052__) || defined(__IMXRT1062__) | ||||
#include "imxrt_hw.h" | #include "imxrt_hw.h" | ||||
PROGMEM | |||||
FLASHMEM | |||||
void set_audioClock(int nfact, int32_t nmult, uint32_t ndiv, bool force) // sets PLL4 | void set_audioClock(int nfact, int32_t nmult, uint32_t ndiv, bool force) // sets PLL4 | ||||
{ | { | ||||
if (!force && (CCM_ANALOG_PLL_AUDIO & CCM_ANALOG_PLL_AUDIO_ENABLE)) return; | if (!force && (CCM_ANALOG_PLL_AUDIO & CCM_ANALOG_PLL_AUDIO_ENABLE)) return; |