Skip to content

Commit

Permalink
The I2S channel bug is only present for esp32 targets, but not for th…
Browse files Browse the repository at this point in the history
…e esp-s3.

#93
  • Loading branch information
BlueAndi committed Dec 18, 2024
1 parent bfb9a01 commit 5bb2036
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/AudioService/src/AudioDrv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
* Macros
*****************************************************************************/

#ifdef CONFIG_IDF_TARGET_ESP32

#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 4)

/**
Expand All @@ -62,6 +64,15 @@

#endif

#else

/**
* Only the left channel is supported.
*/
#define I2S_MIC_CHANNEL I2S_CHANNEL_FMT_ONLY_LEFT

#endif

/******************************************************************************
* Types and classes
*****************************************************************************/
Expand Down Expand Up @@ -293,7 +304,7 @@ bool AudioDrv::initI2S()
.mode = static_cast<i2s_mode_t>(I2S_MODE_MASTER | I2S_MODE_RX),
.sample_rate = SAMPLE_RATE,
.bits_per_sample = I2S_BITS_PER_SAMPLE,
.channel_format = I2S_MIC_CHANNEL, /* Is is assumed, that the I2S device supports the left audio channel only. */
.channel_format = I2S_MIC_CHANNEL, /* It is assumed, that the I2S device supports the left audio channel only. */
.communication_format = I2S_COMM_FORMAT_STAND_I2S, /* I2S_COMM_FORMAT_I2S is necessary for Philips Standard format. */
.intr_alloc_flags = ESP_INTR_FLAG_LEVEL1,
.dma_buf_count = DMA_BLOCKS,
Expand Down

0 comments on commit 5bb2036

Please sign in to comment.