OpenWrt Forum Archive

Topic: digital sound with a gpio pin

The content of this topic has been archived on 2 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have a router that lacks a USB port so I am very limited. it's a Motorola WR850Gv2 and runs open-wrt very well.
It has two serial ports available and a couple open GPIO pins. I know that digital sound only need hi's and low's to work, is it possible to write a package that will allow mpd or similar to output sound digitally(in a decodable standard) to one of these gpio pins?
I welcome any advice, but i am trying to not run out and buy another router just to play around.


The idea doesn't seem to unrealistic, and i would only run the signal through coax, not optical.

happy hacking,
phyxl

You would need to send the data in bursts, and have some kind of buffering, otherwise any system activity would result in interrupted sound.  It may be better to simply send mp3, where the decoder chip will do some buffering for you, and the data rate will be lower, see:  http://www.pjrc.com/mp3/sta013.html

OTOH, if you just want sound (not music), there is an interesting page here:
http://www.sunspot.co.uk/Projects/SWEEX/beeper.html

The discussion might have continued from here.