|
TB2026-YDS Firmware
|
Wired output path control: PCM5242 analog mute (XSMT) and MAX97220 amp shutdown. More...
Go to the source code of this file.
Functions | |
| esp_err_t | sink_i2s_dac_init (void) |
| Bring up the wired path's I2S bus; the sink owns the channel handle. | |
| const audio_sink_t * | sink_i2s_dac_get (void) |
| Get the wired-DAC sink (I2S → PCM5242 → MAX97220 → jack). | |
| esp_err_t | sink_i2s_dac_output_enable (bool enable) |
| Enable or mute the DAC analog output via the PCM5242 XSMT pin. | |
| esp_err_t | sink_i2s_dac_amp_enable (bool enable) |
| Enable or shut down the MAX97220 headphone amplifier via its SHDN pin. | |
Wired output path control: PCM5242 analog mute (XSMT) and MAX97220 amp shutdown.
Both lines are GPIO-expander pins, not chip data interfaces, so this routing lives in the audio service rather than in the drivers: the DAC driver stays I2C-only and the amp has no driver of its own. Power sequencing between the two is this service's concern.
| esp_err_t sink_i2s_dac_amp_enable | ( | bool | enable | ) |
Enable or shut down the MAX97220 headphone amplifier via its SHDN pin.
SHDN is expander IO1, active-low. Requires gpio_expander_init() to have run first.
| enable | true = drive SHDN high (amp on), false = SHDN low (shutdown). |
| const audio_sink_t * sink_i2s_dac_get | ( | void | ) |
Get the wired-DAC sink (I2S → PCM5242 → MAX97220 → jack).
| esp_err_t sink_i2s_dac_init | ( | void | ) |
Bring up the wired path's I2S bus; the sink owns the channel handle.
Mounts I2S0 (BCK/WS/DOUT, no MCLK) and keeps the TX handle inside the sink, so upper layers never touch it. Call once at startup. The PCM5242 I2C control port and the expander mute/amp lines are initialised by their own drivers (audio_dac_init, gpio_expander_init), not here.
| esp_err_t sink_i2s_dac_output_enable | ( | bool | enable | ) |
Enable or mute the DAC analog output via the PCM5242 XSMT pin.
XSMT is expander IO0, active-low. Requires gpio_expander_init() to have run first.
| enable | true = drive XSMT high (output on), false = XSMT low (muted). |