philippe44 / squeezelite-esp32

squeezelite ported to esp32
63 stars 116 forks source link

Add GPIO out pin for automatic switching on/off amplifier #27

Closed flrahe closed 4 years ago

flrahe commented 4 years ago

Some of the amplifier / amplifier-chips, which can be used with squeezelite-ESP32 have a pin for mute / activation. It would be nice to be able to use this input to automatically switching the amplifier on / off when Squeezelite is playing or being activated. This could save some power and may reduce noise output on cheap solutions, when no output by squeezelite is produced. Configure a GPIO pin (defining pin and also if high / low should be active). There is already something similar for the raspberrypi version of squeezelite to control a relay: " -G <Rpi GPIO#>:<H/L>\tSpecify the BCM GPIO# to use for Amp Power Relay and if the output should be Active High or Low\n" Maybe this solution could be doubled and fitted to the ESP32.