dib0700.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* Linux driver for devices based on the DiBcom DiB0700 USB bridge
  2. *
  3. * This program is free software; you can redistribute it and/or modify it
  4. * under the terms of the GNU General Public License as published by the Free
  5. * Software Foundation, version 2.
  6. *
  7. * Copyright (C) 2005-6 DiBcom, SA
  8. */
  9. #ifndef _DIB0700_H_
  10. #define _DIB0700_H_
  11. #define DVB_USB_LOG_PREFIX "dib0700"
  12. #include "dvb-usb.h"
  13. #include "dib07x0.h"
  14. extern int dvb_usb_dib0700_debug;
  15. #define deb_info(args...) dprintk(dvb_usb_dib0700_debug,0x01,args)
  16. #define deb_fw(args...) dprintk(dvb_usb_dib0700_debug,0x02,args)
  17. #define deb_fwdata(args...) dprintk(dvb_usb_dib0700_debug,0x04,args)
  18. #define deb_data(args...) dprintk(dvb_usb_dib0700_debug,0x08,args)
  19. #define REQUEST_I2C_READ 0x2
  20. #define REQUEST_I2C_WRITE 0x3
  21. #define REQUEST_POLL_RC 0x4
  22. #define REQUEST_JUMPRAM 0x8
  23. #define REQUEST_SET_GPIO 0xC
  24. #define REQUEST_ENABLE_VIDEO 0xF
  25. // 1 Byte: 4MSB(1 = enable streaming, 0 = disable streaming) 4LSB(Video Mode: 0 = MPEG2 188Bytes, 1 = Analog)
  26. // 2 Byte: MPEG2 mode: 4MSB(1 = Master Mode, 0 = Slave Mode) 4LSB(Channel 1 = bit0, Channel 2 = bit1)
  27. // 2 Byte: Analog mode: 4MSB(0 = 625 lines, 1 = 525 lines) 4LSB( " " )
  28. struct dib0700_state {
  29. u8 channel_state;
  30. u16 mt2060_if1[2];
  31. };
  32. extern int dib0700_set_gpio(struct dvb_usb_device *, enum dib07x0_gpios gpio, u8 gpio_dir, u8 gpio_val);
  33. extern int dib0700_download_firmware(struct usb_device *udev, const struct firmware *fw);
  34. extern int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff);
  35. extern struct i2c_algorithm dib0700_i2c_algo;
  36. extern int dib0700_identify_state(struct usb_device *udev, struct dvb_usb_device_properties *props,
  37. struct dvb_usb_device_description **desc, int *cold);
  38. extern int dib0700_device_count;
  39. extern struct dvb_usb_device_properties dib0700_devices[];
  40. extern struct usb_device_id dib0700_usb_id_table[];
  41. #endif