summaryrefslogtreecommitdiff
path: root/fw/esp32/components/eos/cell_pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/esp32/components/eos/cell_pcm.c')
-rw-r--r--fw/esp32/components/eos/cell_pcm.c6
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,