Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 1 | #ifndef _DVB_USB_DIGITV_H_ |
| 2 | #define _DVB_USB_DIGITV_H_ |
| 3 | |
| 4 | #define DVB_USB_LOG_PREFIX "digitv" |
| 5 | #include "dvb-usb.h" |
| 6 | |
Trent Piepho | 4ce1567 | 2007-06-02 16:30:46 -0300 | [diff] [blame^] | 7 | struct digitv_state { |
| 8 | int is_nxt6000; |
| 9 | }; |
| 10 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 11 | extern int dvb_usb_digitv_debug; |
| 12 | #define deb_rc(args...) dprintk(dvb_usb_digitv_debug,0x01,args) |
| 13 | |
| 14 | /* protocol (from usblogging and the SDK: |
| 15 | * |
| 16 | * Always 7 bytes bulk message(s) for controlling |
| 17 | * |
| 18 | * First byte describes the command. Reads are 2 consecutive transfer (as always). |
| 19 | * |
| 20 | * General structure: |
| 21 | * |
| 22 | * write or first message of a read: |
| 23 | * <cmdbyte> VV <len> B0 B1 B2 B3 |
| 24 | * |
| 25 | * second message of a read |
| 26 | * <cmdbyte> VV <len> R0 R1 R2 R3 |
| 27 | * |
| 28 | * whereas 0 < len <= 4 |
| 29 | * |
| 30 | * I2C address is stored somewhere inside the device. |
| 31 | * |
| 32 | * 0x01 read from EEPROM |
| 33 | * VV = offset; B* = 0; R* = value(s) |
| 34 | * |
| 35 | * 0x02 read register of the COFDM |
| 36 | * VV = register; B* = 0; R* = value(s) |
| 37 | * |
| 38 | * 0x05 write register of the COFDM |
| 39 | * VV = register; B* = value(s); |
| 40 | * |
| 41 | * 0x06 write to the tuner (only for NXT6000) |
| 42 | * VV = 0; B* = PLL data; len = 4; |
| 43 | * |
| 44 | * 0x03 read remote control |
| 45 | * VV = 0; B* = 0; len = 4; R* = key |
| 46 | * |
| 47 | * 0x07 write to the remote (don't know why one should this, resetting ?) |
| 48 | * VV = 0; B* = key; len = 4; |
| 49 | * |
| 50 | * 0x08 write remote type |
| 51 | * VV = 0; B[0] = 0x01, len = 4 |
| 52 | * |
| 53 | * 0x09 write device init |
| 54 | * TODO |
| 55 | */ |
| 56 | #define USB_READ_EEPROM 1 |
| 57 | |
| 58 | #define USB_READ_COFDM 2 |
| 59 | #define USB_WRITE_COFDM 5 |
| 60 | |
| 61 | #define USB_WRITE_TUNER 6 |
| 62 | |
| 63 | #define USB_READ_REMOTE 3 |
| 64 | #define USB_WRITE_REMOTE 7 |
| 65 | #define USB_WRITE_REMOTE_TYPE 8 |
| 66 | |
| 67 | #define USB_DEV_INIT 9 |
| 68 | |
| 69 | #endif |