Auto TOSLINK switch
Introduction
A lot of AV devices have digital audio outputs. I always prefer digital transmission of audio feed over analog. The problem is the limited amount of input ports on audio receivers/sound bars. In order to benefit of the best audio quality from all my AV devices without having to swap cables(and slowly wear off plastic TOSLINK connectors), I decided to integrate a switcher device in my multimedia setup.
I began to search for already made devices. At the time (2012), the only reasonnably priced device I found was a mechanical switch. Not that great. There were some digital switcher devices available but they were prohibitively expensive. Being not satisfied of the solutions offered, I decided to create my own.
The switcher has the following characteristics:
-
4 input ports
-
2 ouput ports
-
Priority-based automatic input switching
-
User-configurable inputs priority
-
Manual input switching override
-
Enable/Disable inputs
-
USB updateable firmware
-
Expansion port for future addons
-
Open source hardware and software
Usage
Connect audio emitting devices in input ports and audio receivers to output ports. Output ports both output the same audio feed.
There are 4 dual LEDs that indicates in RED which channel is routed to the output ports. Input ports with valid signal detected have their corresponding green LED lit.
The device can be controlled using the 2 push buttons on the front side of the device :
-
AUTO/MAN
-
CHAN
In normal operating mode, AUTO/MAN button switch input switching between automatic and manual. The CHAN button switch which input is routed to the outputs.
When in automatic mode, inputs are switched to the highest priority inputs with a valid signal detected.
If the CHAN button is pressed in automatic mode, the next input(in numerical order) with a valid signal detected will be selected. Automatic switching will be suspended until currently selected input turns invalid.
When in manual mode, pressing the CHAN button changes input channel in a circular motion, regardless of signal detection.
The device can be configured to change inputs priorities or enable/disable inputs. To enter configuration mode, press and hold the CHAN button for roughly 5 seconds. The AUTO LED will start continously blinking.
In configuration mode, the selected channel's priority value is represented by the number of green LEDs being ON. No green LED lit is lowest priority possible while 3 green LEDs lit is the highest.
Press the AUTO button to cycle priority value.
Press the CHAN button to change input to be configured.
Press the AUTO button for rougly 5 second to toggle channel activation. When the channel is disabled, the red LED will continously blink with a brief ON time.
To exit configuration mode, press and hold the CHAN button for rougly 5 seconds. The AUTO LED will stop blinking. At that point, the settings will be saved to be persisted across power cycles.
To reset to factory settings, press and hold the AUTO button for about 15 seconds, until the AUTO LED blinks 3 times. Factory settings are as follow:
-
Channels are prioritized from 1 being the less prioritzed to the 4th being the most
-
All 4 input channels are enabled
Firmware update
The TOSLINK switcher can be updated easily without the need of an external programmer. A modified Diolan-plus2 bootloader is used. Diolan bootloader is a USB HID bootloader. It does not require any driver to work. The command line fw_update is necessary to upload a hex file.
To set the TOSLINK switcher in bootloader mode, you must power it ON while pressing the CHAN push button. If done successfully, the AUTO LED will continuously blink rapidly and a HID compliant device will be detected on your PC.