4
This is a project to provide automated control over a relay that switches
5
audio. The idea being that you can automatically route line-out audio from the
6
computer to different locations/amps.
8
Schematics for the audio switching unit can be found in the project directory.
9
In summary, a relay is controlled to switch stereo input audio between two
10
outputs. Also, one of the outputs can be overridden by plugging in some
13
The software below is for a MinimusUSB and will turn it in to a USB serial
14
device with a unique vendor and product id. It is based on LUFA.
23
Download the LUFA project and unpack it in to the root directory of this
24
project. Then, either rename the LUFA directory to "LUFA", or just symlink to
25
it (which will allow you to have several versions of the library, should you
26
want to). For example,
28
$ wget http://lufa-lib.googlecode.com/files/LUFA-120730.zip
29
$ unzip LUFA-120730.zip
30
$ ln -s LUFA-120730 LUFA
33
Building and uploading
34
----------------------
36
Having unpacked LUFA, build the audio-switcher software.
41
Then, plug in your MinimusUSB, put it in to DFU upload mode (whilst holding
42
down button B, press reset). You can confirm it is ready with `lsusb`, which
43
should list the following device present:
45
ID 03eb:2ffa Atmel Corp.
47
Now upload the audio switcher software.
51
Finally, reset the MinimusUSB. You can confirm that the software is working
52
with `lsusb`, which should show the following device present (note the product
55
ID 03eb:ba7f Atmel Corp.
61
The audio switcher is a serial device. To turn the audio switcher on and off,
62
you can connect to the serial device and send commands (followed by a newline).
63
The following commands are supported:
67
? - query state of relay (returns a 0 or 1)
70
You can also use the `audio-switch` shell script included in this project,
71
which finds the correct serial device to talk to and has a nice command-line
78
You can find out more about the excellent LUFA project here:
80
http://www.fourwalledcubicle.com/LUFA.php