Hi,
How can I enable hardware PDM to PCM converter?
I found this settings in IDF:
https://github.com/espressif/esp-idf/bl ... /i2s.h#L84
but I didnt locate any function that actually use this enum.
I2S: how to enable PDM to PCM converter?
-
- Posts: 121
- Joined: Wed Apr 05, 2017 12:49 pm
-
- Posts: 121
- Joined: Wed Apr 05, 2017 12:49 pm
Re: I2S: how to enable PDM to PCM converter?
Any updates?
Re: I2S: how to enable PDM to PCM converter?
It's a flag "I2S_MODE_PDM = 64" in the i2s_mode_t structure in the i2s_config_t structure, passed to the "i2s_driver_install(i2s_port_t i2s_num, const i2s_config_t *i2s_config, int queue_size, void* i2s_queue);" function.
After checking your link I see it's not in your branch of the SDK.
John A
After checking your link I see it's not in your branch of the SDK.
John A
-
- Posts: 121
- Joined: Wed Apr 05, 2017 12:49 pm
Re: I2S: how to enable PDM to PCM converter?
So, in case this flag is set, converter will be enabled?fly135 wrote:It's a flag "I2S_MODE_PDM = 64" in the i2s_mode_t structure in the i2s_config_t structure, passed to the "i2s_driver_install(i2s_port_t i2s_num, const i2s_config_t *i2s_config, int queue_size, void* i2s_queue);" function.
After checking your link I see it's not in your branch of the SDK.
John A
I'm not sure how can I set it.
Should I jsut add I2S_MODE_PDM in MODE section?
Code: Select all
i2s_config_t i2s_config = {
.mode = I2S_MODE_MASTER | I2S_MODE_RX | I2S_MODE_TX | I2S_MODE_DAC_BUILT_IN | I2S_MODE_ADC_BUILT_IN | I2S_MODE_PDM,
.sample_rate = EXAMPLE_I2S_SAMPLE_RATE,
.bits_per_sample = EXAMPLE_I2S_SAMPLE_BITS,
.communication_format = I2S_COMM_FORMAT_I2S_MSB,
.channel_format = EXAMPLE_I2S_FORMAT,
.intr_alloc_flags = 0,
.dma_buf_count = 2,
.dma_buf_len = 1024
};
//install and start i2s driver
i2s_driver_install(i2s_num, &i2s_config, 0, NULL);
Re: I2S: how to enable PDM to PCM converter?
That is correct. Except don't think you need the DAC (or TX if just reading mic) flags.
I2S_MODE_MASTER | I2S_MODE_RX | I2S_MODE_PDM
John A
I2S_MODE_MASTER | I2S_MODE_RX | I2S_MODE_PDM
John A
Who is online
Users browsing this forum: Baidu [Spider] and 82 guests