mirror of
https://github.com/apache/nuttx.git
synced 2026-05-13 10:38:40 +08:00
5ba0d062b1
Add ES7210 audio ADC driver for NuttX implementing the audio lower-half interface. Supports 4-channel recording via I2S with configurable sample rate, bit depth, and mic gain. - drivers/audio/es7210.c: Codec driver using LPWORK for async buffer management, I2C register access, and NuttX audio buffer management - drivers/audio/es7210.h: Internal register definitions and macros - include/nuttx/audio/es7210.h: Public header with platform config structure and es7210_initialize() API - drivers/audio/Kconfig, Make.defs, CMakeLists.txt: Build system integration for CONFIG_AUDIO_ES7210 Key implementation details: - ES7210_SDP_NORMAL (normal I2S) instead of TDM, matching NuttX I2S standard Philips mode - ES7210_ADC_PGA_POWER_ON bit in gain registers REG43-46, required for analog front-end amplifier power-on - 50ms startup delay in es7210_start for codec clock stabilization - I2S_IOCTL(AUDIOIOC_STOP) in es7210_stop to notify I2S layer, preventing DMA from running without buffers after stop Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>