|
1 | 1 | /* |
2 | | - * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD |
| 2 | + * SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD |
3 | 3 | * |
4 | 4 | * SPDX-License-Identifier: Apache-2.0 |
5 | 5 | */ |
@@ -743,7 +743,6 @@ static inline void i2s_ll_rx_enable_tdm(i2s_dev_t *hw) |
743 | 743 | { |
744 | 744 | hw->rx_conf.rx_pdm_en = false; |
745 | 745 | hw->rx_conf.rx_tdm_en = true; |
746 | | - hw->rx_pdm2pcm_conf.rx_pdm2pcm_en = false; |
747 | 746 | } |
748 | 747 |
|
749 | 748 | /** |
@@ -946,80 +945,9 @@ static inline uint32_t i2s_ll_tx_get_pdm_fs(i2s_dev_t *hw) |
946 | 945 | */ |
947 | 946 | static inline void i2s_ll_rx_enable_pdm(i2s_dev_t *hw, bool pdm_enable) |
948 | 947 | { |
| 948 | + (void)pdm_enable; |
949 | 949 | hw->rx_conf.rx_pdm_en = 0; |
950 | 950 | hw->rx_conf.rx_tdm_en = 1; |
951 | | - hw->rx_pdm2pcm_conf.rx_pdm2pcm_en = pdm_enable; |
952 | | -} |
953 | | - |
954 | | -/** |
955 | | - * @brief Configure RX PDM downsample |
956 | | - * |
957 | | - * @param hw Peripheral I2S hardware instance address. |
958 | | - * @param dsr PDM downsample configuration parameter |
959 | | - */ |
960 | | -static inline void i2s_ll_rx_set_pdm_dsr(i2s_dev_t *hw, i2s_pdm_dsr_t dsr) |
961 | | -{ |
962 | | - hw->rx_pdm2pcm_conf.rx_pdm_sinc_dsr_16_en = dsr; |
963 | | -} |
964 | | - |
965 | | -/** |
966 | | - * @brief Get RX PDM downsample configuration |
967 | | - * |
968 | | - * @param hw Peripheral I2S hardware instance address. |
969 | | - * @param dsr Pointer to accept PDM downsample configuration |
970 | | - */ |
971 | | -static inline void i2s_ll_rx_get_pdm_dsr(i2s_dev_t *hw, i2s_pdm_dsr_t *dsr) |
972 | | -{ |
973 | | - *dsr = (i2s_pdm_dsr_t)hw->rx_pdm2pcm_conf.rx_pdm_sinc_dsr_16_en; |
974 | | -} |
975 | | - |
976 | | -/** |
977 | | - * @brief Configure RX PDM amplify number |
978 | | - * @note This is the amplification number of the digital amplifier, |
979 | | - * which is added after the PDM to PCM conversion result and mainly used for |
980 | | - * amplify the small PDM signal under the VAD scenario |
981 | | - * pcm_result = pdm_input * amplify_num |
982 | | - * pcm_result = 0 if amplify_num = 0 |
983 | | - * |
984 | | - * @param hw Peripheral I2S hardware instance address. |
985 | | - * @param amp_num PDM RX amplify number |
986 | | - */ |
987 | | -static inline void i2s_ll_rx_set_pdm_amplify_num(i2s_dev_t *hw, uint32_t amp_num) |
988 | | -{ |
989 | | - hw->rx_pdm2pcm_conf.rx_pdm2pcm_amplify_num = amp_num; |
990 | | -} |
991 | | - |
992 | | -/** |
993 | | - * @brief Set I2S RX PDM high pass filter param0 |
994 | | - * |
995 | | - * @param hw Peripheral I2S hardware instance address. |
996 | | - * @param param The fourth parameter of PDM RX IIR_HP filter stage 1 is (504 + I2S_RX_IIR_HP_MULT12_0[2:0]) |
997 | | - */ |
998 | | -static inline void i2s_ll_rx_set_pdm_hp_filter_param0(i2s_dev_t *hw, uint32_t param) |
999 | | -{ |
1000 | | - hw->rx_pdm2pcm_conf.rx_iir_hp_mult12_0 = param; |
1001 | | -} |
1002 | | - |
1003 | | -/** |
1004 | | - * @brief Set I2S RX PDM high pass filter param5 |
1005 | | - * |
1006 | | - * @param hw Peripheral I2S hardware instance address. |
1007 | | - * @param param The fourth parameter of PDM RX IIR_HP filter stage 2 is (504 + I2S_RX_IIR_HP_MULT12_5[2:0]) |
1008 | | - */ |
1009 | | -static inline void i2s_ll_rx_set_pdm_hp_filter_param5(i2s_dev_t *hw, uint32_t param) |
1010 | | -{ |
1011 | | - hw->rx_pdm2pcm_conf.rx_iir_hp_mult12_5 = param; |
1012 | | -} |
1013 | | - |
1014 | | -/** |
1015 | | - * @brief Enable I2S RX PDM high pass filter |
1016 | | - * |
1017 | | - * @param hw Peripheral I2S hardware instance address. |
1018 | | - * @param enable Set true to enable I2S RX PDM high pass filter, set false to bypass it |
1019 | | - */ |
1020 | | -static inline void i2s_ll_rx_enable_pdm_hp_filter(i2s_dev_t *hw, bool enable) |
1021 | | -{ |
1022 | | - hw->rx_pdm2pcm_conf.rx_pdm_hp_bypass = !enable; |
1023 | 951 | } |
1024 | 952 |
|
1025 | 953 | /** |
|
0 commit comments