I2SStart called with I2S_NUM = 0, no matter what I2S interface is selected
While using the I2S interface in the ESP32 Audio Library, i've spotted that I2SStart seems to be called with I2S_NUM = 0 regardless of the I2S interface selected by the user. This issue causes the device to crash when using I2S_NUM_1 in the constructor of the Audio library and then doing some release, instantiate operations. Additionally, there is a missing call to i2s_channel_disable before channel deletion, which leads to improper deletion of the channel and generates a series of warnings during execution.
Issue 1: Wrong channel number used through I2SStop and I2SStart calls.
Issue 2: Missing i2s_channel_disable before calling i2s_del_channel, which produces error(s) later.
09:46:42.583 -> E (265653) i2s_common: i2s_new_channel(812): no available channel found
09:46:42.583 -> E (265654) i2s_std: i2s_channel_init_std_mode(199): input parameter 'handle' is NULL
09:46:42.583 -> E (265657) i2s_common: i2s_channel_enable(999): input parameter 'handle' is NULL
09:46:42.628 -> E (265664) i2s_common: i2s_channel_disable(1026): input parameter 'handle' is NULL
09:46:42.628 -> E (265671) i2s_std: i2s_channel_reconfig_std_gpio(338): input parameter 'handle' is NULL
09:46:42.628 -> E (265679) i2s_common: i2s_channel_enable(999): input parameter 'handle' is NULL
09:46:43.145 -> E (268730) i2s_common: i2s_channel_disable(1026): input parameter 'handle' is NULL
09:46:43.145 -> E (268731) i2s_std: i2s_channel_reconfig_std_clock(258): input parameter 'handle' is NULL
09:46:43.145 -> E (268735) i2s_std: i2s_channel_reconfig_std_slot(308): input parameter 'handle' is NULL
09:46:43.145 -> E (268743) i2s_common: i2s_channel_enable(999): input parameter 'handle' is NULL
09:46:43.192 -> E (268751) i2s_common: i2s_channel_write(1109): input parameter 'handle' is NULL
I2SStart called with
I2S_NUM = 0
, no matter what I2S interface is selectedWhile using the I2S interface in the ESP32 Audio Library, i've spotted that
I2SStart
seems to be called withI2S_NUM = 0
regardless of the I2S interface selected by the user. This issue causes the device to crash when usingI2S_NUM_1
in the constructor of the Audio library and then doing some release, instantiate operations. Additionally, there is a missing call toi2s_channel_disable
before channel deletion, which leads to improper deletion of the channel and generates a series of warnings during execution.Issue 1: Wrong channel number used through
I2SStop
andI2SStart
calls.https://github.com/schreibfaul1/ESP32-audioI2S/blob/015e06ba02dfb1cc89da80ee55ea222293b12d8f/src/Audio.cpp#L231
Issue 2: Missing
i2s_channel_disable
before callingi2s_del_channel
, which produces error(s) later.https://github.com/schreibfaul1/ESP32-audioI2S/blob/015e06ba02dfb1cc89da80ee55ea222293b12d8f/src/Audio.cpp#L293
This problem has a significant impact, potentially causing audio malfunctions or even application crashes.
I have submitted a PR to address these issues.