root/drivers/media/usb/dvb-usb/digitv.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


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

/* [<][>][^][v][top][bottom][index][help] */