esphome / esphome/feature-requests

Add support for 24/32-bit audio, ES9038Q2M DAC

Open
#1,875 1 comment 0 reactions 0 assignees View on GitHub
component: i2s_audio component: media_player
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem you have/What new integration you would like**
Trying to use ESPHome I2S with ES9038Q2M, which seems to expect the data at 32 bits (default).
Unfortunately audio is distorted and grabbled.

**Please describe your use case for this integration and alternatives you've tried:**
High quality ESS [board from Aliexpress](https://www.aliexpress.com/item/32852665418.html), has 3 inputs, volume control, dithering filters, etc:
- Toslink (optical)
- Spdif (coaxial)
- I2S

The board has an ATtiny24A-SSU microcontoller already on board, talking via I2C to the DAC, we can actually keep it and command this via GPIOs.
We could of course replace it with an ESP32 and we could talk with the DAC directly from ESPHome, which would be exceptional, as the multitude of settings available in the DAC would be accessible to us - but that's more work to do...

**Additional context**
[Datasheet](https://www.esstech.com/wp-content/uploads/2021/02/ES9028Q2M_Datasheet_v0.41.pdf), see page 13.

Board schematic:
![ES9038 Board Schematic](https://user-images.githubusercontent.com/1550668/190706616-f7d657cb-df0b-4b3c-a97c-7a610e2cbb0f.png)

Control with the onboard ATtiny24A MCU, if we don't wanna replace it:
Audio input settings:

- ​J1 ON, coaxial input
- J2 ON, optical input
- J1 and J2 OFF, I2S input

Filter settings are done with jumpers 3 tp 6:
J3, J4, J5, J6 OFF, filter = apodizing fast roll-off filter

J3 OFF:
- J4 ON, filter = brick wall filter
- J5 ON, filter = corrected minimum phase fast roll-off filter
- J6 ON, filter=minimum phase slow roll-off filter

J3 ON:
- J4 ON, filter=minimum phase fast roll-off filter
- J5 ON, filter = linear phase slow roll-off filter
- J6 ON, filter = linear phase fast roll-off filter

Volume control:
VOL: 1-2 short is muted, 2-3 short is connected to maximum volume
Pin3 is 3.3V, Pin1 is GND, applying an analog output from ESP32 to Pin2, we can have volume control.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing ESPHome's existing I2S audio support and the linked ES9028Q2M datasheet, especially page 13. Confirm how 24- and 32-bit samples are expected by the ES9038Q2M and identify the relevant integration entry point. Done means I2S audio works without distortion with the cited DAC in both supported sample widths.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.