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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/devices/esp32/targets/m5stack_cores3/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
"volume_divider": 1,
"i2s": {
"num": 1,
"slot": "I2S_STD_SLOT_LEFT",
"bitsPerSample": 16,
"bck_pin": 34,
"lr_pin": 33,
Expand Down
5 changes: 4 additions & 1 deletion modules/pins/i2s/audioout.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
#define MODDEF_AUDIOOUT_I2S_DAC_CHANNEL 3
#endif
#endif
#ifndef MODDEF_AUDIOOUT_I2S_SLOT
#define MODDEF_AUDIOOUT_I2S_SLOT I2S_STD_SLOT_RIGHT
#endif
#endif

#if PICO_BUILD
Expand Down Expand Up @@ -1509,7 +1512,7 @@ void audioOutLoop(void *pvParameter)
i2s_config.slot_cfg.slot_mask = I2S_STD_SLOT_BOTH;
#else
i2s_config.slot_cfg.slot_mode = I2S_SLOT_MODE_MONO;
i2s_config.slot_cfg.slot_mask = I2S_STD_SLOT_RIGHT;
i2s_config.slot_cfg.slot_mask = MODDEF_AUDIOOUT_I2S_SLOT;;
#endif
i2s_config.slot_cfg.ws_pol = false;
i2s_config.slot_cfg.bit_shift = false;
Expand Down