18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* Common header file of Linux driver for the WideView/ Yakumo/ Hama/ 38c2ecf20Sopenharmony_ci * Typhoon/ Yuan DVB-T USB2.0 receiver. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de) 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * see Documentation/driver-api/media/drivers/dvb-usb.rst for more information 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci#ifndef _DVB_USB_DTT200U_H_ 108c2ecf20Sopenharmony_ci#define _DVB_USB_DTT200U_H_ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#define DVB_USB_LOG_PREFIX "dtt200u" 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#include "dvb-usb.h" 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciextern int dvb_usb_dtt200u_debug; 178c2ecf20Sopenharmony_ci#define deb_info(args...) dprintk(dvb_usb_dtt200u_debug,0x01,args) 188c2ecf20Sopenharmony_ci#define deb_xfer(args...) dprintk(dvb_usb_dtt200u_debug,0x02,args) 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci/* guessed protocol description (reverse engineered): 218c2ecf20Sopenharmony_ci * read 228c2ecf20Sopenharmony_ci * 00 - USB type 0x02 for usb2.0, 0x01 for usb1.1 238c2ecf20Sopenharmony_ci * 88 - locking 2 bytes (0x80 0x40 == no signal, 0x89 0x20 == nice signal) 248c2ecf20Sopenharmony_ci */ 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define GET_SPEED 0x00 278c2ecf20Sopenharmony_ci#define GET_TUNE_STATUS 0x81 288c2ecf20Sopenharmony_ci#define GET_RC_CODE 0x84 298c2ecf20Sopenharmony_ci#define GET_CONFIGURATION 0x88 308c2ecf20Sopenharmony_ci#define GET_AGC 0x89 318c2ecf20Sopenharmony_ci#define GET_SNR 0x8a 328c2ecf20Sopenharmony_ci#define GET_VIT_ERR_CNT 0x8c 338c2ecf20Sopenharmony_ci#define GET_RS_ERR_CNT 0x8d 348c2ecf20Sopenharmony_ci#define GET_RS_UNCOR_BLK_CNT 0x8e 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci/* write 378c2ecf20Sopenharmony_ci * 01 - init 388c2ecf20Sopenharmony_ci * 02 - frequency (divided by 250000) 398c2ecf20Sopenharmony_ci * 03 - bandwidth 408c2ecf20Sopenharmony_ci * 04 - pid table (index pid(7:0) pid(12:8)) 418c2ecf20Sopenharmony_ci * 05 - reset the pid table 428c2ecf20Sopenharmony_ci * 08 - transfer switch 438c2ecf20Sopenharmony_ci */ 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci#define SET_INIT 0x01 468c2ecf20Sopenharmony_ci#define SET_RF_FREQ 0x02 478c2ecf20Sopenharmony_ci#define SET_BANDWIDTH 0x03 488c2ecf20Sopenharmony_ci#define SET_PID_FILTER 0x04 498c2ecf20Sopenharmony_ci#define RESET_PID_FILTER 0x05 508c2ecf20Sopenharmony_ci#define SET_STREAMING 0x08 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ciextern struct dvb_frontend * dtt200u_fe_attach(struct dvb_usb_device *d); 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci#endif 55