/elec/audio-switcher

To get this branch, use:
bzr branch http://bzr.ed.am/elec/audio-switcher

« back to all changes in this revision

Viewing changes to README

  • Committer: Tim Marston
  • Date: 2012-11-28 23:51:05 UTC
  • Revision ID: tim@ed.am-20121128235105-t82czxu8kbp3av2j
updated notes, and added control shell script

Show diffs side-by-side

added added

removed removed

1
1
ABOUT
 
2
=====
2
3
 
3
4
This is a project to provide automated control over a relay that switches
4
 
audio.
 
5
audio.  The idea being that you can automatically route line-out audio from the
 
6
computer to different locations/amps.
5
7
 
6
 
Scematics for the audio switching unit can be found in the project directory.
 
8
Schematics for the audio switching unit can be found in the project directory.
7
9
In summary, a relay is controlled to switch stereo input audio between two
8
10
outputs.  Also, one of the outputs can be overridden by plugging in some
9
 
heaphones.
 
11
headphones.
10
12
 
11
 
The software below is for a MinimusUSB and will turn it in to a USB serisl
 
13
The software below is for a MinimusUSB and will turn it in to a USB serial
12
14
device with a unique vendor and product id.  It is based on LUFA.
13
15
 
14
16
 
15
 
LUFA SETUP
 
17
BUILDING THE PROJECT
 
18
====================
 
19
 
 
20
Lufa Setup
 
21
----------
16
22
 
17
23
Download the LUFA project and unpack it in to the root directory of this
18
24
project.  Then, either rename the LUFA directory to "LUFA", or just symlink to
19
25
it (which will allow you to have several versions of the library, should you
20
 
want to).
 
26
want to).  For example,
21
27
 
22
28
  $ wget http://lufa-lib.googlecode.com/files/LUFA-120730.zip
23
29
  $ unzip LUFA-120730.zip
24
30
  $ ln -s LUFA-120730 LUFA
25
31
 
26
32
 
27
 
BUILDING THE PROJECT
 
33
Building and uploading
 
34
----------------------
28
35
 
29
36
Having unpacked LUFA, build the audio-switcher software.
30
37
 
35
42
down button B, press reset).  You can confirm it is ready with `lsusb`, which
36
43
should list the following device present:
37
44
 
38
 
  xxxxxxxxxxxxxxx
 
45
  ID 03eb:2ffa Atmel Corp.
39
46
 
40
47
Now upload the audio switcher software.
41
48
 
42
49
  $ make dfu
43
50
 
44
51
Finally, reset the MinimusUSB.  You can confirm that the software is working
45
 
with `lsusb`, which should show the following device present:
46
 
 
47
 
  xxxxxxxxxxxxxxxx
 
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.
48
73
 
49
74
 
50
75
REFERENCE
 
76
=========
51
77
 
52
78
You can find out more about the excellent LUFA project here:
53
79