Skip to content

Commit 94c68ec

Browse files
authored
Call i2s_channel_enable(_tx_handle) in AudioOutputSPDIF::begin() (#799)
i2s_channel_enable(_tx_handle) was only called within AudioOutputSPDIF::SetRate(), which caused i2s_channel_write to fail if the rate was the same with the default 44100Hz. This fixes the issue by calling it in begin().
1 parent cd98586 commit 94c68ec

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/AudioOutputSPDIF.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ bool AudioOutputSPDIF::begin() {
148148
std_cfg.clk_cfg.clk_src = i2s_clock_src_t::I2S_CLK_SRC_APLL;
149149
#endif
150150
assert(ESP_OK == i2s_channel_init_std_mode(_tx_handle, &std_cfg));
151+
assert(ESP_OK == i2s_channel_enable(_tx_handle));
151152
#else
152153
if (!I2SDriver.begin(_buffers, _bufferWords)) {
153154
audioLogger->println(F("ERROR: Unable to start I2S driver"));

0 commit comments

Comments
 (0)