File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 175
175
#if ESP_IDF_VERSION_MAJOR < 4 && !defined(I2S_COMM_FORMAT_STAND_I2S )
176
176
# define I2S_COMM_FORMAT_STAND_I2S (I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_LSB)
177
177
# define I2S_COMM_FORMAT_STAND_MSB (I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB)
178
+ # define I2S_COMM_FORMAT_STAND_PCM_LONG (I2S_COMM_FORMAT_PCM | I2S_COMM_FORMAT_PCM_LONG)
179
+ # define I2S_COMM_FORMAT_STAND_PCM_SHORT (I2S_COMM_FORMAT_PCM | I2S_COMM_FORMAT_PCM_SHORT)
180
+
178
181
typedef int eps32_i2s_sample_rate_type ;
179
182
#else
180
183
typedef uint32_t eps32_i2s_sample_rate_type ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ class I2SBase {
52
52
.dma_buf_len = I2S_BUFFER_SIZE,
53
53
.use_apll = (bool ) cfg.use_apll ,
54
54
.tx_desc_auto_clear = I2S_AUTO_CLEAR,
55
- .fixed_mclk = (eps32_i2s_sample_rate_type ) (cfg.use_apll ? cfg.sample_rate * cfg.apll_frequency_factor : 0 )
55
+ .fixed_mclk = (int ) (cfg.use_apll ? cfg.sample_rate * cfg.apll_frequency_factor : 0 )
56
56
57
57
};
58
58
i2s_config = i2s_config_new;
@@ -223,9 +223,9 @@ class I2SBase {
223
223
case I2S_LEFT_JUSTIFIED_FORMAT:
224
224
return (i2s_comm_format_t ) I2S_COMM_FORMAT_STAND_MSB;
225
225
case I2S_PCM_LONG:
226
- return (i2s_comm_format_t ) I2S_COMM_FORMAT_PCM_LONG ;
226
+ return (i2s_comm_format_t ) I2S_COMM_FORMAT_STAND_PCM_LONG ;
227
227
case I2S_PCM_SHORT:
228
- return (i2s_comm_format_t ) I2S_COMM_FORMAT_PCM_SHORT ;
228
+ return (i2s_comm_format_t ) I2S_COMM_FORMAT_STAND_PCM_SHORT ;
229
229
230
230
default :
231
231
LOGE (" unsupported mode" );
You can’t perform that action at this time.
0 commit comments