Skip to content

Commit e5b8474

Browse files
n-IA-haneclaude
andcommitted
i2s_audio_duplex: validate use_apll against SoC capability
APLL clock source is only available on ESP32, ESP32-S2, and ESP32-P4. Previously use_apll: true was silently ignored on ESP32-S3 (the ifdef guard compiled it out). Now FINAL_VALIDATE raises an error with a clear message listing supported variants. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 110b6d5 commit e5b8474

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

esphome/components/i2s_audio_duplex/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,14 @@ def _final_validate(config):
240240
f"task_core={task_core} not available on {variant} (single-core SoC)"
241241
)
242242

243+
# APLL is only available on ESP32, ESP32-S2, and ESP32-P4
244+
APLL_VARIANTS = {VARIANT_ESP32, VARIANT_ESP32S2, VARIANT_ESP32P4}
245+
if config.get(CONF_USE_APLL, False) and variant not in APLL_VARIANTS:
246+
raise cv.Invalid(
247+
f"use_apll is not supported on {variant}. "
248+
f"APLL clock source is only available on ESP32, ESP32-S2, and ESP32-P4."
249+
)
250+
243251
# Cross-component validation: check for AEC conflict with intercom_api
244252
from esphome.core import CORE
245253
full_config = CORE.config or {}

0 commit comments

Comments
 (0)