From 4abe9f9d94e60303c30b1a9bbbc8e6532f6138cb Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sat, 5 May 2007 12:15:57 -0300 Subject: V4L/DVB (5633): Tuv1236d: move rf input switching code into dvb-pll This patch removes duplicate code from cx88-dvb and saa7134-dvb that handles rf input switching for the TUV1236d tuner. The functionality is added to dvb-pll, where all the other code that handles the TUV1236d is kept. Signed-off-by: Michael Krufky Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/frontends/dvb-pll.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'drivers/media/dvb/frontends/dvb-pll.c') diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c index 0e3195f9575..1363cc8c906 100644 --- a/drivers/media/dvb/frontends/dvb-pll.c +++ b/drivers/media/dvb/frontends/dvb-pll.c @@ -343,11 +343,25 @@ EXPORT_SYMBOL(dvb_pll_tdhu2); /* Philips TUV1236D * used in ATI HDTV Wonder */ +static void tuv1236d_rf(u8 *buf, const struct dvb_frontend_parameters *params) +{ + switch (params->u.vsb.modulation) { + case QAM_64: + case QAM_256: + buf[3] |= 0x08; + break; + case VSB_8: + default: + buf[3] &= ~0x08; + } +} + struct dvb_pll_desc dvb_pll_tuv1236d = { .name = "Philips TUV1236D", .min = 54000000, .max = 864000000, .iffreq= 44000000, + .set = tuv1236d_rf, .count = 3, .entries = { { 157250000, 62500, 0xc6, 0x41 }, -- cgit v1.2.3