Patrick Boettcher | fb41f5a | 2005-07-07 17:58:23 -0700 | [diff] [blame^] | 1 | /* Common header file of Linux driver for the WideView/ Yakumo/ Hama/ |
| 2 | * Typhoon/ Yuan DVB-T USB2.0 receiver. |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@desy.de) |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms of the GNU General Public License as published by the Free |
| 8 | * Software Foundation, version 2. |
| 9 | * |
| 10 | * see Documentation/dvb/README.dvb-usb for more information |
| 11 | */ |
| 12 | #ifndef _DVB_USB_DTT200U_H_ |
| 13 | #define _DVB_USB_DTT200U_H_ |
| 14 | |
| 15 | #define DVB_USB_LOG_PREFIX "dtt200u" |
| 16 | #include "dvb-usb.h" |
| 17 | |
| 18 | extern int dvb_usb_dtt200u_debug; |
| 19 | #define deb_info(args...) dprintk(dvb_usb_dtt200u_debug,0x01,args) |
| 20 | #define deb_xfer(args...) dprintk(dvb_usb_dtt200u_debug,0x02,args) |
| 21 | |
| 22 | /* guessed protocol description (reverse engineered): |
| 23 | * read |
| 24 | * 00 - USB type 0x02 for usb2.0, 0x01 for usb1.1 |
| 25 | * 81 - <TS_LOCK> <current frequency divided by 250000> |
| 26 | * 82 - crash - do not touch |
| 27 | * 83 - crash - do not touch |
| 28 | * 84 - remote control |
| 29 | * 85 - crash - do not touch (OK, stop testing here) |
| 30 | * 88 - locking 2 bytes (0x80 0x40 == no signal, 0x89 0x20 == nice signal) |
| 31 | * 89 - noise-to-signal |
| 32 | * 8a - unkown 1 byte - signal_strength |
| 33 | * 8c - ber ??? |
| 34 | * 8d - ber |
| 35 | * 8e - unc |
| 36 | */ |
| 37 | |
| 38 | #define GET_SPEED 0x00 |
| 39 | #define GET_TUNE_STAT 0x81 |
| 40 | #define GET_RC_KEY 0x84 |
| 41 | #define GET_STATUS 0x88 |
| 42 | #define GET_SNR 0x89 |
| 43 | #define GET_SIG_STRENGTH 0x8a |
| 44 | #define GET_UNK 0x8c |
| 45 | #define GET_BER 0x8d |
| 46 | #define GET_UNC 0x8e |
| 47 | |
| 48 | /* write |
| 49 | * 01 - reset the demod |
| 50 | * 02 - frequency (divided by 250000) |
| 51 | * 03 - bandwidth |
| 52 | * 04 - pid table (index pid(7:0) pid(12:8)) |
| 53 | * 05 - reset the pid table |
| 54 | * 08 - demod transfer enabled or not (FX2 transfer is enabled by default) |
| 55 | */ |
| 56 | |
| 57 | #define RESET_DEMOD 0x01 |
| 58 | #define SET_FREQUENCY 0x02 |
| 59 | #define SET_BANDWIDTH 0x03 |
| 60 | #define SET_PID_FILTER 0x04 |
| 61 | #define RESET_PID_FILTER 0x05 |
| 62 | #define SET_TS_CTRL 0x08 |
| 63 | |
| 64 | extern struct dvb_frontend * dtt200u_fe_attach(struct dvb_usb_device *d); |
| 65 | |
| 66 | #endif |