gp8psk.h 3.8 KB

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