1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-13 16:52:18 +01:00

Allow microphone channel to be specified in config (#4871)

This commit is contained in:
Jesse Hills
2023-05-23 07:02:16 +12:00
committed by GitHub
parent 40d110fc3f
commit f7b5c6307c
3 changed files with 14 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ void I2SAudioMicrophone::start_() {
.mode = (i2s_mode_t) (I2S_MODE_MASTER | I2S_MODE_RX),
.sample_rate = 16000,
.bits_per_sample = I2S_BITS_PER_SAMPLE_16BIT,
.channel_format = I2S_CHANNEL_FMT_ONLY_RIGHT,
.channel_format = this->channel_,
.communication_format = I2S_COMM_FORMAT_STAND_I2S,
.intr_alloc_flags = ESP_INTR_FLAG_LEVEL1,
.dma_buf_count = 4,