aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-dvb.c
diff options
context:
space:
mode:
authorAlexey Chernov <4ernov@gmail.com>2010-10-28 17:12:02 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 05:16:56 -0500
commita363436396ad68509db4513c886055cc067a184c (patch)
treee6cfe9516c14c51d5d65529fa2fe44b1a80646cf /drivers/media/video/cx18/cx18-dvb.c
parent97108cf682566a79ad49f165435bddbb91844d9a (diff)
[media] Patch for cx18 module with added support of GoTView PCI DVD3 Hybrid tuner
I've got code which adds support of GoTView PCI DVD3 Hybrid tuner in cx18 module and Andy Walls in ivtv mailing-list gave me some advice on making a patch and sending it here. So here's the patch against staging/2.6.37-rc1 branch (the tutorial recommends to include it as plain text but if it's the case I can surely send as an attachment): Several comments on the patch: 1. Both users on the official Gotview forum and support said that PCI DVD3 is very similar to Yuan MPC718 card so the main part of code is taken from Yuan configuration. Some users reported it to work properly. 2. Everything is being initialized correctly including analog, dvb, radio and alsa parts. Analogue part and alsa virtual card is tested by myself using original Gotview card. [mchehab@redhat.com: Whitespace cleanups] Signed-off-by: Alexey Chernov <4ernov@gmail.com> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-dvb.c')
-rw-r--r--drivers/media/video/cx18/cx18-dvb.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/media/video/cx18/cx18-dvb.c b/drivers/media/video/cx18/cx18-dvb.c
index 6d19f040d70f..c7f0bad39ad0 100644
--- a/drivers/media/video/cx18/cx18-dvb.c
+++ b/drivers/media/video/cx18/cx18-dvb.c
@@ -203,6 +203,14 @@ static struct zl10353_config yuan_mpc718_zl10353_demod = {
203 .disable_i2c_gate_ctrl = 1, /* Disable the I2C gate */ 203 .disable_i2c_gate_ctrl = 1, /* Disable the I2C gate */
204}; 204};
205 205
206static struct zl10353_config gotview_dvd3_zl10353_demod = {
207 .demod_address = 0x1e >> 1, /* Datasheet suggested straps */
208 .if2 = 45600, /* 4.560 MHz IF from the XC3028 */
209 .parallel_ts = 1, /* Not a serial TS */
210 .no_tuner = 1, /* XC3028 is not behind the gate */
211 .disable_i2c_gate_ctrl = 1, /* Disable the I2C gate */
212};
213
206static int dvb_register(struct cx18_stream *stream); 214static int dvb_register(struct cx18_stream *stream);
207 215
208/* Kernel DVB framework calls this when the feed needs to start. 216/* Kernel DVB framework calls this when the feed needs to start.
@@ -247,6 +255,7 @@ static int cx18_dvb_start_feed(struct dvb_demux_feed *feed)
247 255
248 case CX18_CARD_LEADTEK_DVR3100H: 256 case CX18_CARD_LEADTEK_DVR3100H:
249 case CX18_CARD_YUAN_MPC718: 257 case CX18_CARD_YUAN_MPC718:
258 case CX18_CARD_GOTVIEW_PCI_DVD3:
250 default: 259 default:
251 /* Assumption - Parallel transport - Signalling 260 /* Assumption - Parallel transport - Signalling
252 * undefined or default. 261 * undefined or default.
@@ -495,6 +504,29 @@ static int dvb_register(struct cx18_stream *stream)
495 fe->ops.tuner_ops.set_config(fe, &ctrl); 504 fe->ops.tuner_ops.set_config(fe, &ctrl);
496 } 505 }
497 break; 506 break;
507 case CX18_CARD_GOTVIEW_PCI_DVD3:
508 dvb->fe = dvb_attach(zl10353_attach,
509 &gotview_dvd3_zl10353_demod,
510 &cx->i2c_adap[1]);
511 if (dvb->fe != NULL) {
512 struct dvb_frontend *fe;
513 struct xc2028_config cfg = {
514 .i2c_adap = &cx->i2c_adap[1],
515 .i2c_addr = 0xc2 >> 1,
516 .ctrl = NULL,
517 };
518 static struct xc2028_ctrl ctrl = {
519 .fname = XC2028_DEFAULT_FIRMWARE,
520 .max_len = 64,
521 .demod = XC3028_FE_ZARLINK456,
522 .type = XC2028_AUTO,
523 };
524
525 fe = dvb_attach(xc2028_attach, dvb->fe, &cfg);
526 if (fe != NULL && fe->ops.tuner_ops.set_config != NULL)
527 fe->ops.tuner_ops.set_config(fe, &ctrl);
528 }
529 break;
498 default: 530 default:
499 /* No Digital Tv Support */ 531 /* No Digital Tv Support */
500 break; 532 break;