diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-04-22 19:45:55 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 19:07:50 +0200 |
commit | 02f5f4448464fea9c19e6b5ff5c67e874c898834 (patch) | |
tree | 101b439bf48ddaa67292f098913cbd0700fd5080 | |
parent | V4L/DVB (7354): tuner-simple: enable digital tuning support for Philips FCV1236D (diff) | |
download | linux-02f5f4448464fea9c19e6b5ff5c67e874c898834.tar.xz linux-02f5f4448464fea9c19e6b5ff5c67e874c898834.zip |
V4L/DVB (7355): tuner-simple: use separate inputs for vsb and qam on tuv1236d & fcv1236d
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/video/tuner-simple.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c index b6587300bb8f..8ecd92324c49 100644 --- a/drivers/media/video/tuner-simple.c +++ b/drivers/media/video/tuner-simple.c @@ -268,6 +268,37 @@ static int simple_config_lookup(struct dvb_frontend *fe, /* ---------------------------------------------------------------------- */ +static void simple_set_rf_input(struct dvb_frontend *fe, + u8 *config, u8 *cb, unsigned int rf) +{ + struct tuner_simple_priv *priv = fe->tuner_priv; + + switch (priv->type) { + case TUNER_PHILIPS_TUV1236D: + switch (rf) { + case 1: + *cb |= 0x08; + break; + default: + *cb &= ~0x08; + break; + } + break; + case TUNER_PHILIPS_ATSC: + switch (rf) { + case 1: + *cb |= 0x01; + break; + default: + *cb &= ~0x01; + break; + } + break; + default: + break; + } +} + static int simple_std_setup(struct dvb_frontend *fe, struct analog_parameters *params, u8 *config, u8 *cb) @@ -725,6 +756,24 @@ static void simple_set_dvb(struct dvb_frontend *fe, u8 *buf, params->frequency >= 158870000) buf[3] |= 0x08; break; + case TUNER_PHILIPS_TUV1236D: + case TUNER_PHILIPS_ATSC: + { + unsigned int new_rf; + + switch (params->u.vsb.modulation) { + case QAM_64: + case QAM_256: + new_rf = 1; + break; + case VSB_8: + default: + new_rf = 0; + break; + } + simple_set_rf_input(fe, &buf[2], &buf[3], new_rf); + break; + } default: break; } |