aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/frontends/dvb-pll.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-05-05 12:15:57 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-07-18 14:23:14 -0300
commit4abe9f9d94e60303c30b1a9bbbc8e6532f6138cb (patch)
treec71ff23ff82c19edadddca9aed2b00b43bf6f18a /drivers/media/dvb/frontends/dvb-pll.c
parent77d675047062d514acdc1bbe9f84658b39f99abe (diff)
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 <mkrufky@linuxtv.org> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/dvb-pll.c')
-rw-r--r--drivers/media/dvb/frontends/dvb-pll.c14
1 files changed, 14 insertions, 0 deletions
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 },