/*
- tm6000.h - driver for TM5600/TM6000 USB video capture devices
+ tm6000.h - driver for TM5600/TM6000/TM6010 USB video capture devices
Copyright (C) 2006-2007 Mauro Carvalho Chehab <mchehab@infradead.org>
#include "dvb_frontend.h"
#include "dmxdev.h"
-#define TM6000_VERSION KERNEL_VERSION(0, 0, 1)
+#define TM6000_VERSION KERNEL_VERSION(0, 0, 2)
/* Inputs */
TM6000_MODE_DIGITAL,
};
+struct tm6000_gpio {
+ int tuner_reset;
+ int tuner_on;
+ int demod_reset;
+ int demod_on;
+ int power_led;
+ int dvb_led;
+ int ir;
+};
+
struct tm6000_capabilities {
unsigned int has_tuner:1;
unsigned int has_tda9874:1;
struct mutex mutex;
};
+struct tm6000_endpoint {
+ struct usb_host_endpoint *endp;
+ __u8 bInterfaceNumber;
+ __u8 bAlternateSetting;
+ unsigned maxsize;
+};
+
struct tm6000_core {
/* generic device properties */
char name[30]; /* name (including minor) of the device */
/* Tuner configuration */
int tuner_type; /* type of the tuner */
int tuner_addr; /* tuner address */
- int tuner_reset_gpio; /* GPIO used for tuner reset */
+
+ struct tm6000_gpio gpio;
/* Demodulator configuration */
int demod_addr; /* demodulator address */
/* usb transfer */
struct usb_device *udev; /* the usb device */
- struct usb_host_endpoint *bulk_in, *bulk_out, *isoc_in, *isoc_out;
- unsigned int max_bulk_in, max_bulk_out;
- unsigned int max_isoc_in, max_isoc_out;
+ struct tm6000_endpoint bulk_in, bulk_out, isoc_in, isoc_out;
/* scaler!=0 if scaler is active*/
int scaler;
/* In tm6000-cards.c */
int tm6000_tuner_callback (void *ptr, int component, int command, int arg);
+int tm6000_xc5000_callback (void *ptr, int component, int command, int arg);
+int tm6000_cards_setup(struct tm6000_core *dev);
+
/* In tm6000-core.c */
int tm6000_read_write_usb (struct tm6000_core *dev, u8 reqtype, u8 req,
u16 value, u16 index, u8 *buf, u16 len);
int tm6000_get_reg (struct tm6000_core *dev, u8 req, u16 value, u16 index);
+int tm6000_get_reg16(struct tm6000_core *dev, u8 req, u16 value, u16 index);
+int tm6000_get_reg32(struct tm6000_core *dev, u8 req, u16 value, u16 index);
int tm6000_set_reg (struct tm6000_core *dev, u8 req, u16 value, u16 index);
int tm6000_init (struct tm6000_core *dev);