From f09a1e3ece1eba9f2b1e9f59785f83b662866a32 Mon Sep 17 00:00:00 2001 From: pimdo <38102897+pimdo@users.noreply.github.com> Date: Sat, 27 Apr 2024 17:54:47 +0100 Subject: [PATCH] use I2S_NUM_AUTO --- esphome/components/i2s_audio/i2s_audio.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/esphome/components/i2s_audio/i2s_audio.cpp b/esphome/components/i2s_audio/i2s_audio.cpp index a00d7ee638..a52f155757 100644 --- a/esphome/components/i2s_audio/i2s_audio.cpp +++ b/esphome/components/i2s_audio/i2s_audio.cpp @@ -11,11 +11,7 @@ static const char *const TAG = "i2s_audio"; void I2SAudioComponent::setup() { static i2s_port_t next_port_num = I2S_NUM_0; -#if SOC_I2S_NUM > 1 - if (next_port_num > I2S_NUM_1) { -#else - if (next_port_num > I2S_NUM_0) { -#endif + if (next_port_num > I2S_NUM_AUTO) { ESP_LOGE(TAG, "Too many I2S Audio components!"); this->mark_failed(); return;