mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-25 17:58:46 +00:00
Merge branch 'bugfix/i2s_pdm_dac_wrong_clock_freq' into 'master'
i2s_pdm: fix tx frequency limitation Closes IDFGH-9010 See merge request espressif/esp-idf!21764
This commit is contained in:
@@ -892,6 +892,17 @@ static inline void i2s_ll_tx_set_pdm_sd_dither2(i2s_dev_t *hw, uint32_t dither2)
|
||||
hw->tx_pcm2pdm_conf.tx_pdm_sigmadelta_dither2 = dither2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the PDM TX over sampling ratio
|
||||
*
|
||||
* @param hw Peripheral I2S hardware instance address.
|
||||
* @param ovr Over sampling ratio
|
||||
*/
|
||||
static inline void i2s_ll_tx_set_pdm_over_sample_ratio(i2s_dev_t *hw, uint32_t ovr)
|
||||
{
|
||||
hw->tx_pcm2pdm_conf.tx_pdm_sinc_osr2 = ovr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Configure I2S TX PDM sample rate
|
||||
* Fpdm = 64*Fpcm*fp/fs
|
||||
@@ -904,7 +915,6 @@ static inline void i2s_ll_tx_set_pdm_fpfs(i2s_dev_t *hw, uint32_t fp, uint32_t f
|
||||
{
|
||||
hw->tx_pcm2pdm_conf1.tx_pdm_fp = fp;
|
||||
hw->tx_pcm2pdm_conf1.tx_pdm_fs = fs;
|
||||
hw->tx_pcm2pdm_conf.tx_pdm_sinc_osr2 = fp / fs;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user