From 4388c3b4fe0362e8bb3fe3a09b312db929b8c730 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Sat, 17 May 2008 22:58:04 -0300 Subject: V4L/DVB (7912): TDA10023: make few parameters configurable - separate TDA10021 and TDA10023 attach - configurable Xtal settings - configurable input freq offset + baseband conversion type settings Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/frontends/tda1002x.h | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'drivers/media/dvb/frontends/tda1002x.h') diff --git a/drivers/media/dvb/frontends/tda1002x.h b/drivers/media/dvb/frontends/tda1002x.h index 1bcc0d44b90b..4522b7ef53c9 100644 --- a/drivers/media/dvb/frontends/tda1002x.h +++ b/drivers/media/dvb/frontends/tda1002x.h @@ -26,11 +26,25 @@ #include -struct tda1002x_config -{ +struct tda1002x_config { + /* the demodulator's i2c address */ + u8 demod_address; + u8 invert; +}; + +struct tda10023_config { /* the demodulator's i2c address */ u8 demod_address; u8 invert; + + /* clock settings */ + u32 xtal; /* defaults: 28920000 */ + u8 pll_m; /* defaults: 8 */ + u8 pll_p; /* defaults: 4 */ + u8 pll_n; /* defaults: 1 */ + + /* input freq offset + baseband conversion type */ + u16 deltaf; }; #if defined(CONFIG_DVB_TDA10021) || (defined(CONFIG_DVB_TDA10021_MODULE) && defined(MODULE)) @@ -45,12 +59,15 @@ static inline struct dvb_frontend* tda10021_attach(const struct tda1002x_config* } #endif // CONFIG_DVB_TDA10021 -#if defined(CONFIG_DVB_TDA10023) || (defined(CONFIG_DVB_TDA10023_MODULE) && defined(MODULE)) -extern struct dvb_frontend* tda10023_attach(const struct tda1002x_config* config, - struct i2c_adapter* i2c, u8 pwm); +#if defined(CONFIG_DVB_TDA10023) || \ + (defined(CONFIG_DVB_TDA10023_MODULE) && defined(MODULE)) +extern struct dvb_frontend *tda10023_attach( + const struct tda10023_config *config, + struct i2c_adapter *i2c, u8 pwm); #else -static inline struct dvb_frontend* tda10023_attach(const struct tda1002x_config* config, - struct i2c_adapter* i2c, u8 pwm) +static inline struct dvb_frontend *tda10023_attach( + const struct tda1002x_config *config, + struct i2c_adapter *i2c, u8 pwm) { printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); return NULL; -- cgit v1.2.3 From e75888661a7008503e3d147f92499d9c30ebf6e3 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Mon, 9 Jun 2008 22:53:04 -0300 Subject: V4L/DVB (8030): TDA10023: make TS output mode configurable - make TS output mode configurable Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/frontends/tda10023.c | 6 +++++- drivers/media/dvb/frontends/tda1002x.h | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'drivers/media/dvb/frontends/tda1002x.h') diff --git a/drivers/media/dvb/frontends/tda10023.c b/drivers/media/dvb/frontends/tda10023.c index 2996b73cf4b4..a3c34eecdee9 100644 --- a/drivers/media/dvb/frontends/tda10023.c +++ b/drivers/media/dvb/frontends/tda10023.c @@ -269,7 +269,8 @@ static int tda10023_init (struct dvb_frontend *fe) /* 084 */ 0x02, 0xff, 0x93, /* AGCCONF1 IFS=1 KAGCIF=2 KAGCTUN=3 */ /* 087 */ 0x2d, 0xff, 0xf6, /* SWEEP SWPOS=1 SWDYN=7 SWSTEP=1 SWLEN=2 */ /* 090 */ 0x04, 0x10, 0x00, /* SWRAMP=1 */ -/* 093 */ 0x12, 0xff, 0xa1, /* INTP1 POCLKP=1 FEL=1 MFS=0 */ +/* 093 */ 0x12, 0xff, TDA10023_OUTPUT_MODE_PARALLEL_B, /* + INTP1 POCLKP=1 FEL=1 MFS=0 */ /* 096 */ 0x2b, 0x01, 0xa1, /* INTS1 */ /* 099 */ 0x20, 0xff, 0x04, /* INTP2 SWAPP=? MSBFIRSTP=? INTPSEL=? */ /* 102 */ 0x2c, 0xff, 0x0d, /* INTP/S TRIP=0 TRIS=0 */ @@ -289,6 +290,9 @@ static int tda10023_init (struct dvb_frontend *fe) tda10023_inittab[83] = (state->config->deltaf >> 8); } + if (state->config->output_mode) + tda10023_inittab[95] = state->config->output_mode; + tda10023_writetab(state, tda10023_inittab); return 0; diff --git a/drivers/media/dvb/frontends/tda1002x.h b/drivers/media/dvb/frontends/tda1002x.h index 4522b7ef53c9..afc0a32eaabd 100644 --- a/drivers/media/dvb/frontends/tda1002x.h +++ b/drivers/media/dvb/frontends/tda1002x.h @@ -32,6 +32,13 @@ struct tda1002x_config { u8 invert; }; +enum tda10023_output_mode { + TDA10023_OUTPUT_MODE_PARALLEL_A = 0xe0, + TDA10023_OUTPUT_MODE_PARALLEL_B = 0xa1, + TDA10023_OUTPUT_MODE_PARALLEL_C = 0xa0, + TDA10023_OUTPUT_MODE_SERIAL, /* TODO: not implemented */ +}; + struct tda10023_config { /* the demodulator's i2c address */ u8 demod_address; @@ -43,6 +50,9 @@ struct tda10023_config { u8 pll_p; /* defaults: 4 */ u8 pll_n; /* defaults: 1 */ + /* MPEG2 TS output mode */ + u8 output_mode; + /* input freq offset + baseband conversion type */ u16 deltaf; }; -- cgit v1.2.3 From 4ee48c4257d842a29c032a32a19a3fcdd004b83f Mon Sep 17 00:00:00 2001 From: Oliver Endriss Date: Tue, 15 Jul 2008 19:36:46 -0300 Subject: V4L/DVB (8334): tda10023: Fix typo in tda10023_attach dummy routine Fix compiler warning caused by a typo in the tda10023_attach dummy routine. Signed-off-by: Oliver Endriss Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/frontends/tda1002x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/dvb/frontends/tda1002x.h') diff --git a/drivers/media/dvb/frontends/tda1002x.h b/drivers/media/dvb/frontends/tda1002x.h index afc0a32eaabd..04d19418bf20 100644 --- a/drivers/media/dvb/frontends/tda1002x.h +++ b/drivers/media/dvb/frontends/tda1002x.h @@ -76,7 +76,7 @@ extern struct dvb_frontend *tda10023_attach( struct i2c_adapter *i2c, u8 pwm); #else static inline struct dvb_frontend *tda10023_attach( - const struct tda1002x_config *config, + const struct tda10023_config *config, struct i2c_adapter *i2c, u8 pwm) { printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); -- cgit v1.2.3