Root/
1 | The controls for the mux are GPIO [0,1] for source, and GPIO 2 for muting. |
2 | |
3 | GPIO0 GPIO1 |
4 | 0 0 TV Audio |
5 | 1 0 FM radio |
6 | 0 1 Line-In |
7 | 1 1 Mono tuner bypass or CD passthru (tuner specific) |
8 | |
9 | GPIO 16(i believe) is tied to the IR port (if present). |
10 | |
11 | ------------------------------------------------------------------------------------ |
12 | |
13 | >From the data sheet: |
14 | Register 24'h20004 PCI Interrupt Status |
15 | bit [18] IR_SMP_INT Set when 32 input samples have been collected over |
16 | gpio[16] pin into GP_SAMPLE register. |
17 | |
18 | What's missing from the data sheet: |
19 | |
20 | Setup 4KHz sampling rate (roughly 2x oversampled; good enough for our RC5 |
21 | compat remote) |
22 | set register 0x35C050 to 0xa80a80 |
23 | |
24 | enable sampling |
25 | set register 0x35C054 to 0x5 |
26 | |
27 | Of course, enable the IRQ bit 18 in the interrupt mask register .(and |
28 | provide for a handler) |
29 | |
30 | GP_SAMPLE register is at 0x35C058 |
31 | |
32 | Bits are then right shifted into the GP_SAMPLE register at the specified |
33 | rate; you get an interrupt when a full DWORD is received. |
34 | You need to recover the actual RC5 bits out of the (oversampled) IR sensor |
35 | bits. (Hint: look for the 0/1and 1/0 crossings of the RC5 bi-phase data) An |
36 | actual raw RC5 code will span 2-3 DWORDS, depending on the actual alignment. |
37 | |
38 | I'm pretty sure when no IR signal is present the receiver is always in a |
39 | marking state(1); but stray light, etc can cause intermittent noise values |
40 | as well. Remember, this is a free running sample of the IR receiver state |
41 | over time, so don't assume any sample starts at any particular place. |
42 | |
43 | http://www.atmel.com/dyn/resources/prod_documents/doc2817.pdf |
44 | This data sheet (google search) seems to have a lovely description of the |
45 | RC5 basics |
46 | |
47 | http://users.pandora.be/nenya/electronics/rc5/ and more data |
48 | |
49 | http://www.ee.washington.edu/circuit_archive/text/ir_decode.txt |
50 | and even a reference to how to decode a bi-phase data stream. |
51 | |
52 | http://www.xs4all.nl/~sbp/knowledge/ir/rc5.htm |
53 | still more info |
54 | |
55 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9