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

Switch slot of I2S #1297

Closed

Conversation

stc1988
Copy link
Contributor

@stc1988 stc1988 commented Jan 20, 2024

This PR is fix for #1236.

Setting I2S slot to left make M5Stack cores3 to AudioOut sound.
This fix affects only esp32/m5stack_cores3.

@phoddie
Copy link
Collaborator

phoddie commented Jan 20, 2024

This is reasonable. Before merging, I'd like to quickly consider a slightly simpler approach. The manifest could use the ESP-IDF constant instead of a number.

    "slot": "#I2S_STD_SLOT_LEFT"

Then you can write:

	#ifndef MODDEF_AUDIOOUT_I2S_SLOT
 		#define MODDEF_AUDIOOUT_I2S_SLOT I2S_STD_SLOT_RIGHT
 	#endif

And

i2s_config.slot_cfg.slot_mask = MODDEF_AUDIOOUT_I2S_SLOT;

I think it is more clear. What do you think? (I'm OK with either approach.)

@stc1988
Copy link
Contributor Author

stc1988 commented Jan 21, 2024

Thanks for the review.
I think that is more clear too.

I have committed to this fix.

@phoddie
Copy link
Collaborator

phoddie commented Jan 21, 2024

Thanks for considering the proposal. Also, thank you for correctly my mistake with the "#". ;)

We'll get this merged.

@stc1988 stc1988 closed this Jan 24, 2024
@stc1988 stc1988 deleted the feature/swtich_i2s_slot branch February 19, 2024 12:46
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.

2 participants