Audio optical cable electronic switch
Very simple to do. Toslink, the optical audio interface is very easy to work with on a physical layer. It is a TTL voltage level, three wire interface (power, data and ground, and you only need to switch the data wire). All you need is the connectors to change from optical to electrical (1 transmitter, n number of receivers), a few passive caps and chokes, a power supply (5v) and a multiplexer/bus switch. Since this is a digital signal, there is no quality loss.

This post on this thread over on HeadFi shows a bare bones toslink switcher.



The Multiplexer uses two pins to switch the inputs, and you can connect these to physical switches, or a microcontroller.