i2s_stream: do not unconditionally install I2S driver (AUD-5119) #1130
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.