diff options
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/frontends/nxt200x.c | 17 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/nxt200x.h | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-dvb.c | 11 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-dvb.c | 11 |
4 files changed, 29 insertions, 14 deletions
diff --git a/linux/drivers/media/dvb/frontends/nxt200x.c b/linux/drivers/media/dvb/frontends/nxt200x.c index de4bc0156..87c286ee6 100644 --- a/linux/drivers/media/dvb/frontends/nxt200x.c +++ b/linux/drivers/media/dvb/frontends/nxt200x.c @@ -560,20 +560,18 @@ 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 for TUV1236d */ - if (state->config->is_tuv1236d) { - buf[4] |= 0x08; - } + /* set input */ + if (state->config->set_pll_input) + state->config->set_pll_input(buf, 1); break; case VSB_8: /* Set non-punctured clock for VSB */ if (state->config->set_ts_params) state->config->set_ts_params(fe, 0); - /* reset input for TUV1236d */ - if (state->config->is_tuv1236d) { - buf[4] &= ~0x08; - } + /* set input */ + if (state->config->set_pll_input) + state->config->set_pll_input(buf, 0); break; default: return -EINVAL; @@ -581,8 +579,7 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe, } /* write frequency information */ - if (fe->ops.tuner_ops.calc_regs) - nxt200x_writetuner(state, buf); + 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 335451ca5..28bc5591b 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; - /* TUV1236d need a different initialization */ - int is_tuv1236d:1; + /* used to set pll input */ + int (*set_pll_input)(u8* buf, int input); /* need to set device param for start_dma */ int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index 10e2df75f..2327b32fd 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -371,9 +371,18 @@ static int nxt200x_set_ts_param(struct dvb_frontend* fe, int is_punctured) return 0; } +static int nxt200x_set_pll_input(u8* buf, int input) +{ + if (input) + buf[3] |= 0x08; + else + buf[3] &= ~0x08; + return 0; +} + static struct nxt200x_config ati_hdtvwonder = { .demod_address = 0x0a, - .is_tuv1236d = 1, + .set_pll_input = nxt200x_set_pll_input, .set_ts_params = nxt200x_set_ts_param, }; diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c index 351f1d063..752e90e97 100644 --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c @@ -945,9 +945,18 @@ static struct nxt200x_config avertvhda180 = { .demod_address = 0x0a, }; +static int nxt200x_set_pll_input(u8 *buf, int input) +{ + if (input) + buf[3] |= 0x08; + else + buf[3] &= ~0x08; + return 0; +} + static struct nxt200x_config kworldatsc110 = { .demod_address = 0x0a, - .is_tuv1236d = 1, + .set_pll_input = nxt200x_set_pll_input, }; /* ================================================================== |