summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-03-23 18:53:18 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-03-23 18:53:18 -0300
commit15daef71fb04bcd5f34f4576390141982b4907e8 (patch)
tree04e965a239f39a69367a87bcee12a0af92abeeb0 /linux/drivers/media/dvb
parent462eeaf510ade76bcdf8c2f0ff535459c244c4cb (diff)
downloadmediapointer-dvb-s2-15daef71fb04bcd5f34f4576390141982b4907e8.tar.gz
mediapointer-dvb-s2-15daef71fb04bcd5f34f4576390141982b4907e8.tar.bz2
Fix pll input logic for nxt200x/tuv1236d
From: Mauro Carvalho Chehab <mchehab@infradead.org> This patch fixes a few troubles on nxt200x implementation: 1) A nxt200x internal input control logic were done on both cx88-dvb and saa7134-dvb; 2) The nx200x_set_pll_input callback were filling buffer, at the 5th position, without even testing if that buffer were filled; 3) a 5 byte buffer were written to the device, even if the buffer were not properly initialized by calc_regs. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/frontends/nxt200x.c17
-rw-r--r--linux/drivers/media/dvb/frontends/nxt200x.h4
2 files changed, 12 insertions, 9 deletions
diff --git a/linux/drivers/media/dvb/frontends/nxt200x.c b/linux/drivers/media/dvb/frontends/nxt200x.c
index 87c286ee6..de4bc0156 100644
--- a/linux/drivers/media/dvb/frontends/nxt200x.c
+++ b/linux/drivers/media/dvb/frontends/nxt200x.c
@@ -560,18 +560,20 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe,
if (state->config->set_ts_params)
state->config->set_ts_params(fe, 1);
- /* set input */
- if (state->config->set_pll_input)
- state->config->set_pll_input(buf, 1);
+ /* set input for TUV1236d */
+ if (state->config->is_tuv1236d) {
+ buf[4] |= 0x08;
+ }
break;
case VSB_8:
/* Set non-punctured clock for VSB */
if (state->config->set_ts_params)
state->config->set_ts_params(fe, 0);
- /* set input */
- if (state->config->set_pll_input)
- state->config->set_pll_input(buf, 0);
+ /* reset input for TUV1236d */
+ if (state->config->is_tuv1236d) {
+ buf[4] &= ~0x08;
+ }
break;
default:
return -EINVAL;
@@ -579,7 +581,8 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe,
}
/* write frequency information */
- nxt200x_writetuner(state, buf);
+ if (fe->ops.tuner_ops.calc_regs)
+ nxt200x_writetuner(state, buf);
/* reset the agc now that tuning has been completed */
nxt200x_agc_reset(state);
diff --git a/linux/drivers/media/dvb/frontends/nxt200x.h b/linux/drivers/media/dvb/frontends/nxt200x.h
index 28bc5591b..335451ca5 100644
--- a/linux/drivers/media/dvb/frontends/nxt200x.h
+++ b/linux/drivers/media/dvb/frontends/nxt200x.h
@@ -38,8 +38,8 @@ struct nxt200x_config
/* the demodulator's i2c address */
u8 demod_address;
- /* used to set pll input */
- int (*set_pll_input)(u8* buf, int input);
+ /* TUV1236d need a different initialization */
+ int is_tuv1236d:1;
/* need to set device param for start_dma */
int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured);