Merge branch 'bugfix/fix_i2s_pdm_config_4.2' into 'release/v4.2'

fix PDM Fp and Fs config error (4.2)

See merge request espressif/esp-idf!10687
This commit is contained in:
Jiang Jiang Jian 2021-03-18 04:13:36 +00:00
commit caa7dc187d

View File

@ -871,8 +871,8 @@ static inline void i2s_ll_set_rx_pcm_long(i2s_dev_t *hw)
*/
static inline void i2s_ll_tx_pdm_cfg(i2s_dev_t *hw, uint32_t sample_rate)
{
uint32_t fp = 96;
uint32_t fs = sample_rate / 1000 * 10;
uint32_t fp = 960;
uint32_t fs = sample_rate / 100;
hw->pdm_freq_conf.tx_pdm_fp = fp;
hw->pdm_freq_conf.tx_pdm_fs = fs;
hw->pdm_conf.tx_sinc_osr2 = fp/fs;