dtt200u.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* Common header file of Linux driver for the Yakumo/Hama/Typhoon DVB-T
  2. * USB2.0 receiver.
  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. #define DVB_USB_LOG_PREFIX "dtt200u"
  15. #include "dvb-usb.h"
  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. /* guessed protocol description (reverse engineered):
  20. * read
  21. * 00 - USB type 0x02 for usb2.0, 0x01 for usb1.1
  22. * 81 - <TS_LOCK> <current frequency divided by 250000>
  23. * 82 - crash - do not touch
  24. * 83 - crash - do not touch
  25. * 84 - remote control
  26. * 85 - crash - do not touch (OK, stop testing here)
  27. * 88 - locking 2 bytes (0x80 0x40 == no signal, 0x89 0x20 == nice signal)
  28. * 89 - noise-to-signal
  29. * 8a - unkown 1 byte - signal_strength
  30. * 8c - ber ???
  31. * 8d - ber
  32. * 8e - unc
  33. */
  34. #define GET_SPEED 0x00
  35. #define GET_TUNE_STAT 0x81
  36. #define GET_RC_KEY 0x84
  37. #define GET_STATUS 0x88
  38. #define GET_SNR 0x89
  39. #define GET_SIG_STRENGTH 0x8a
  40. #define GET_UNK 0x8c
  41. #define GET_BER 0x8d
  42. #define GET_UNC 0x8e
  43. /* write
  44. * 01 - reset the demod
  45. * 02 - frequency (divided by 250000)
  46. * 03 - bandwidth
  47. * 04 - pid table (index pid(7:0) pid(12:8))
  48. * 05 - reset the pid table
  49. * 08 - demod transfer enabled or not (FX2 transfer is enabled by default)
  50. */
  51. #define RESET_DEMOD 0x01
  52. #define SET_FREQUENCY 0x02
  53. #define SET_BANDWIDTH 0x03
  54. #define SET_PID_FILTER 0x04
  55. #define RESET_PID_FILTER 0x05
  56. #define SET_TS_CTRL 0x08
  57. extern struct dvb_frontend * dtt200u_fe_attach(struct dvb_usb_device *d);
  58. #endif