怎么通过i2s_read_bytes()函数读取mic数据啊?需要配置什么参数吗?
I2S配置如下:
i2s_config_t i2s_config = {
.mode = I2S_MODE_MASTER | I2S_MODE_RX | I2S_MODE_TX,
.sample_rate = 48000,
.bits_per_sample = SUPPOERTED_BITS,
.channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
.communication_format = I2S_COMM_FORMAT_I2S,
.dma_buf_count = 3, /*!< amount of the dam buffer sectors*/
.dma_buf_len = 300, /*!< dam buffer size of each sector (word, i.e. 4 Bytes) */
.intr_alloc_flags = I2S_INTER_FLAG,
.use_apll = 1,
};
怎么通过i2s_read_bytes()函数读取mic数据啊?
Re: 怎么通过i2s_read_bytes()函数读取mic数据啊?
Can you use english?
-
- Posts: 9
- Joined: Thu Sep 06, 2018 6:04 am
How to use function i2s_read_bytes() to read mic data?
Thank you for your advice。
How to use function i2s_read_bytes() to read mic data?
The I2S configuration is as follows. but, I cann't get the mic data.
i2s_config_t i2s_config = {
.mode = I2S_MODE_MASTER | I2S_MODE_RX | I2S_MODE_TX,
.sample_rate = 48000,
.bits_per_sample = SUPPOERTED_BITS,
.channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
.communication_format = I2S_COMM_FORMAT_I2S,
.dma_buf_count = 3, /*!< amount of the dam buffer sectors*/
.dma_buf_len = 300, /*!< dam buffer size of each sector (word, i.e. 4 Bytes) */
.intr_alloc_flags = I2S_INTER_FLAG,
.use_apll = 1,
};
How to use function i2s_read_bytes() to read mic data?
The I2S configuration is as follows. but, I cann't get the mic data.
i2s_config_t i2s_config = {
.mode = I2S_MODE_MASTER | I2S_MODE_RX | I2S_MODE_TX,
.sample_rate = 48000,
.bits_per_sample = SUPPOERTED_BITS,
.channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
.communication_format = I2S_COMM_FORMAT_I2S,
.dma_buf_count = 3, /*!< amount of the dam buffer sectors*/
.dma_buf_len = 300, /*!< dam buffer size of each sector (word, i.e. 4 Bytes) */
.intr_alloc_flags = I2S_INTER_FLAG,
.use_apll = 1,
};
-
- Posts: 9715
- Joined: Thu Nov 26, 2015 4:08 am
Re: 怎么通过i2s_read_bytes()函数读取mic数据啊?
Looks good, at first glance at least. Could you elaborate on 'cannot get the mic data'? What data do you get?
-
- Posts: 9
- Joined: Thu Sep 06, 2018 6:04 am
Re: 怎么通过i2s_read_bytes()函数读取mic数据啊?
I'm not sure. It's like noise, not the mic data
-
- Posts: 9715
- Joined: Thu Nov 26, 2015 4:08 am
Re: 怎么通过i2s_read_bytes()函数读取mic数据啊?
Any chance you can play a sample (100Hz sine wave or so) into the microphone and dump some of the data you get back? Perhaps it's as simple as a timing issue or something.
Who is online
Users browsing this forum: Bing [Bot], taherrera and 88 guests