S3 Media Player

I have an Esphome media player using one of these

and a MAX98357A This is directly connected to a speaker in a 1956 valve radio.

This is the code I use.

substitutions:
  node_name: wireless


esphome:
  name: ${node_name}
  friendly_name: ${node_name}
  platformio_options:
    board_build.flash_mode: dio

external_components:
  - source:
      type: git
      url: https://github.com/gnumpi/esphome_audio
      ref: main
      #type: local
      #path: /Users/siekmann/Privat/Projects/espHome/esphome_audio/esphome/components
    components: [ adf_pipeline, i2s_audio ]

esp32:
  board: esp32-s3-devkitc-1
  variant: ESP32S3
  flash_size: 16MB
  framework:
    type: esp-idf
    version: recommended
    sdkconfig_options:
      # need to set a s3 compatible board for the adf-sdk to compile
      # board specific code is not used though
      CONFIG_ESP32_S3_BOX_BOARD: "y"

      CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM: "16"
      CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM: "512"
      CONFIG_TCPIP_RECVMBOX_SIZE: "512"

      CONFIG_TCP_SND_BUF_DEFAULT: "65535"
      CONFIG_TCP_WND_DEFAULT: "512000"
      CONFIG_TCP_RECVMBOX_SIZE: "512"

logger:

psram:
  mode: quad
  speed: 80MHz

wifi:
  ssid: !secret wifi_ssid_4
  password: !secret wifi_password_4


api:
  encryption:
    key: "6hyX44qziT/bxX9q6Y8tJm2fC/3lOVbXBztQX10r6co="

ota:
  - platform: esphome
    password: "20f042bddb3474f6ba97541628e789f1"

button:
  - platform: restart
    id: reboot
    name: "Reboot"

i2s_audio:

  - id: i2s_out
    i2s_lrclk_pin: GPIO11
    i2s_bclk_pin: GPIO9

adf_pipeline:
  - platform: i2s_audio
    type: audio_out
    id: adf_i2s_out
    i2s_audio_id: i2s_out
    i2s_dout_pin: GPIO7

media_player:
  - platform: adf_pipeline
    id: adf_media_player
    name: player
    keep_pipeline_alive: false
    internal: false
    pipeline:
      - self
      - adf_i2s_out

light:
  - platform: esp32_rmt_led_strip
    rgb_order: RGB
    pin: GPIO6
    num_leds: 2
    rmt_channel: 0
    chipset: WS2812
    name: ${node_name} LED
    id: led
    disabled_by_default: false
    #entity_category: diagnostic
    icon: mdi:led-on
    default_transition_length: 0s
    effects:
      - pulse:
          name: "Slow Pulse"
          transition_length: 250ms
          update_interval: 250ms
          min_brightness: 20%
          max_brightness: 100%
      - pulse:
          name: "Fast Pulse"
          transition_length: 100ms
          update_interval: 100ms
          min_brightness: 20%
          max_brightness: 100%

web_server:
  port: 80

I then play media and radio via Music Assistant. Its been mostly trouble free for months now.