diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-01-02 01:01:54 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:04:36 -0500 |
commit | f21e0d7f0513e743b14df3197fdeeb9a9b7edbb2 (patch) | |
tree | fed91b8a1b032f3ebf827378b0517ceca9d7793a /drivers/media/video | |
parent | 59067f7ed491ec95e6e9033e35e1ae726cff3cee (diff) |
V4L/DVB (6962): tda18271: allow device-specific configuration of IF frequency and std bits
Allow drivers to pass device-specific configuration parameters during attach.
If these parameters are omitted, default values will be used.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-dvb.c | 12 | ||||
-rw-r--r-- | drivers/media/video/tda8290.c | 6 |
2 files changed, 16 insertions, 2 deletions
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c index 81dd47f6f654..948a7fb7ed06 100644 --- a/drivers/media/video/cx23885/cx23885-dvb.c +++ b/drivers/media/video/cx23885/cx23885-dvb.c | |||
@@ -183,6 +183,16 @@ static struct tda829x_config tda829x_no_probe = { | |||
183 | .probe_tuner = TDA829X_DONT_PROBE, | 183 | .probe_tuner = TDA829X_DONT_PROBE, |
184 | }; | 184 | }; |
185 | 185 | ||
186 | static struct tda18271_std_map hauppauge_tda18271_std_map = { | ||
187 | .atsc_6 = { .if_freq = 5380000, .std_bits = 0x1b }, | ||
188 | .qam_6 = { .if_freq = 4000000, .std_bits = 0x18 }, | ||
189 | }; | ||
190 | |||
191 | static struct tda18271_config hauppauge_tda18271_config = { | ||
192 | .std_map = &hauppauge_tda18271_std_map, | ||
193 | .gate = TDA18271_GATE_ANALOG, | ||
194 | }; | ||
195 | |||
186 | static int cx23885_hvr1500_xc3028_callback(void *ptr, int command, int arg) | 196 | static int cx23885_hvr1500_xc3028_callback(void *ptr, int command, int arg) |
187 | { | 197 | { |
188 | struct cx23885_tsport *port = ptr; | 198 | struct cx23885_tsport *port = ptr; |
@@ -248,7 +258,7 @@ static int dvb_register(struct cx23885_tsport *port) | |||
248 | &tda829x_no_probe); | 258 | &tda829x_no_probe); |
249 | dvb_attach(tda18271_attach, port->dvb.frontend, | 259 | dvb_attach(tda18271_attach, port->dvb.frontend, |
250 | 0x60, &dev->i2c_bus[1].i2c_adap, | 260 | 0x60, &dev->i2c_bus[1].i2c_adap, |
251 | TDA18271_GATE_ANALOG); | 261 | &hauppauge_tda18271_config); |
252 | } | 262 | } |
253 | break; | 263 | break; |
254 | case 0: | 264 | case 0: |
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c index 54d261a2f25a..eab530708a49 100644 --- a/drivers/media/video/tda8290.c +++ b/drivers/media/video/tda8290.c | |||
@@ -509,6 +509,10 @@ static void tda829x_release(struct dvb_frontend *fe) | |||
509 | fe->analog_demod_priv = NULL; | 509 | fe->analog_demod_priv = NULL; |
510 | } | 510 | } |
511 | 511 | ||
512 | static struct tda18271_config tda829x_tda18271_config = { | ||
513 | .gate = TDA18271_GATE_ANALOG, | ||
514 | }; | ||
515 | |||
512 | static int tda829x_find_tuner(struct dvb_frontend *fe) | 516 | static int tda829x_find_tuner(struct dvb_frontend *fe) |
513 | { | 517 | { |
514 | struct tda8290_priv *priv = fe->analog_demod_priv; | 518 | struct tda8290_priv *priv = fe->analog_demod_priv; |
@@ -574,7 +578,7 @@ static int tda829x_find_tuner(struct dvb_frontend *fe) | |||
574 | priv->ver |= TDA18271; | 578 | priv->ver |= TDA18271; |
575 | tda18271_attach(fe, priv->tda827x_addr, | 579 | tda18271_attach(fe, priv->tda827x_addr, |
576 | priv->i2c_props.adap, | 580 | priv->i2c_props.adap, |
577 | TDA18271_GATE_ANALOG); | 581 | &tda829x_tda18271_config); |
578 | } else { | 582 | } else { |
579 | if ((data & 0x3c) == 0) | 583 | if ((data & 0x3c) == 0) |
580 | priv->ver |= TDA8275; | 584 | priv->ver |= TDA8275; |