45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
---
|
|
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
|