fix esp-hi crashing in esp_codec_dev_close() (#984)

This commit is contained in:
Xiaoxia 2025-07-25 10:36:56 +08:00 committed by GitHub
parent d38763d5ef
commit df7cbdfcb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -141,7 +141,8 @@ void AdcPdmAudioCodec::EnableInput(bool enable) {
}; };
ESP_ERROR_CHECK(esp_codec_dev_open(input_dev_, &fs)); ESP_ERROR_CHECK(esp_codec_dev_open(input_dev_, &fs));
} else { } else {
ESP_ERROR_CHECK(esp_codec_dev_close(input_dev_)); // ESP_ERROR_CHECK(esp_codec_dev_close(input_dev_));
return;
} }
AudioCodec::EnableInput(enable); AudioCodec::EnableInput(enable);
} }