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:
1 parent
cd98586a2c
commit
94c68ecbaa
1 file changed
+1
@@ -148,6 +148,7 @@ bool AudioOutputSPDIF::begin() {
|
|||||||
std_cfg.clk_cfg.clk_src = i2s_clock_src_t::I2S_CLK_SRC_APLL;
|
std_cfg.clk_cfg.clk_src = i2s_clock_src_t::I2S_CLK_SRC_APLL;
|
||||||
#endif
|
#endif
|
||||||
assert(ESP_OK == i2s_channel_init_std_mode(_tx_handle, &std_cfg));
|
assert(ESP_OK == i2s_channel_init_std_mode(_tx_handle, &std_cfg));
|
||||||
|
assert(ESP_OK == i2s_channel_enable(_tx_handle));
|
||||||
#else
|
#else
|
||||||
if (!I2SDriver.begin(_buffers, _bufferWords)) {
|
if (!I2SDriver.begin(_buffers, _bufferWords)) {
|
||||||
audioLogger->println(F("ERROR: Unable to start I2S driver"));
|
audioLogger->println(F("ERROR: Unable to start I2S driver"));
|
||||||
|
|||||||
Reference in new issue
Block a user