/elec/audio-switcher

To get this branch, use:
bzr branch http://bzr.ed.am/elec/audio-switcher
2 by Tim Marston
wrote README and renamed NOTES
1
ABOUT
8 by Tim Marston
updated notes, and added control shell script
2
=====
2 by Tim Marston
wrote README and renamed NOTES
3
4
This is a project to provide automated control over a relay that switches
8 by Tim Marston
updated notes, and added control shell script
5
audio.  The idea being that you can automatically route line-out audio from the
6
computer to different locations/amps.
2 by Tim Marston
wrote README and renamed NOTES
7
8 by Tim Marston
updated notes, and added control shell script
8
Schematics for the audio switching unit can be found in the project directory.
2 by Tim Marston
wrote README and renamed NOTES
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
8 by Tim Marston
updated notes, and added control shell script
11
headphones.
2 by Tim Marston
wrote README and renamed NOTES
12
8 by Tim Marston
updated notes, and added control shell script
13
The software below is for a MinimusUSB and will turn it in to a USB serial
2 by Tim Marston
wrote README and renamed NOTES
14
device with a unique vendor and product id.  It is based on LUFA.
15
16
8 by Tim Marston
updated notes, and added control shell script
17
BUILDING THE PROJECT
18
====================
19
20
Lufa Setup
21
----------
2 by Tim Marston
wrote README and renamed NOTES
22
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
8 by Tim Marston
updated notes, and added control shell script
26
want to).  For example,
2 by Tim Marston
wrote README and renamed NOTES
27
28
  $ wget http://lufa-lib.googlecode.com/files/LUFA-120730.zip
29
  $ unzip LUFA-120730.zip
30
  $ ln -s LUFA-120730 LUFA
31
32
8 by Tim Marston
updated notes, and added control shell script
33
Building and uploading
34
----------------------
2 by Tim Marston
wrote README and renamed NOTES
35
36
Having unpacked LUFA, build the audio-switcher software.
37
38
  $ cd src
39
  $ make
40
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:
44
8 by Tim Marston
updated notes, and added control shell script
45
  ID 03eb:2ffa Atmel Corp.
2 by Tim Marston
wrote README and renamed NOTES
46
47
Now upload the audio switcher software.
48
49
  $ make dfu
50
51
Finally, reset the MinimusUSB.  You can confirm that the software is working
8 by Tim Marston
updated notes, and added control shell script
52
with `lsusb`, which should show the following device present (note the product
53
id is different):
54
55
  ID 03eb:ba7f Atmel Corp.
56
57
58
CONTROL
59
=======
60
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:
64
65
  0  - turn relay off
66
  1  - turn relay on
67
  ?  - query state of relay (returns a 0 or 1)
68
  .	 - toggle relay
69
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
72
interface.
2 by Tim Marston
wrote README and renamed NOTES
73
74
75
REFERENCE
8 by Tim Marston
updated notes, and added control shell script
76
=========
2 by Tim Marston
wrote README and renamed NOTES
77
78
You can find out more about the excellent LUFA project here:
79
80
  http://www.fourwalledcubicle.com/LUFA.php