1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26#ifndef _DVB_USB_CINERGYT2_H_
27#define _DVB_USB_CINERGYT2_H_
28
29#include <linux/usb/input.h>
30
31#define DVB_USB_LOG_PREFIX "cinergyT2"
32#include "dvb-usb.h"
33
34#define DRIVER_NAME "TerraTec/qanu USB2.0 Highspeed DVB-T Receiver"
35
36extern int dvb_usb_cinergyt2_debug;
37
38#define deb_info(args...) dprintk(dvb_usb_cinergyt2_debug, 0x001, args)
39#define deb_xfer(args...) dprintk(dvb_usb_cinergyt2_debug, 0x002, args)
40#define deb_pll(args...) dprintk(dvb_usb_cinergyt2_debug, 0x004, args)
41#define deb_ts(args...) dprintk(dvb_usb_cinergyt2_debug, 0x008, args)
42#define deb_err(args...) dprintk(dvb_usb_cinergyt2_debug, 0x010, args)
43#define deb_rc(args...) dprintk(dvb_usb_cinergyt2_debug, 0x020, args)
44#define deb_fw(args...) dprintk(dvb_usb_cinergyt2_debug, 0x040, args)
45#define deb_mem(args...) dprintk(dvb_usb_cinergyt2_debug, 0x080, args)
46#define deb_uxfer(args...) dprintk(dvb_usb_cinergyt2_debug, 0x100, args)
47
48
49
50enum cinergyt2_ep1_cmd {
51 CINERGYT2_EP1_PID_TABLE_RESET = 0x01,
52 CINERGYT2_EP1_PID_SETUP = 0x02,
53 CINERGYT2_EP1_CONTROL_STREAM_TRANSFER = 0x03,
54 CINERGYT2_EP1_SET_TUNER_PARAMETERS = 0x04,
55 CINERGYT2_EP1_GET_TUNER_STATUS = 0x05,
56 CINERGYT2_EP1_START_SCAN = 0x06,
57 CINERGYT2_EP1_CONTINUE_SCAN = 0x07,
58 CINERGYT2_EP1_GET_RC_EVENTS = 0x08,
59 CINERGYT2_EP1_SLEEP_MODE = 0x09,
60 CINERGYT2_EP1_GET_FIRMWARE_VERSION = 0x0A
61};
62
63
64struct dvbt_get_status_msg {
65 uint32_t freq;
66 uint8_t bandwidth;
67 uint16_t tps;
68 uint8_t flags;
69 __le16 gain;
70 uint8_t snr;
71 __le32 viterbi_error_rate;
72 uint32_t rs_error_rate;
73 __le32 uncorrected_block_count;
74 uint8_t lock_bits;
75 uint8_t prev_lock_bits;
76} __attribute__((packed));
77
78
79struct dvbt_set_parameters_msg {
80 uint8_t cmd;
81 __le32 freq;
82 uint8_t bandwidth;
83 __le16 tps;
84 uint8_t flags;
85} __attribute__((packed));
86
87
88extern struct dvb_frontend *cinergyt2_fe_attach(struct dvb_usb_device *d);
89
90#endif
91
92