summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tuner-simple.c
diff options
context:
space:
mode:
authorMichael Krufky2008-04-22 19:45:53 +0200
committerMauro Carvalho Chehab2008-04-24 19:07:50 +0200
commit23a88108cf6d5fa8073a3b2af804fff7305e86e3 (patch)
treeb7bf10eb06237c13d4ea69d8d46637b14e939d93 /drivers/media/video/tuner-simple.c
parentV4L/DVB (7351): tuner-simple: add init and sleep methods (diff)
downloadkernel-qcow2-linux-23a88108cf6d5fa8073a3b2af804fff7305e86e3.tar.gz
kernel-qcow2-linux-23a88108cf6d5fa8073a3b2af804fff7305e86e3.tar.xz
kernel-qcow2-linux-23a88108cf6d5fa8073a3b2af804fff7305e86e3.zip
V4L/DVB (7352): tuner-simple: enable digital tuning support for Philips FMD1216ME
Enable digital tuning support within tuner-simple. This will allow for a single tuner module to manage the hardware, without having dvb-pll loaded. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tuner-simple.c')
-rw-r--r--drivers/media/video/tuner-simple.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c
index 3a27d4a8ce38..b6587300bb8f 100644
--- a/drivers/media/video/tuner-simple.c
+++ b/drivers/media/video/tuner-simple.c
@@ -714,6 +714,22 @@ static int simple_set_params(struct dvb_frontend *fe,
return ret;
}
+static void simple_set_dvb(struct dvb_frontend *fe, u8 *buf,
+ const struct dvb_frontend_parameters *params)
+{
+ struct tuner_simple_priv *priv = fe->tuner_priv;
+
+ switch (priv->type) {
+ case TUNER_PHILIPS_FMD1216ME_MK3:
+ if (params->u.ofdm.bandwidth == BANDWIDTH_8_MHZ &&
+ params->frequency >= 158870000)
+ buf[3] |= 0x08;
+ break;
+ default:
+ break;
+ }
+}
+
static int simple_dvb_configure(struct dvb_frontend *fe, u8 *buf,
const struct dvb_frontend_parameters *params)
{
@@ -737,6 +753,8 @@ static int simple_dvb_configure(struct dvb_frontend *fe, u8 *buf,
buf[2] = config;
buf[3] = cb;
+ simple_set_dvb(fe, buf, params);
+
tuner_dbg("%s: div=%d | buf=0x%02x,0x%02x,0x%02x,0x%02x\n",
tun->name, div, buf[0], buf[1], buf[2], buf[3]);