aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/tda1004x.c
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t-online.de>2007-03-18 18:23:20 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:44:58 -0400
commit08cdf94c076121cd0214ef9ea18ae3fbb9ace684 (patch)
treef59ac4fc13173aca05e07d8bd74e9fdee1b9b89e /drivers/media/dvb/frontends/tda1004x.c
parentd519dcf61ed55bcfb947a31122cea068a73ad974 (diff)
V4L/DVB (5458): Tda1004x: add ts_mode option to config struct
The struct tda1004x_config has a new entry: .ts_mode Possible values are TDA10046_TS_PARALLEL or TDA10046_TS_SERIAL There always is only one interface active, default is parallel. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/tda1004x.c')
-rw-r--r--drivers/media/dvb/frontends/tda1004x.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/tda1004x.c b/drivers/media/dvb/frontends/tda1004x.c
index f4882457d021..33a84372c9e6 100644
--- a/drivers/media/dvb/frontends/tda1004x.c
+++ b/drivers/media/dvb/frontends/tda1004x.c
@@ -657,8 +657,16 @@ static int tda10046_init(struct dvb_frontend* fe)
657 tda1004x_write_mask(state, TDA10046H_CONF_POLARITY, 0xf0, 0x60); // set AGC polarities 657 tda1004x_write_mask(state, TDA10046H_CONF_POLARITY, 0xf0, 0x60); // set AGC polarities
658 break; 658 break;
659 } 659 }
660 if (state->config->ts_mode == 0) {
661 tda1004x_write_mask(state, TDA10046H_CONF_TRISTATE1, 0xc0, 0x40);
662 tda1004x_write_mask(state, 0x3a, 0x80, state->config->invert_oclk << 7);
663 } else {
664 tda1004x_write_mask(state, TDA10046H_CONF_TRISTATE1, 0xc0, 0x80);
665 tda1004x_write_mask(state, TDA10046H_CONF_POLARITY, 0x10,
666 state->config->invert_oclk << 4);
667 }
660 tda1004x_write_byteI(state, TDA1004X_CONFADC2, 0x38); 668 tda1004x_write_byteI(state, TDA1004X_CONFADC2, 0x38);
661 tda1004x_write_byteI(state, TDA10046H_CONF_TRISTATE1, 0x79); // Turn IF AGC output on 669 tda1004x_write_mask (state, TDA10046H_CONF_TRISTATE1, 0x3e, 0x38); // Turn IF AGC output on
662 tda1004x_write_byteI(state, TDA10046H_AGC_TUN_MIN, 0); // } 670 tda1004x_write_byteI(state, TDA10046H_AGC_TUN_MIN, 0); // }
663 tda1004x_write_byteI(state, TDA10046H_AGC_TUN_MAX, 0xff); // } AGC min/max values 671 tda1004x_write_byteI(state, TDA10046H_AGC_TUN_MAX, 0xff); // } AGC min/max values
664 tda1004x_write_byteI(state, TDA10046H_AGC_IF_MIN, 0); // } 672 tda1004x_write_byteI(state, TDA10046H_AGC_IF_MIN, 0); // }
@@ -668,7 +676,6 @@ static int tda10046_init(struct dvb_frontend* fe)
668 tda1004x_write_byteI(state, TDA1004X_CONF_TS1, 7); // MPEG2 interface config 676 tda1004x_write_byteI(state, TDA1004X_CONF_TS1, 7); // MPEG2 interface config
669 tda1004x_write_byteI(state, TDA1004X_CONF_TS2, 0xc0); // MPEG2 interface config 677 tda1004x_write_byteI(state, TDA1004X_CONF_TS2, 0xc0); // MPEG2 interface config
670 // tda1004x_write_mask(state, 0x50, 0x80, 0x80); // handle out of guard echoes 678 // tda1004x_write_mask(state, 0x50, 0x80, 0x80); // handle out of guard echoes
671 tda1004x_write_mask(state, 0x3a, 0x80, state->config->invert_oclk << 7);
672 679
673 return 0; 680 return 0;
674} 681}