1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * TerraTec Cinergy T2/qanu USB2 DVB-T adapter.
5 * Copyright (C) 2007 Tomi Orava (tomimo@ncircle.nullnet.fi)
7 * Based on the dvb-usb-framework code and the
8 * original Terratec Cinergy T2 driver by:
10 * Copyright (C) 2004 Daniel Mack <daniel@qanu.de> and
11 * Holger Waechtler <holger@qanu.de>
13 * Protocol Spec published on http://qanu.de/specs/terratec_cinergyT2.pdf
16 #ifndef _DVB_USB_CINERGYT2_H_
17 #define _DVB_USB_CINERGYT2_H_
19 #include <linux/usb/input.h>
21 #define DVB_USB_LOG_PREFIX "cinergyT2"
24 #define DRIVER_NAME "TerraTec/qanu USB2.0 Highspeed DVB-T Receiver"
26 extern int dvb_usb_cinergyt2_debug
;
28 #define deb_info(args...) dprintk(dvb_usb_cinergyt2_debug, 0x001, args)
29 #define deb_xfer(args...) dprintk(dvb_usb_cinergyt2_debug, 0x002, args)
30 #define deb_pll(args...) dprintk(dvb_usb_cinergyt2_debug, 0x004, args)
31 #define deb_ts(args...) dprintk(dvb_usb_cinergyt2_debug, 0x008, args)
32 #define deb_err(args...) dprintk(dvb_usb_cinergyt2_debug, 0x010, args)
33 #define deb_rc(args...) dprintk(dvb_usb_cinergyt2_debug, 0x020, args)
34 #define deb_fw(args...) dprintk(dvb_usb_cinergyt2_debug, 0x040, args)
35 #define deb_mem(args...) dprintk(dvb_usb_cinergyt2_debug, 0x080, args)
36 #define deb_uxfer(args...) dprintk(dvb_usb_cinergyt2_debug, 0x100, args)
40 enum cinergyt2_ep1_cmd
{
41 CINERGYT2_EP1_PID_TABLE_RESET
= 0x01,
42 CINERGYT2_EP1_PID_SETUP
= 0x02,
43 CINERGYT2_EP1_CONTROL_STREAM_TRANSFER
= 0x03,
44 CINERGYT2_EP1_SET_TUNER_PARAMETERS
= 0x04,
45 CINERGYT2_EP1_GET_TUNER_STATUS
= 0x05,
46 CINERGYT2_EP1_START_SCAN
= 0x06,
47 CINERGYT2_EP1_CONTINUE_SCAN
= 0x07,
48 CINERGYT2_EP1_GET_RC_EVENTS
= 0x08,
49 CINERGYT2_EP1_SLEEP_MODE
= 0x09,
50 CINERGYT2_EP1_GET_FIRMWARE_VERSION
= 0x0A
54 struct dvbt_get_status_msg
{
61 __le32 viterbi_error_rate
;
62 uint32_t rs_error_rate
;
63 __le32 uncorrected_block_count
;
65 uint8_t prev_lock_bits
;
66 } __attribute__((packed
));
69 struct dvbt_set_parameters_msg
{
75 } __attribute__((packed
));
78 extern struct dvb_frontend
*cinergyt2_fe_attach(struct dvb_usb_device
*d
);
80 #endif /* _DVB_USB_CINERGYT2_H_ */