Path: blob/master/drivers/media/dvb/dvb-usb/cinergyT2.h
15111 views
/*1* TerraTec Cinergy T2/qanu USB2 DVB-T adapter.2*3* Copyright (C) 2007 Tomi Orava ([email protected])4*5* Based on the dvb-usb-framework code and the6* original Terratec Cinergy T2 driver by:7*8* Copyright (C) 2004 Daniel Mack <[email protected]> and9* Holger Waechtler <[email protected]>10*11* Protocol Spec published on http://qanu.de/specs/terratec_cinergyT2.pdf12*13* This program is free software; you can redistribute it and/or modify14* it under the terms of the GNU General Public License as published by15* the Free Software Foundation; either version 2 of the License, or16* (at your option) any later version.17*18* This program is distributed in the hope that it will be useful,19* but WITHOUT ANY WARRANTY; without even the implied warranty of20* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the21* GNU General Public License for more details.22*23* You should have received a copy of the GNU General Public License24* along with this program; if not, write to the Free Software25* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.26*27*/2829#ifndef _DVB_USB_CINERGYT2_H_30#define _DVB_USB_CINERGYT2_H_3132#include <linux/usb/input.h>3334#define DVB_USB_LOG_PREFIX "cinergyT2"35#include "dvb-usb.h"3637#define DRIVER_NAME "TerraTec/qanu USB2.0 Highspeed DVB-T Receiver"3839extern int dvb_usb_cinergyt2_debug;4041#define deb_info(args...) dprintk(dvb_usb_cinergyt2_debug, 0x001, args)42#define deb_xfer(args...) dprintk(dvb_usb_cinergyt2_debug, 0x002, args)43#define deb_pll(args...) dprintk(dvb_usb_cinergyt2_debug, 0x004, args)44#define deb_ts(args...) dprintk(dvb_usb_cinergyt2_debug, 0x008, args)45#define deb_err(args...) dprintk(dvb_usb_cinergyt2_debug, 0x010, args)46#define deb_rc(args...) dprintk(dvb_usb_cinergyt2_debug, 0x020, args)47#define deb_fw(args...) dprintk(dvb_usb_cinergyt2_debug, 0x040, args)48#define deb_mem(args...) dprintk(dvb_usb_cinergyt2_debug, 0x080, args)49#define deb_uxfer(args...) dprintk(dvb_usb_cinergyt2_debug, 0x100, args)50515253enum cinergyt2_ep1_cmd {54CINERGYT2_EP1_PID_TABLE_RESET = 0x01,55CINERGYT2_EP1_PID_SETUP = 0x02,56CINERGYT2_EP1_CONTROL_STREAM_TRANSFER = 0x03,57CINERGYT2_EP1_SET_TUNER_PARAMETERS = 0x04,58CINERGYT2_EP1_GET_TUNER_STATUS = 0x05,59CINERGYT2_EP1_START_SCAN = 0x06,60CINERGYT2_EP1_CONTINUE_SCAN = 0x07,61CINERGYT2_EP1_GET_RC_EVENTS = 0x08,62CINERGYT2_EP1_SLEEP_MODE = 0x09,63CINERGYT2_EP1_GET_FIRMWARE_VERSION = 0x0A64};656667struct dvbt_get_status_msg {68uint32_t freq;69uint8_t bandwidth;70uint16_t tps;71uint8_t flags;72__le16 gain;73uint8_t snr;74__le32 viterbi_error_rate;75uint32_t rs_error_rate;76__le32 uncorrected_block_count;77uint8_t lock_bits;78uint8_t prev_lock_bits;79} __attribute__((packed));808182struct dvbt_set_parameters_msg {83uint8_t cmd;84__le32 freq;85uint8_t bandwidth;86__le16 tps;87uint8_t flags;88} __attribute__((packed));899091extern struct dvb_frontend *cinergyt2_fe_attach(struct dvb_usb_device *d);9293#endif /* _DVB_USB_CINERGYT2_H_ */94959697