diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-02-24 19:54:18 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-02-24 19:54:18 +0100 |
commit | 4dea6262b57f614cabd5cf4fa96c1e3d83c45fb4 (patch) | |
tree | 765eb9b4322c6158089232cccf6a30eb62ba90d9 /fw/esp32/components/eos/cell_pcm.c | |
parent | 3050565531af2b3a09f2213893f10c64cf9fe43f (diff) |
upgraded to esp-idf 4.2
Diffstat (limited to 'fw/esp32/components/eos/cell_pcm.c')
-rw-r--r-- | fw/esp32/components/eos/cell_pcm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fw/esp32/components/eos/cell_pcm.c b/fw/esp32/components/eos/cell_pcm.c index f8d41b8..4930d66 100644 --- a/fw/esp32/components/eos/cell_pcm.c +++ b/fw/esp32/components/eos/cell_pcm.c @@ -61,14 +61,14 @@ static void i2s_event_task(void *pvParameters) { // Event of I2S receiving data if (!hold_cnt) { buf = eos_net_alloc(); - buf[0] = EOS_CELL_MTYPE_PCM_DATA; + buf[0] = EOS_CELL_MTYPE_DEV | EOS_CELL_MTYPE_PCM_DATA; bytes_r = eos_cell_pcm_read(buf + 1, PCM_MIC_WM); eos_net_send(EOS_NET_MTYPE_CELL, buf, bytes_r + 1); } else { hold_cnt--; if (hold_buf == NULL) { hold_buf = eos_net_alloc(); - hold_buf[0] = EOS_CELL_MTYPE_PCM_DATA; + hold_buf[0] = EOS_CELL_MTYPE_DEV | EOS_CELL_MTYPE_PCM_DATA; } if (1 + hold_bytes_r + PCM_MIC_WM <= EOS_NET_SIZE_BUF) hold_bytes_r += eos_cell_pcm_read(hold_buf + 1 + hold_bytes_r, PCM_MIC_WM); if (hold_cnt == 0) { @@ -113,7 +113,7 @@ void eos_cell_pcm_init(void) { .sample_rate = 32000, .bits_per_sample = 32, .channel_format = I2S_CHANNEL_FMT_ONLY_LEFT, - .communication_format = I2S_COMM_FORMAT_I2S, + .communication_format = I2S_COMM_FORMAT_STAND_I2S, .dma_buf_count = 4, .dma_buf_len = PCM_MIC_WM, .use_apll = true, |