esphome / esphome/feature-requests
Support for MAX4908-MAX4932 analog audio switcher chips in 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**
With the new media player functionality added to ESPHome, next thing to think about is how to handle multiple, external (auxiliary) audio sources. This is where audio switches like MAX4908-MAX4932 come into the picture:


These ICs add multiple selectable audio input sources to the media player.
**Please describe your use case for this integration and alternatives you've tried:**
Use case is for when you have sound coming out from the TV (directly or via an SPDIF-to-Analog converter), or from the PC soundcard/whatever to your living room speakers, and you'd like to integrate them with ESPHome to also play TTS from HA or webradio streams.
In the example schematic above, ESP audio output could be connected to X0 and Y0, while X/Y1 and 2 could be other external sources like television or computer. With proper configuration these sources could be added to Home Assistant media player as available selections.
```
media_player:
- platform: i2s_audio
name: ESP32 Media Player
dac_type: external
i2s_ws_pin: 26
i2s_dout_pin: 25
i2s_bclk_pin: 27
- source_selector: max49xx
cb1_pin: 4
cb2_pin: 5
source_xy0: "ESPHome"
source_xy1: "Television"
source_xy2: "Computer"
```

**Additional context**
Related to https://github.com/esphome/esphome/pull/3487
There are of course many other similar manufacturers of signal switchers, but the principle is mostly the same.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the media_player i2s_audio integration and the related PR #3487. The requested work is complete when MAX4908-MAX4932 source selection can be configured and the external sources appear as selectable Home Assistant media-player sources.
Written by the indexing model from the issue text.
Assessment
- Domain
- audio-video-rtc, embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100