aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-dvb.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2008-01-05 14:55:45 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:05:06 -0500
commit8c70017f5793e68ea48085a65008d713c9a85dde (patch)
treec8092f3425d9dbe1be78a19389ebd5e3fac6d6ac /drivers/media/video/cx23885/cx23885-dvb.c
parent60464da8b1ed8d7c19563f58cadb0ca990448a36 (diff)
V4L/DVB (7044): XC5000: Fix support for HVR1500Q broken by patch 1
From Zhang: This patch fixes support for the HVR1500Q which was broken when the xc5000 analog patch was added. Patch committed as-is, cleanups to follows .... Steve Signed-off-by: Chaogui Zhang <czhang1974@gmail.com> Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-dvb.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-dvb.c35
1 files changed, 7 insertions, 28 deletions
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
index 21937d5cbb12..61d75d04db8d 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -87,32 +87,6 @@ static void dvb_buf_release(struct videobuf_queue *q,
87 cx23885_free_buffer(q, (struct cx23885_buffer*)vb); 87 cx23885_free_buffer(q, (struct cx23885_buffer*)vb);
88} 88}
89 89
90static int cx23885_request_firmware(struct dvb_frontend *fe,
91 const struct firmware **fw, char *name)
92{
93 struct cx23885_tsport *port = fe->dvb->priv;
94 struct cx23885_dev *dev = port->dev;
95
96 dprintk(1, "%s(?,?,%s)\n", __FUNCTION__, name);
97
98 return request_firmware(fw, name, &dev->pci->dev);
99}
100
101static int hauppauge_hvr1500q_tuner_reset(struct dvb_frontend *fe)
102{
103 struct cx23885_tsport *port = fe->dvb->priv;
104 struct cx23885_dev *dev = port->dev;
105
106 dprintk(1, "%s()\n", __FUNCTION__);
107
108 /* Drive the tuner into reset back back */
109 cx_clear(GP0_IO, 0x00000004);
110 mdelay(200);
111 cx_set(GP0_IO, 0x00000004);
112
113 return 0;
114}
115
116static struct videobuf_queue_ops dvb_qops = { 90static struct videobuf_queue_ops dvb_qops = {
117 .buf_setup = dvb_buf_setup, 91 .buf_setup = dvb_buf_setup,
118 .buf_prepare = dvb_buf_prepare, 92 .buf_prepare = dvb_buf_prepare,
@@ -182,8 +156,8 @@ static struct s5h1409_config hauppauge_hvr1500q_config = {
182static struct xc5000_config hauppauge_hvr1500q_tunerconfig = { 156static struct xc5000_config hauppauge_hvr1500q_tunerconfig = {
183 .i2c_address = 0x61, 157 .i2c_address = 0x61,
184 .if_khz = 5380, 158 .if_khz = 5380,
185 .request_firmware = cx23885_request_firmware, 159 /* cannot set .video_dev here, do it before attach. */
186 .tuner_reset = hauppauge_hvr1500q_tuner_reset 160 .tuner_callback = cx23885_tuner_callback
187}; 161};
188 162
189static struct tda829x_config tda829x_no_probe = { 163static struct tda829x_config tda829x_no_probe = {
@@ -308,6 +282,11 @@ static int dvb_register(struct cx23885_tsport *port)
308 &hauppauge_hvr1500q_config, 282 &hauppauge_hvr1500q_config,
309 &dev->i2c_bus[0].i2c_adap); 283 &dev->i2c_bus[0].i2c_adap);
310 if (port->dvb.frontend != NULL) { 284 if (port->dvb.frontend != NULL) {
285 /* tunerconfig.video_dev must point to
286 * i2c_adap.algo_data
287 */
288 hauppauge_hvr1500q_tunerconfig.video_dev =
289 i2c_bus->i2c_adap.algo_data;
311 dvb_attach(xc5000_attach, port->dvb.frontend, 290 dvb_attach(xc5000_attach, port->dvb.frontend,
312 &i2c_bus->i2c_adap, 291 &i2c_bus->i2c_adap,
313 &hauppauge_hvr1500q_tunerconfig); 292 &hauppauge_hvr1500q_tunerconfig);