dtt200u.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  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 ([email protected])
  6. *
  7. * see Documentation/driver-api/media/drivers/dvb-usb.rst for more information
  8. */
  9. #ifndef _DVB_USB_DTT200U_H_
  10. #define _DVB_USB_DTT200U_H_
  11. #define DVB_USB_LOG_PREFIX "dtt200u"
  12. #include "dvb-usb.h"
  13. extern int dvb_usb_dtt200u_debug;
  14. #define deb_info(args...) dprintk(dvb_usb_dtt200u_debug,0x01,args)
  15. #define deb_xfer(args...) dprintk(dvb_usb_dtt200u_debug,0x02,args)
  16. /* guessed protocol description (reverse engineered):
  17. * read
  18. * 00 - USB type 0x02 for usb2.0, 0x01 for usb1.1
  19. * 88 - locking 2 bytes (0x80 0x40 == no signal, 0x89 0x20 == nice signal)
  20. */
  21. #define GET_SPEED 0x00
  22. #define GET_TUNE_STATUS 0x81
  23. #define GET_RC_CODE 0x84
  24. #define GET_CONFIGURATION 0x88
  25. #define GET_AGC 0x89
  26. #define GET_SNR 0x8a
  27. #define GET_VIT_ERR_CNT 0x8c
  28. #define GET_RS_ERR_CNT 0x8d
  29. #define GET_RS_UNCOR_BLK_CNT 0x8e
  30. /* write
  31. * 01 - init
  32. * 02 - frequency (divided by 250000)
  33. * 03 - bandwidth
  34. * 04 - pid table (index pid(7:0) pid(12:8))
  35. * 05 - reset the pid table
  36. * 08 - transfer switch
  37. */
  38. #define SET_INIT 0x01
  39. #define SET_RF_FREQ 0x02
  40. #define SET_BANDWIDTH 0x03
  41. #define SET_PID_FILTER 0x04
  42. #define RESET_PID_FILTER 0x05
  43. #define SET_STREAMING 0x08
  44. extern struct dvb_frontend * dtt200u_fe_attach(struct dvb_usb_device *d);
  45. #endif