David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 2 | /* Common header file of Linux driver for the WideView/ Yakumo/ Hama/ |
| 3 | * Typhoon/ Yuan DVB-T USB2.0 receiver. |
| 4 | * |
| 5 | * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de) |
| 6 | * |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 7 | * see Documentation/media/dvb-drivers/dvb-usb.rst for more information |
| 8 | */ |
| 9 | #ifndef _DVB_USB_DTT200U_H_ |
| 10 | #define _DVB_USB_DTT200U_H_ |
| 11 | |
| 12 | #define DVB_USB_LOG_PREFIX "dtt200u" |
| 13 | |
| 14 | #include "dvb-usb.h" |
| 15 | |
| 16 | extern int dvb_usb_dtt200u_debug; |
| 17 | #define deb_info(args...) dprintk(dvb_usb_dtt200u_debug,0x01,args) |
| 18 | #define deb_xfer(args...) dprintk(dvb_usb_dtt200u_debug,0x02,args) |
| 19 | |
| 20 | /* guessed protocol description (reverse engineered): |
| 21 | * read |
| 22 | * 00 - USB type 0x02 for usb2.0, 0x01 for usb1.1 |
| 23 | * 88 - locking 2 bytes (0x80 0x40 == no signal, 0x89 0x20 == nice signal) |
| 24 | */ |
| 25 | |
| 26 | #define GET_SPEED 0x00 |
| 27 | #define GET_TUNE_STATUS 0x81 |
| 28 | #define GET_RC_CODE 0x84 |
| 29 | #define GET_CONFIGURATION 0x88 |
| 30 | #define GET_AGC 0x89 |
| 31 | #define GET_SNR 0x8a |
| 32 | #define GET_VIT_ERR_CNT 0x8c |
| 33 | #define GET_RS_ERR_CNT 0x8d |
| 34 | #define GET_RS_UNCOR_BLK_CNT 0x8e |
| 35 | |
| 36 | /* write |
| 37 | * 01 - init |
| 38 | * 02 - frequency (divided by 250000) |
| 39 | * 03 - bandwidth |
| 40 | * 04 - pid table (index pid(7:0) pid(12:8)) |
| 41 | * 05 - reset the pid table |
| 42 | * 08 - transfer switch |
| 43 | */ |
| 44 | |
| 45 | #define SET_INIT 0x01 |
| 46 | #define SET_RF_FREQ 0x02 |
| 47 | #define SET_BANDWIDTH 0x03 |
| 48 | #define SET_PID_FILTER 0x04 |
| 49 | #define RESET_PID_FILTER 0x05 |
| 50 | #define SET_STREAMING 0x08 |
| 51 | |
| 52 | extern struct dvb_frontend * dtt200u_fe_attach(struct dvb_usb_device *d); |
| 53 | |
| 54 | #endif |