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().
This commit is contained in:
NeoCat authored and GitHub committed 2025-11-12 15:29:27 -08:00
1 parent cd98586a2c
commit 94c68ecbaa
1 file changed
+1
+1
View File
@@ -148,6 +148,7 @@ bool AudioOutputSPDIF::begin() {
std_cfg.clk_cfg.clk_src = i2s_clock_src_t::I2S_CLK_SRC_APLL;
#endif
assert(ESP_OK == i2s_channel_init_std_mode(_tx_handle, &std_cfg));
assert(ESP_OK == i2s_channel_enable(_tx_handle));
#else
if (!I2SDriver.begin(_buffers, _bufferWords)) {
audioLogger->println(F("ERROR: Unable to start I2S driver"));