gp8psk.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* DVB USB compliant Linux driver for the
  2. * - GENPIX 8pks/qpsk USB2.0 DVB-S module
  3. *
  4. * Copyright (C) 2006 Alan Nisota (alannisota@gmail.com)
  5. *
  6. * Thanks to GENPIX for the sample code used to implement this module.
  7. *
  8. * This module is based off the vp7045 and vp702x modules
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License as published by the Free
  12. * Software Foundation, version 2.
  13. *
  14. * see Documentation/dvb/README.dvb-usb for more information
  15. */
  16. #ifndef _DVB_USB_GP8PSK_H_
  17. #define _DVB_USB_GP8PSK_H_
  18. #define DVB_USB_LOG_PREFIX "gp8psk"
  19. #include "dvb-usb.h"
  20. extern int dvb_usb_gp8psk_debug;
  21. #define deb_info(args...) dprintk(dvb_usb_gp8psk_debug,0x01,args)
  22. #define deb_xfer(args...) dprintk(dvb_usb_gp8psk_debug,0x02,args)
  23. #define deb_rc(args...) dprintk(dvb_usb_gp8psk_debug,0x04,args)
  24. #define deb_fe(args...) dprintk(dvb_usb_gp8psk_debug,0x08,args)
  25. /* gp8psk commands */
  26. /* Twinhan Vendor requests */
  27. #define TH_COMMAND_IN 0xC0
  28. #define TH_COMMAND_OUT 0xC1
  29. /* command bytes */
  30. #define GET_8PSK_CONFIG 0x80
  31. #define SET_8PSK_CONFIG 0x81
  32. #define ARM_TRANSFER 0x85
  33. #define TUNE_8PSK 0x86
  34. #define GET_SIGNAL_STRENGTH 0x87
  35. #define LOAD_BCM4500 0x88
  36. #define BOOT_8PSK 0x89
  37. #define START_INTERSIL 0x8A
  38. #define SET_LNB_VOLTAGE 0x8B
  39. #define SET_22KHZ_TONE 0x8C
  40. #define SEND_DISEQC_COMMAND 0x8D
  41. #define SET_DVB_MODE 0x8E
  42. #define SET_DN_SWITCH 0x8F
  43. #define GET_SIGNAL_LOCK 0x90
  44. /* Satellite modulation modes */
  45. #define ADV_MOD_DVB_QPSK 0 /* DVB-S QPSK */
  46. #define ADV_MOD_TURBO_QPSK 1 /* Turbo QPSK */
  47. #define ADV_MOD_TURBO_8PSK 2 /* Turbo 8PSK (also used for Trellis 8PSK) */
  48. #define ADV_MOD_TURBO_16QAM 3 /* Turbo 16QAM (also used for Trellis 8PSK) */
  49. #define ADV_MOD_DCII_C_QPSK 4 /* Digicipher II Combo */
  50. #define ADV_MOD_DCII_I_QPSK 5 /* Digicipher II I-stream */
  51. #define ADV_MOD_DCII_Q_QPSK 6 /* Digicipher II Q-stream */
  52. #define ADV_MOD_DCII_C_OQPSK 7 /* Digicipher II offset QPSK */
  53. #define ADV_MOD_DSS_QPSK 8 /* DSS (DIRECTV) QPSK */
  54. #define ADV_MOD_DVB_BPSK 9 /* DVB-S BPSK */
  55. #define GET_USB_SPEED 0x07
  56. #define USB_SPEED_LOW 0
  57. #define USB_SPEED_FULL 1
  58. #define USB_SPEED_HIGH 2
  59. #define RESET_FX2 0x13
  60. #define FW_VERSION_READ 0x0B
  61. #define VENDOR_STRING_READ 0x0C
  62. #define PRODUCT_STRING_READ 0x0D
  63. #define FW_BCD_VERSION_READ 0x14
  64. extern struct dvb_frontend * gp8psk_fe_attach(struct dvb_usb_device *d);
  65. extern int gp8psk_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen);
  66. extern int gp8psk_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value,
  67. u16 index, u8 *b, int blen);
  68. #endif