GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / Documentation / video4linux / hauppauge-wintv-cx88-ir.txt
bloba2fd363c40c8243f99ac40858fe5d451e301b54e
1 The controls for the mux are GPIO [0,1] for source, and GPIO 2 for muting.
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)
9 GPIO 16(i believe) is tied to the IR port (if present).
11 ------------------------------------------------------------------------------------
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.
18 What's missing from the data sheet:
20 Setup 4KHz sampling rate (roughly 2x oversampled; good enough for our RC5
21 compat remote)
22 set register 0x35C050 to  0xa80a80
24 enable sampling
25 set register 0x35C054 to 0x5
27 Of course, enable the IRQ bit 18 in the interrupt mask register .(and
28 provide for a handler)
30 GP_SAMPLE register is at 0x35C058
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.
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.
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
47 http://www.nenya.be/beor/electronics/rc5.htm and more data
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.
52 http://www.xs4all.nl/~sbp/knowledge/ir/rc5.htm
53 still more info