Skip to content

Commit e8735f1

Browse files
authored
IDF V5.1 i2s_cfg msb_right ESP32 only
1 parent d5ba012 commit e8735f1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/Audio.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*
66
* Created on: Oct 26.2018
77
*
8-
* Version 3.0.7w
9-
* Updated on: Dec 07.2023
8+
* Version 3.0.7x
9+
* Updated on: Dec 13.2023
1010
* Author: Wolle (schreibfaul1)
1111
*
1212
*/
@@ -184,7 +184,9 @@ Audio::Audio(bool internalDAC /* = false */, uint8_t channelEnabled /* = I2S_SLO
184184
m_i2s_std_cfg.slot_cfg.ws_width = I2S_DATA_BIT_WIDTH_16BIT; // WS signal width (i.e. the number of bclk ticks that ws signal is high)
185185
m_i2s_std_cfg.slot_cfg.ws_pol = false; // WS signal polarity, set true to enable high lever first
186186
m_i2s_std_cfg.slot_cfg.bit_shift = false; // Set to enable bit shift in Philips mode
187+
#ifdef CONFIG_IDF_TARGET_ESP32
187188
m_i2s_std_cfg.slot_cfg.msb_right = true; // Set to place right channel data at the MSB in the FIFO
189+
#endif
188190
m_i2s_std_cfg.gpio_cfg.bclk = I2S_GPIO_UNUSED; // BCLK, Assignment in setPinout()
189191
m_i2s_std_cfg.gpio_cfg.din = I2S_GPIO_UNUSED; // not used
190192
m_i2s_std_cfg.gpio_cfg.dout = I2S_GPIO_UNUSED; // DOUT, Assignment in setPinout()

src/Audio.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*
44
* Created on: Oct 28,2018
55
*
6-
* Version 3.0.7w
7-
* Updated on: Dec 07.2023
6+
* Version 3.0.7x
7+
* Updated on: Dec 13.2023
88
* Author: Wolle (schreibfaul1)
99
*/
1010

0 commit comments

Comments
 (0)