20260326
This commit is contained in:
44
esphome/interfaces/audio.yaml
Normal file
44
esphome/interfaces/audio.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: ${pin_amp_ctrl}
|
||||
name: "amp control"
|
||||
id: ampctrl
|
||||
restore_mode: ALWAYS_ON
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: ${pin_amp_lrclk}
|
||||
i2s_bclk_pin: ${pin_amp_bclk}
|
||||
#sample_rate: 48000
|
||||
speaker:
|
||||
- platform: i2s_audio
|
||||
id: speaker_id
|
||||
dac_type: external
|
||||
i2s_dout_pin: ${pin_amp_data}
|
||||
sample_rate: 48000
|
||||
- platform: mixer
|
||||
id: mixer_speaker_id
|
||||
output_speaker: speaker_id
|
||||
source_speakers:
|
||||
- id: announcement_spk_mixer_input
|
||||
- id: media_spk_mixer_input
|
||||
- platform: resampler
|
||||
id: media_spk_resampling_input
|
||||
output_speaker: media_spk_mixer_input
|
||||
- platform: resampler
|
||||
id: announcement_spk_resampling_input
|
||||
output_speaker: announcement_spk_mixer_input
|
||||
media_player:
|
||||
- platform: speaker
|
||||
name: "Speaker Media Player"
|
||||
id: speaker_media_player_id
|
||||
media_pipeline:
|
||||
speaker: media_spk_resampling_input
|
||||
num_channels: 2
|
||||
announcement_pipeline:
|
||||
speaker: announcement_spk_resampling_input
|
||||
num_channels: 1
|
||||
on_mute:
|
||||
- switch.turn_off: ampctrl
|
||||
on_unmute:
|
||||
- switch.turn_on: ampctrl
|
||||
Reference in New Issue
Block a user