From 39af967433ae35c1bd45c4cc84a139701835c9aa Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Fri, 16 Dec 2022 10:38:52 +1300 Subject: [PATCH] Fix i2s_audio media_player compiling for esp32-s2 (#4195) --- .../i2s_audio/i2s_audio_media_player.cpp | 6 ++++++ .../components/i2s_audio/i2s_audio_media_player.h | 4 ++++ esphome/components/i2s_audio/media_player.py | 15 ++++++++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/esphome/components/i2s_audio/i2s_audio_media_player.cpp b/esphome/components/i2s_audio/i2s_audio_media_player.cpp index f1f1dc0d51..2b00a5ec26 100644 --- a/esphome/components/i2s_audio/i2s_audio_media_player.cpp +++ b/esphome/components/i2s_audio/i2s_audio_media_player.cpp @@ -103,9 +103,11 @@ void I2SAudioMediaPlayer::stop_() { void I2SAudioMediaPlayer::setup() { ESP_LOGCONFIG(TAG, "Setting up Audio..."); +#if SOC_I2S_SUPPORTS_DAC if (this->internal_dac_mode_ != I2S_DAC_CHANNEL_DISABLE) { this->audio_ = make_unique