Pi Zero w with Hifiberry miniamp question - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9) +--- Thread: Pi Zero w with Hifiberry miniamp question (/showthread.php?tid=3638) |
Pi Zero w with Hifiberry miniamp question - hrenowsky - 03-24-2021 Hi! I'm running moOde on a rpi zero w with hifiberry's miniamp which i integrated in an old bluetooth speaker (gutted the original internals) but i've run into an issue. When the playback is stopped there's a low frequency hum on the speaker. Could this be because the miniamp stays turned on? Is there a way to add a function to moOde that when the playback stops it then turns off or mutes the power stage of the miniamp? In the miniamp documentation there's a note that GPIO16 can be used to mute the power stage and GPIO26 can shut down the power stage completely but i have no idea how to add this or which config i would need to edit. Thanks RE: Pi Zero w with Hifiberry miniamp question - hrenowsky - 03-24-2021 I did a bit of testing and searching on the forum. I found that if i bridge GPIO16 (mute) to GND the buzzing stops, great that's exactly what i want Now for the code i found this thread http://moodeaudio.org/forum/showthread.php?tid=932 Maybe i can reuse the code posted there with a few adaptations. Will try that now. Any input or help is still greatly appreciated! RE: Pi Zero w with Hifiberry miniamp question - hrenowsky - 04-08-2021 Ok, so i made this bash script (basically just swapped pin23 for pin16 from the link earlier) Code: #!/bin/bash but when i run it i get autoamp.sh: line 6: echo: write error: Device or resource busy i get that something's wrong in line 6, but i have no idea how to fix it RE: Pi Zero w with Hifiberry miniamp question - TheOldPresbyope - 04-08-2021 @hrenowsky The gpio logic is more complicated than was allowed for in the script you copied. If a gpio pin is already been exported then you'll get the message you see when you try to export it again. I suggest you consult Raspberry Pi documentation and forums to learn more and then expand your script to test whether the pin is already exported (and either use it or first unexport it and then export it again). Regards, Kent RE: Pi Zero w with Hifiberry miniamp question - dmueller - 05-27-2023 (03-24-2021, 11:35 AM)curious what driver are you using @hrenowsky hrenowsky Wrote: Hi! |