diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-10-22 00:10:39 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:01:10 -0500 |
commit | 5c82f4497b46e9c3877618bc36661a4abbf9c646 (patch) | |
tree | d2d02350fc5c7f20068fc728745db837f08e2bc6 /drivers/media/video | |
parent | 1b29cedab9e69a6e4c9bba5f1981437b62be7bea (diff) |
V4L/DVB (6442): move std if setting from tda8290 to tda827x
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/tda8290.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c index 288865c3c714..1b19b93eabec 100644 --- a/drivers/media/video/tda8290.c +++ b/drivers/media/video/tda8290.c | |||
@@ -104,45 +104,32 @@ static void set_audio(struct dvb_frontend *fe) | |||
104 | struct tuner *t = priv->t; | 104 | struct tuner *t = priv->t; |
105 | char* mode; | 105 | char* mode; |
106 | 106 | ||
107 | priv->cfg.tda827x_lpsel = 0; | ||
108 | if (t->std & V4L2_STD_MN) { | 107 | if (t->std & V4L2_STD_MN) { |
109 | priv->cfg.sgIF = 92; | ||
110 | priv->tda8290_easy_mode = 0x01; | 108 | priv->tda8290_easy_mode = 0x01; |
111 | priv->cfg.tda827x_lpsel = 1; | ||
112 | mode = "MN"; | 109 | mode = "MN"; |
113 | } else if (t->std & V4L2_STD_B) { | 110 | } else if (t->std & V4L2_STD_B) { |
114 | priv->cfg.sgIF = 108; | ||
115 | priv->tda8290_easy_mode = 0x02; | 111 | priv->tda8290_easy_mode = 0x02; |
116 | mode = "B"; | 112 | mode = "B"; |
117 | } else if (t->std & V4L2_STD_GH) { | 113 | } else if (t->std & V4L2_STD_GH) { |
118 | priv->cfg.sgIF = 124; | ||
119 | priv->tda8290_easy_mode = 0x04; | 114 | priv->tda8290_easy_mode = 0x04; |
120 | mode = "GH"; | 115 | mode = "GH"; |
121 | } else if (t->std & V4L2_STD_PAL_I) { | 116 | } else if (t->std & V4L2_STD_PAL_I) { |
122 | priv->cfg.sgIF = 124; | ||
123 | priv->tda8290_easy_mode = 0x08; | 117 | priv->tda8290_easy_mode = 0x08; |
124 | mode = "I"; | 118 | mode = "I"; |
125 | } else if (t->std & V4L2_STD_DK) { | 119 | } else if (t->std & V4L2_STD_DK) { |
126 | priv->cfg.sgIF = 124; | ||
127 | priv->tda8290_easy_mode = 0x10; | 120 | priv->tda8290_easy_mode = 0x10; |
128 | mode = "DK"; | 121 | mode = "DK"; |
129 | } else if (t->std & V4L2_STD_SECAM_L) { | 122 | } else if (t->std & V4L2_STD_SECAM_L) { |
130 | priv->cfg.sgIF = 124; | ||
131 | priv->tda8290_easy_mode = 0x20; | 123 | priv->tda8290_easy_mode = 0x20; |
132 | mode = "L"; | 124 | mode = "L"; |
133 | } else if (t->std & V4L2_STD_SECAM_LC) { | 125 | } else if (t->std & V4L2_STD_SECAM_LC) { |
134 | priv->cfg.sgIF = 20; | ||
135 | priv->tda8290_easy_mode = 0x40; | 126 | priv->tda8290_easy_mode = 0x40; |
136 | mode = "LC"; | 127 | mode = "LC"; |
137 | } else { | 128 | } else { |
138 | priv->cfg.sgIF = 124; | ||
139 | priv->tda8290_easy_mode = 0x10; | 129 | priv->tda8290_easy_mode = 0x10; |
140 | mode = "xx"; | 130 | mode = "xx"; |
141 | } | 131 | } |
142 | 132 | ||
143 | if (t->mode == V4L2_TUNER_RADIO) | ||
144 | priv->cfg.sgIF = 88; /* if frequency is 5.5 MHz */ | ||
145 | |||
146 | tuner_dbg("setting tda8290 to system %s\n", mode); | 133 | tuner_dbg("setting tda8290 to system %s\n", mode); |
147 | } | 134 | } |
148 | 135 | ||
@@ -368,7 +355,6 @@ static void tda8295_set_freq(struct dvb_frontend *fe, unsigned int freq) | |||
368 | { | 355 | { |
369 | struct tda8290_priv *priv = fe->analog_demod_priv; | 356 | struct tda8290_priv *priv = fe->analog_demod_priv; |
370 | struct tuner *t = priv->t; | 357 | struct tuner *t = priv->t; |
371 | u16 ifc; | ||
372 | 358 | ||
373 | unsigned char blanking_mode[] = { 0x1d, 0x00 }; | 359 | unsigned char blanking_mode[] = { 0x1d, 0x00 }; |
374 | 360 | ||
@@ -381,9 +367,7 @@ static void tda8295_set_freq(struct dvb_frontend *fe, unsigned int freq) | |||
381 | 367 | ||
382 | set_audio(fe); | 368 | set_audio(fe); |
383 | 369 | ||
384 | ifc = priv->cfg.sgIF; /* FIXME */ | 370 | tuner_dbg("%s: freq = %d\n", __FUNCTION__, freq); |
385 | |||
386 | tuner_dbg("%s: ifc = %u, freq = %d\n", __FUNCTION__, ifc, freq); | ||
387 | 371 | ||
388 | tda8295_power(fe, 1); | 372 | tda8295_power(fe, 1); |
389 | tda8295_agc1_out(fe, 1); | 373 | tda8295_agc1_out(fe, 1); |
@@ -625,7 +609,6 @@ int tda8290_attach(struct tuner *t) | |||
625 | 609 | ||
626 | tuner_info("type set to %s\n", t->i2c.name); | 610 | tuner_info("type set to %s\n", t->i2c.name); |
627 | 611 | ||
628 | priv->cfg.tda827x_lpsel = 0; | ||
629 | t->mode = V4L2_TUNER_ANALOG_TV; | 612 | t->mode = V4L2_TUNER_ANALOG_TV; |
630 | 613 | ||
631 | tda8290_init_tuner(&t->fe); | 614 | tda8290_init_tuner(&t->fe); |
@@ -715,7 +698,6 @@ int tda8295_attach(struct tuner *t) | |||
715 | 698 | ||
716 | t->fe.ops.analog_demod_ops = &tda8295_tuner_ops; | 699 | t->fe.ops.analog_demod_ops = &tda8295_tuner_ops; |
717 | 700 | ||
718 | priv->cfg.tda827x_lpsel = 0; | ||
719 | t->mode = V4L2_TUNER_ANALOG_TV; | 701 | t->mode = V4L2_TUNER_ANALOG_TV; |
720 | 702 | ||
721 | tda8295_init_if(&t->fe); | 703 | tda8295_init_if(&t->fe); |