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