1 /* DVB USB compliant Linux driver for the
2 * - GENPIX 8pks/qpsk/DCII USB2.0 DVB-S module
4 * Copyright (C) 2006 Alan Nisota (alannisota@gmail.com)
5 * Copyright (C) 2006,2007 Alan Nisota (alannisota@gmail.com)
7 * Thanks to GENPIX for the sample code used to implement this module.
9 * This module is based off the vp7045 and vp702x modules
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the Free
13 * Software Foundation, version 2.
15 * see Documentation/dvb/README.dvb-usb for more information
17 #ifndef _DVB_USB_GP8PSK_H_
18 #define _DVB_USB_GP8PSK_H_
20 #define DVB_USB_LOG_PREFIX "gp8psk"
23 extern int dvb_usb_gp8psk_debug
;
24 #define deb_info(args...) dprintk(dvb_usb_gp8psk_debug,0x01,args)
25 #define deb_xfer(args...) dprintk(dvb_usb_gp8psk_debug,0x02,args)
26 #define deb_rc(args...) dprintk(dvb_usb_gp8psk_debug,0x04,args)
27 #define deb_fe(args...) dprintk(dvb_usb_gp8psk_debug,0x08,args)
30 /* Twinhan Vendor requests */
31 #define TH_COMMAND_IN 0xC0
32 #define TH_COMMAND_OUT 0xC1
36 #define GET_8PSK_CONFIG 0x80 /* in */
37 #define SET_8PSK_CONFIG 0x81
38 #define I2C_WRITE 0x83
40 #define ARM_TRANSFER 0x85
41 #define TUNE_8PSK 0x86
42 #define GET_SIGNAL_STRENGTH 0x87 /* in */
43 #define LOAD_BCM4500 0x88
44 #define BOOT_8PSK 0x89 /* in */
45 #define START_INTERSIL 0x8A /* in */
46 #define SET_LNB_VOLTAGE 0x8B
47 #define SET_22KHZ_TONE 0x8C
48 #define SEND_DISEQC_COMMAND 0x8D
49 #define SET_DVB_MODE 0x8E
50 #define SET_DN_SWITCH 0x8F
51 #define GET_SIGNAL_LOCK 0x90 /* in */
52 #define GET_SERIAL_NUMBER 0x93 /* in */
53 #define USE_EXTRA_VOLT 0x94
54 #define CW3K_INIT 0x9d
56 /* PSK_configuration bits */
57 #define bm8pskStarted 0x01
58 #define bm8pskFW_Loaded 0x02
59 #define bmIntersilOn 0x04
60 #define bmDVBmode 0x08
63 #define bmDCtuned 0x40
66 /* Satellite modulation modes */
67 #define ADV_MOD_DVB_QPSK 0 /* DVB-S QPSK */
68 #define ADV_MOD_TURBO_QPSK 1 /* Turbo QPSK */
69 #define ADV_MOD_TURBO_8PSK 2 /* Turbo 8PSK (also used for Trellis 8PSK) */
70 #define ADV_MOD_TURBO_16QAM 3 /* Turbo 16QAM (also used for Trellis 8PSK) */
72 #define ADV_MOD_DCII_C_QPSK 4 /* Digicipher II Combo */
73 #define ADV_MOD_DCII_I_QPSK 5 /* Digicipher II I-stream */
74 #define ADV_MOD_DCII_Q_QPSK 6 /* Digicipher II Q-stream */
75 #define ADV_MOD_DCII_C_OQPSK 7 /* Digicipher II offset QPSK */
76 #define ADV_MOD_DSS_QPSK 8 /* DSS (DIRECTV) QPSK */
77 #define ADV_MOD_DVB_BPSK 9 /* DVB-S BPSK */
79 #define GET_USB_SPEED 0x07
80 #define USB_SPEED_LOW 0
81 #define USB_SPEED_FULL 1
82 #define USB_SPEED_HIGH 2
84 #define RESET_FX2 0x13
86 #define FW_VERSION_READ 0x0B
87 #define VENDOR_STRING_READ 0x0C
88 #define PRODUCT_STRING_READ 0x0D
89 #define FW_BCD_VERSION_READ 0x14
91 extern struct dvb_frontend
* gp8psk_fe_attach(struct dvb_usb_device
*d
);
92 extern int gp8psk_usb_in_op(struct dvb_usb_device
*d
, u8 req
, u16 value
, u16 index
, u8
*b
, int blen
);
93 extern int gp8psk_usb_out_op(struct dvb_usb_device
*d
, u8 req
, u16 value
,
94 u16 index
, u8
*b
, int blen
);
95 extern int gp8psk_bcm4500_reload(struct dvb_usb_device
*d
);