When [linux-works] found himself needing a switch that could convert coax to opto, he made one. The main chip is a cd4052 cmos analog switch, which he says is really cheap. The rest is pretty self explanatory. This setup can switch between 4 different inputs as well as do the coax to opto conversion.
SPDIF Switch
58 thoughts on “SPDIF Switch”
Leave a Reply
Please be kind and respectful to help make the comments section excellent. (Comment Policy)
That was what i thought to hear ^^
The reason why i was asking is, that i planned to “adopt” ^^ your design ( but with 8 Inputs ) for several Game Consoles and more stuff, and integrate it into a 5.1 Amplifier ( the Amp only has 1 Toslink and 1 Coax Input ) since the Sources are allways off and if running only 1 runs at the same time.
if you can ensure that a signal being there at all means it should be given priority, then that could work. in your application, if you switch devices on and off (via power line, say) then yes, only one would be talking at a time and its very do-able to have an auto-select in that case.
I suppose you would want to do a ‘pulse detect’ and then get the binary address of the line it came from and assert that to the switch’s addr lines.
to get fancier, maybe do something that holds onto that line (even if others ‘come up’, later) until that line drops; then the ‘voting’ begins again. that way no data would be interrupted if some new device came online (by mistake).
I wondering if an arduino could somehow be able to detect ‘activity’ on the lines and have it be its own priority encoder. perhaps the ard could tap into the switched output and have it sequence thru the inputs, in a ‘search mode’, and then lock on to the first signal it gets.
another idea that could (maybe) work; if you had a DAC local to the box and it had an ‘spdif=valid’ led or some lock-on signal on the board, you could use *that* as a ‘there is good stuff on this input’ detector. that would just be a TTL line to the ard and the ard would step thru until it found the first valid spdif=ok line. better yet, step thru them all, keep a list and then only cycle thru the inputs you saw that had ‘valid’ data.
and when I say DAC, I could also be referring to a digital audio receiver chip (like the 8416). that fully ‘understands’ spdif and so its a lot smarter than a pulse detector. I don’t think it cares what the logical data is (dd, dts, pcm); but if its a valid spdif stream, I think you can get a signal from this kind of receiver chip. its a lot more work and if you have a receiver chip, you’d want to use THAT as the input switch fabric, so that changes the project dramatically ;)
.bl
Damn ^^
That allready sounds like allot more work :)
And for that my understanding of all this stuff seems much too low for myself ( But getting better with the Time i read more and more of it ^^ ).
So is there any more Progress at the Moment ?
( Cant wait to see a full Documentation about that :) )
no new update on the switch, itself.
the next stage is to make the lcd display into a pc board; and before that, I wanted to convert it to being an i2c serial lcd with a port expander.
my flicker site shows that progress.
still on perf board but that may be the last PB before the real pcb is sent out. working on that now.
when the ‘backpack i2c lcd’ board is done, the fabric switch board would be next and that’s really the last part of this project.
.bl
update: we have board ordered for the lcd/arduino part of the project! see 3d drawing for what its going to look like-
LCDuino:
http://www.flickr.com/photos/linux-works/3939835161/
after the beta test (short run of boards) we’ll make a larger production run of them and provide partial and possibly full kits.
watch:
http://www.netstuff.org/audio
and
http://www.amb.org/audio
for news of the LCDuino ;)
.bl
update: I have successfully linked an HDMI switch to this spdif/audio switch!
more details to follow, but the summary is: there are some hdmi switches that have an IR-remote in and you can feed TTL 38khz IR signals over this connection and remotely select input ports on the HDMI switch. to integrate, you simply add a member to the structure so that when you find the spdif port to switch to, you also get the hdmi IR code and you send that cover over the IR-out wire and that’s all that’s needed to remotely select the HDMI ‘slave’ port.
I was looking over my stuff, and realized I moved my content! Its still online here:
http://kthx.ath.cx/~jkent/hackaday/toslink_switch/
Sorry for the inconvenience.