i2s: fix driver uninstall issue

This commit is contained in:
morris 2021-04-20 11:48:56 +08:00 committed by bizhuangyang
parent a6f4f7399a
commit 5c3d5faeff

View File

@ -865,8 +865,6 @@ static esp_err_t i2s_param_config(i2s_port_t i2s_num, const i2s_config_t *i2s_co
I2S_CHECK((i2s_config), "param null", ESP_ERR_INVALID_ARG);
I2S_CHECK((i2s_check_cfg_static(i2s_num, i2s_config) == ESP_OK), "param check error", ESP_ERR_INVALID_ARG);
periph_module_enable(i2s_periph_signal[i2s_num].module);
#if SOC_I2S_SUPPORTS_ADC_DAC
if(i2s_config->mode & I2S_MODE_ADC_BUILT_IN) {
//in ADC built-in mode, we need to call i2s_set_adc_mode to
@ -1023,6 +1021,8 @@ esp_err_t i2s_driver_uninstall(i2s_port_t i2s_num)
}
if(p_i2s_obj[i2s_num]->use_apll) {
// switch back to PLL clock source
i2s_hal_set_clock_sel(&(p_i2s_obj[i2s_num]->hal), I2S_CLK_D2CLK);
rtc_clk_apll_enable(0, 0, 0, 0, 0);
}
#ifdef CONFIG_PM_ENABLE