Mediaplayer and ESP32 Touch - conflict?

Hi,

I’m building a alarm clock with a display, i2s speaker and 3 touch ‘buttons’.
Mediaplayer is working fine, display is working fine. Also together it works.
But when i activate a binary touch button, audio on speaker gets crackling. It’s online in HA, it plays the audio, but very very very bad quality.

This works perfect (parts of the code):

font:
  - file: 'arial.ttf'
    id: font3
    size: 12
  - file: 'Caracas.ttf'
    id: font7
    size: 36

i2c:
  sda: 19
  scl: 22
  scan: true
  id: bus_a

display:
  - platform: ssd1306_i2c
    id: ssddisp
    model: "SSD1306 128x32"
    reset_pin: D0
    address: 0x3C
    contrast: 0.5

media_player:
  - platform: i2s_audio
    name: ESPHome I2S Media Player
    id: mp1
    dac_type: external
    i2s_lrclk_pin: GPIO27
    i2s_bclk_pin: GPIO26
    i2s_dout_pin: GPIO25
    mode: mono

but when adding this code audio get BAD.

binary_sensor:
  - platform: esp32_touch
    name: "touch links"
    pin: GPIO13
    threshold: 1000

Has anybody have the same experiance? Is it a known conflict between touch and mediaplayer?

1 Like

You’re not alone.

Is this maybe a recent issue? Seems odd that multiple folks are all reporting it at the same time. Admittedly this was the first time I tried using a touch sensor and only have one other project with a media player.

1 Like

I wish I had spotted this earlier… Touch kills i2s audio quite nicely. using an ES8388 i2s chip on a ESP32-LyraT board

Wasted 3 days!