esp-adf icon indicating copy to clipboard operation
esp-adf copied to clipboard

i2s_stream: do not unconditionally install I2S driver (AUD-5119)

Open stintel opened this issue 1 year ago • 1 comments

Initializing an I2S stream currently unconditionally installs the I2S driver. When two I2S streams are needed, one for input and one for output, the following error occurs during initialization of the second stream:

E (21:53:24.782) i2s(legacy): i2s_check_cfg_validity(926): this i2s port is in use E (21:53:24.791) i2s(legacy): i2s_driver_install(1582): I2S configuration is invalid

While these error messages are completely harmless, we keep getting downstream reports from people who think this is a problem. We have considered disabling logging for the legacy I2S driver, but that could lead to valid errors being suppressed.

Instead, add a new member to the i2s_stream_cfg_t struct that makes it possible to skip installing the I2S driver. It is added as true to all the macros, to not impact existing code.

stintel avatar Jan 02 '24 23:01 stintel

@stintel I2S stream supports the new I2S driver on a32e66e4d7d6ead511c9be7e8adfd69bc56ab3c7, I think it can fix your issue, please test.

jason-mao avatar Feb 01 '24 01:02 jason-mao