summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-09-19 12:51:33 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-10-03 15:12:27 -0300
commit136cafbf4a024b52ba0a10627217f03cea9ff9f8 (patch)
treecf827cb4d792a82a9c7b30bccc0db71547607472 /drivers/media/dvb/dvb-usb
parent6870ab576c86a496869fbd5bb339da7e442ee7f5 (diff)
downloadlinux-136cafbf4a024b52ba0a10627217f03cea9ff9f8.tar.bz2
V4L/DVB (4646): Misc. changes, DiB3000MC, MT2060
Changed the attach-function of the dib3000mc-driver to return only one frontend. In case of multiple dib3000-chips on one board, one has to call the i2c-enumeration manually before. Added a field to Microtune 2060 config to output the clock to other tuners/device on a board. Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r--drivers/media/dvb/dvb-usb/Makefile1
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-common.c11
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-mc.c1
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-firmware.c6
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-ids.h6
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb.h41
-rw-r--r--drivers/media/dvb/dvb-usb/usb-urb.c2
7 files changed, 34 insertions, 34 deletions
diff --git a/drivers/media/dvb/dvb-usb/Makefile b/drivers/media/dvb/dvb-usb/Makefile
index 275cbc2925c4..e239107998e5 100644
--- a/drivers/media/dvb/dvb-usb/Makefile
+++ b/drivers/media/dvb/dvb-usb/Makefile
@@ -37,5 +37,6 @@ dvb-usb-cxusb-objs = cxusb.o
obj-$(CONFIG_DVB_USB_CXUSB) += dvb-usb-cxusb.o
dvb-usb-dib0700-objs = dib0700_core.o dib0700_devices.o
+obj-$(CONFIG_DVB_USB_DIB0700) += dvb-usb-dib0700.o
EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c
index 5f8afec96a3b..b4d6e539ff5a 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-common.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-common.c
@@ -230,8 +230,8 @@ static struct dib3000mc_config mod3000p_dib3000p_config = {
int dibusb_dib3000mc_frontend_attach(struct dvb_usb_adapter *adap)
{
- if (dib3000mc_attach(&adap->dev->i2c_adap, 1, DEFAULT_DIB3000P_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &adap->fe) == 0 ||
- dib3000mc_attach(&adap->dev->i2c_adap, 1, DEFAULT_DIB3000MC_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &adap->fe) == 0) {
+ if ((adap->fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, DEFAULT_DIB3000P_I2C_ADDRESS, &mod3000p_dib3000p_config)) == NULL ||
+ (adap->fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, DEFAULT_DIB3000MC_I2C_ADDRESS, &mod3000p_dib3000p_config)) == NULL) {
if (adap->priv != NULL) {
struct dibusb_state *st = adap->priv;
st->ops.pid_parse = dib3000mc_pid_parse;
@@ -247,10 +247,9 @@ static struct mt2060_config stk3000p_mt2060_config = {
0x60
};
-int dibusb_dib3000mc_tuner_attach (struct dvb_usb_adapter *adap)
+int dibusb_dib3000mc_tuner_attach(struct dvb_usb_adapter *adap)
{
struct dibusb_state *st = adap->priv;
- int ret;
u8 a,b;
u16 if1 = 1220;
struct i2c_adapter *tun_i2c;
@@ -287,9 +286,9 @@ int dibusb_dib3000mc_tuner_attach (struct dvb_usb_adapter *adap)
}
tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1);
- if ((ret = mt2060_attach(adap->fe, tun_i2c, &stk3000p_mt2060_config, if1)) != 0) {
+ if (dvb_attach(mt2060_attach, adap->fe, tun_i2c, &stk3000p_mt2060_config, if1) != NULL) {
/* not found - use panasonic pll parameters */
- if (dvb_pll_attach(adap->fe, 0x60, tun_i2c, &dvb_pll_env57h1xd5) == NULL)
+ if (dvb_attach(dvb_pll_attach, adap->fe, 0x60, tun_i2c, &dvb_pll_env57h1xd5) == NULL)
return -ENOMEM;
} else {
st->mt2060_present = 1;
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mc.c b/drivers/media/dvb/dvb-usb/dibusb-mc.c
index d823e7d5b260..a0fd37efc04b 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-mc.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-mc.c
@@ -49,7 +49,6 @@ static struct dvb_usb_device_properties dibusb_mc_properties = {
.usb_ctrl = CYPRESS_FX2,
.firmware = "dvb-usb-dibusb-6.0.0.8.fw",
-
.num_adapters = 1,
.adapter = {
{
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c b/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c
index 122ff8157d18..e1112e39fb63 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c
@@ -24,9 +24,6 @@ static struct usb_cypress_controller cypress[] = {
{ .id = CYPRESS_FX2, .name = "Cypress FX2", .cpu_cs_register = 0xe600 },
};
-static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
- int *pos);
-
/*
* load a firmware packet to the device
*/
@@ -115,7 +112,7 @@ int dvb_usb_download_firmware(struct usb_device *udev, struct dvb_usb_device_pro
return ret;
}
-static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
+int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
int *pos)
{
u8 *b = (u8 *) &fw->data[*pos];
@@ -146,3 +143,4 @@ static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
return *pos;
}
+EXPORT_SYMBOL(dvb_usb_get_hexline);
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
index 57a10de1d3dd..feb098727dc3 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
@@ -52,8 +52,7 @@
#define USB_PID_DIBCOM_MOD3000_WARM 0x0bb9
#define USB_PID_DIBCOM_MOD3001_COLD 0x0bc6
#define USB_PID_DIBCOM_MOD3001_WARM 0x0bc7
-#define USB_PID_DIBCOM_STK7700 0x1e14
-#define USB_PID_DIBCOM_STK7700_REENUM 0x1e15
+#define USB_PID_DIBCOM_STK7700P 0x1e14
#define USB_PID_DIBCOM_ANCHOR_2135_COLD 0x2131
#define USB_PID_GRANDTEC_DVBT_USB_COLD 0x0fa0
#define USB_PID_GRANDTEC_DVBT_USB_WARM 0x0fa1
@@ -95,6 +94,9 @@
#define USB_PID_WT220U_ZL0353_WARM 0x022b
#define USB_PID_WINTV_NOVA_T_USB2_COLD 0x9300
#define USB_PID_WINTV_NOVA_T_USB2_WARM 0x9301
+#define USB_PID_HAUPPAUGE_NOVA_T_500 0x1234
+#define USB_PID_HAUPPAUGE_NOVA_T_STICK 0x1234
+#define USB_PID_AVERMEDIA_VOLAR 0x1234
#define USB_PID_NEBULA_DIGITV 0x0201
#define USB_PID_DVICO_BLUEBIRD_LGDT 0xd820
#define USB_PID_DVICO_BLUEBIRD_LG064F_COLD 0xd500
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h
index 5546554d3876..44b49db4992e 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -90,8 +90,8 @@ struct dvb_usb_adapter;
struct usb_data_stream;
/**
- * Properties of USB streaming - TODO this structure does not belong here actually
- * describes the kind of USB transfer used for MPEG2-TS-streaming.
+ * Properties of USB streaming - TODO this structure should be somewhere else
+ * describes the kind of USB transfer used for data-streaming.
* (BULK or ISOC)
*/
struct usb_data_stream_properties {
@@ -193,10 +193,10 @@ struct dvb_usb_device_properties {
#define CYPRESS_AN2135 1
#define CYPRESS_AN2235 2
#define CYPRESS_FX2 3
- int usb_ctrl;
+ int usb_ctrl;
+ int (*download_firmware) (struct usb_device *, const struct firmware *);
const char firmware[FIRMWARE_NAME_MAX];
- int (*download_firmware) (struct usb_device *, const struct firmware *);
- int no_reconnect;
+ int no_reconnect;
int size_of_priv;
@@ -212,7 +212,7 @@ struct dvb_usb_device_properties {
#define REMOTE_NO_KEY_PRESSED 0x00
#define REMOTE_KEY_PRESSED 0x01
#define REMOTE_KEY_REPEAT 0x02
- struct dvb_usb_rc_key *rc_key_map;
+ struct dvb_usb_rc_key *rc_key_map;
int rc_key_map_size;
int (*rc_query) (struct dvb_usb_device *, u32 *, int *);
int rc_interval;
@@ -234,13 +234,11 @@ struct dvb_usb_device_properties {
*
* @urbs_initialized: number of URBs initialized.
* @urbs_submitted: number of URBs submitted.
- *
- * TODO put this in the correct place.
*/
#define MAX_NO_URBS_FOR_DATA_STREAM 10
struct usb_data_stream {
- struct usb_device *udev;
- struct usb_data_stream_properties props;
+ struct usb_device *udev;
+ struct usb_data_stream_properties props;
#define USB_STATE_INIT 0x00
#define USB_STATE_URB_BUF 0x01
@@ -248,12 +246,11 @@ struct usb_data_stream {
void (*complete) (struct usb_data_stream *, u8 *, size_t);
- struct urb *urb_list[MAX_NO_URBS_FOR_DATA_STREAM];
-
- int buf_num;
- unsigned long buf_size;
- u8 *buf_list[MAX_NO_URBS_FOR_DATA_STREAM];
- dma_addr_t dma_addr[MAX_NO_URBS_FOR_DATA_STREAM];
+ struct urb *urb_list[MAX_NO_URBS_FOR_DATA_STREAM];
+ int buf_num;
+ unsigned long buf_size;
+ u8 *buf_list[MAX_NO_URBS_FOR_DATA_STREAM];
+ dma_addr_t dma_addr[MAX_NO_URBS_FOR_DATA_STREAM];
int urbs_initialized;
int urbs_submitted;
@@ -271,8 +268,8 @@ struct usb_data_stream {
* @pll_addr: I2C address of the tuner for programming
* @pll_init: array containing the initialization buffer
* @pll_desc: pointer to the appropriate struct dvb_pll_desc
- *
* @tuner_pass_ctrl: called to (de)activate tuner passthru of the demod or the board
+ *
* @dvb_adap: device's dvb_adapter.
* @dmxdev: device's dmxdev.
* @demux: device's software demuxer.
@@ -280,8 +277,10 @@ struct usb_data_stream {
* @dvb_frontend: device's frontend.
* @max_feed_count: how many feeds can be handled simultaneously by this
* device
+ *
+ * @fe_init: rerouted frontend-init (wakeup) function.
* @fe_sleep: rerouted frontend-sleep function.
- * @fe_init: rerouted frontend-init (wakeup) function.
+ *
* @stream: the usb data stream.
*/
struct dvb_usb_adapter {
@@ -292,7 +291,7 @@ struct dvb_usb_adapter {
#define DVB_USB_ADAP_STATE_DVB 0x001
int state;
- int id;
+ u8 id;
int feedcount;
int pid_filtering;
@@ -311,8 +310,8 @@ struct dvb_usb_adapter {
struct dvb_frontend *fe;
int max_feed_count;
- int (*fe_sleep) (struct dvb_frontend *);
int (*fe_init) (struct dvb_frontend *);
+ int (*fe_sleep) (struct dvb_frontend *);
struct usb_data_stream stream;
@@ -400,5 +399,7 @@ struct hexline {
u8 chk;
};
extern int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type);
+extern int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx, int *pos);
+
#endif
diff --git a/drivers/media/dvb/dvb-usb/usb-urb.c b/drivers/media/dvb/dvb-usb/usb-urb.c
index f2f3bb6044aa..8728cf347a71 100644
--- a/drivers/media/dvb/dvb-usb/usb-urb.c
+++ b/drivers/media/dvb/dvb-usb/usb-urb.c
@@ -122,7 +122,7 @@ static int usb_allocate_stream_buffers(struct usb_data_stream *stream, int num,
usb_free_stream_buffers(stream);
return -ENOMEM;
}
- deb_mem("buffer %d: %p (dma: %ld)\n",
+ deb_mem("buffer %d: %p (dma: %u)\n",
stream->buf_num, stream->buf_list[stream->buf_num], stream->dma_addr[stream->buf_num]);
memset(stream->buf_list[stream->buf_num],0,size);
stream->state |= USB_STATE_URB_BUF;