summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-02-03 16:30:15 -0500
committerMichael Krufky <mkrufky@linuxtv.org>2008-02-03 16:30:15 -0500
commit4558ed3afc43ab09aeff28df93c7a17d4aad38ba (patch)
tree85ff56048035fdca3d6b00b58dff965c410c9347 /linux
parentee9c46c7c0c6f2b5cdf190bdaa0fac8409f3f893 (diff)
downloadmediapointer-dvb-s2-4558ed3afc43ab09aeff28df93c7a17d4aad38ba.tar.gz
mediapointer-dvb-s2-4558ed3afc43ab09aeff28df93c7a17d4aad38ba.tar.bz2
tuner-simple: use separate inputs for vsb and qam on tuv1236d & fcv1236d
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/tuner-simple.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tuner-simple.c b/linux/drivers/media/video/tuner-simple.c
index 4d4d9984a..e2cefb54c 100644
--- a/linux/drivers/media/video/tuner-simple.c
+++ b/linux/drivers/media/video/tuner-simple.c
@@ -282,6 +282,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)
@@ -752,6 +783,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;
}