hauppauge-wintv-cx88-ir.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. The controls for the mux are GPIO [0,1] for source, and GPIO 2 for muting.
  2. GPIO0 GPIO1
  3. 0 0 TV Audio
  4. 1 0 FM radio
  5. 0 1 Line-In
  6. 1 1 Mono tuner bypass or CD passthru (tuner specific)
  7. GPIO 16(i believe) is tied to the IR port (if present).
  8. ------------------------------------------------------------------------------------
  9. >From the data sheet:
  10. Register 24'h20004 PCI Interrupt Status
  11. bit [18] IR_SMP_INT Set when 32 input samples have been collected over
  12. gpio[16] pin into GP_SAMPLE register.
  13. What's missing from the data sheet:
  14. Setup 4KHz sampling rate (roughly 2x oversampled; good enough for our RC5
  15. compat remote)
  16. set register 0x35C050 to 0xa80a80
  17. enable sampling
  18. set register 0x35C054 to 0x5
  19. Of course, enable the IRQ bit 18 in the interrupt mask register .(and
  20. provide for a handler)
  21. GP_SAMPLE register is at 0x35C058
  22. Bits are then right shifted into the GP_SAMPLE register at the specified
  23. rate; you get an interrupt when a full DWORD is received.
  24. You need to recover the actual RC5 bits out of the (oversampled) IR sensor
  25. bits. (Hint: look for the 0/1and 1/0 crossings of the RC5 bi-phase data) An
  26. actual raw RC5 code will span 2-3 DWORDS, depending on the actual alignment.
  27. I'm pretty sure when no IR signal is present the receiver is always in a
  28. marking state(1); but stray light, etc can cause intermittent noise values
  29. as well. Remember, this is a free running sample of the IR receiver state
  30. over time, so don't assume any sample starts at any particular place.
  31. http://www.atmel.com/dyn/resources/prod_documents/doc2817.pdf
  32. This data sheet (google search) seems to have a lovely description of the
  33. RC5 basics
  34. http://www.nenya.be/beor/electronics/rc5.htm and more data
  35. http://www.ee.washington.edu/circuit_archive/text/ir_decode.txt
  36. and even a reference to how to decode a bi-phase data stream.
  37. http://www.xs4all.nl/~sbp/knowledge/ir/rc5.htm
  38. still more info