Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AudioOutputI2S : error "I2S: register I2S object to platform failed" : destructor & stop #568

Merged

Conversation

FedericoBusero
Copy link
Contributor

  • ESP32: When calling the destructor of AudioOutputI2S after having called the stop function, followed by creating of a new AudioOutputI2S object, an error is shown "I2S: register I2S object to platform failed" in IDF 4.4.
    This is because i2s_driver_uninstall had not been called in the destructor because i2sOn was already set to false in the function stop.

It is necessary to call i2s_driver_uninstall before i2s_driver_install is being called again in the begin function. That is why I moved it to the stop function

  • ESP8266 : the same problem with i2s_end not being called called when calling the stop function followed by the destructor bacause i2sOn is set to false in the stop function.
    This results in new call to i2s_rxtx_begin without first having called i2s_end.

My idea is that also the noise on DAC is less after calling the function stop - but I am not sure about this

ESP32: When calling destructor after stop, and then create a new object, then an error is shown "I2S: register I2S object to platform failed" because i2s_driver_uninstall had not been called.
ESP8266 : i2s_end is not called when stopping, but i2sOn is false, resulting in new call i2s_rxtx_begin
Copy link
Owner

@earlephilhower earlephilhower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@earlephilhower earlephilhower merged commit f95f15f into earlephilhower:master Sep 1, 2022
@riraosan
Copy link

riraosan commented Sep 19, 2022

#569
I found this problem, though. @FedericoBusero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants