A modern approach to power control on the RaspDAC

Vous aimez bricoler ? N'hésitez pas à nous présenter vos réalisations DIY ;)

Modérateur : Audiophonics

unhold
Messages : 1
Inscription : ven. 29 juin 2018 20:13

A modern approach to power control on the RaspDAC

Message par unhold » ven. 29 juin 2018 20:33

Hi fellow audiophiles!

I recenty bought the RaspDAC I-Sabre V4 DIY Kit and I like it very much. What a nice piece of hardware!
However, I was less happy with the power control and the scripts to use it. The timeout approach seems outdated.

So I created my own solution, and I want to share it with you today:
I wrote a new firmware for the ATtiny45 on the RaspDAC that works with the new Linux drivers gpio-shutdown and gpio-poweroff.
https://github.com/unhold/avr/tree/master/src/raspdac
I attached a built version for 1 MHz clock frequency, the default for the ATtiny45.
unhold-raspdac-1MHz.zip
ATtiny firmware for 1 MHz clock (default)
(802 octets) Téléchargé 12 fois
Flash it on your ATtiny, then put this into your Raspi /boot/config.txt:

Code : Tout sélectionner

dtoverlay=gpio-shutdown:gpio_pin=17,active_low=0
dtoverlay=gpio-poweroff:gpiopin=22
On some images (e.g. Volumio 2) you have to put this into the new file /etc/udev/rules.d/30-shutdown.rules:

Code : Tout sélectionner

ACTION!="REMOVE", SUBSYSTEM=="input", KERNEL=="event*", \
	SUBSYSTEMS=="platform", DRIVERS=="gpio-keys", \
	ATTRS{keys}=="116", TAG+="power-switch"
Benefits:
  • Immediate poweroff after Raspi finished shutdown,
    Works with every (reasonable up-to-date) Raspi Linux image,
    Easy to configure,
    Works with any shutdown option (shutdown, halt, from GUIs, etc.).
Let me know what you think of it!

Cheers and happy listening
unhold

Mathys
Messages : 18
Inscription : mar. 03 avr. 2018 12:09

Re: A modern approach to power control on the RaspDAC

Message par Mathys » lun. 09 juil. 2018 17:09

Merci pour le partage de cet astuce unhold. Je prévois moi aussi de tester RaspDAC, et c'est sûr que j'aurai besoin de ce petit guide pour faire ma configuration et mon installation. La plupart du temps je galère dans ces choses là :lol:

Répondre