aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-04-22 13:45:55 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:07:50 -0400
commit02f5f4448464fea9c19e6b5ff5c67e874c898834 (patch)
tree101b439bf48ddaa67292f098913cbd0700fd5080
parentf4173d0f75e55091d8b52145005bee11bc26c046 (diff)
V4L/DVB (7355): tuner-simple: use separate inputs for vsb and qam on tuv1236d & fcv1236d
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/tuner-simple.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c
index b6587300bb8f..8ecd92324c49 100644
--- a/drivers/media/video/tuner-simple.c
+++ b/drivers/media/video/tuner-simple.c
@@ -268,6 +268,37 @@ static int simple_config_lookup(struct dvb_frontend *fe,
268 268
269/* ---------------------------------------------------------------------- */ 269/* ---------------------------------------------------------------------- */
270 270
271static void simple_set_rf_input(struct dvb_frontend *fe,
272 u8 *config, u8 *cb, unsigned int rf)
273{
274 struct tuner_simple_priv *priv = fe->tuner_priv;
275
276 switch (priv->type) {
277 case TUNER_PHILIPS_TUV1236D:
278 switch (rf) {
279 case 1:
280 *cb |= 0x08;
281 break;
282 default:
283 *cb &= ~0x08;
284 break;
285 }
286 break;
287 case TUNER_PHILIPS_ATSC:
288 switch (rf) {
289 case 1:
290 *cb |= 0x01;
291 break;
292 default:
293 *cb &= ~0x01;
294 break;
295 }
296 break;
297 default:
298 break;
299 }
300}
301
271static int simple_std_setup(struct dvb_frontend *fe, 302static int simple_std_setup(struct dvb_frontend *fe,
272 struct analog_parameters *params, 303 struct analog_parameters *params,
273 u8 *config, u8 *cb) 304 u8 *config, u8 *cb)
@@ -725,6 +756,24 @@ static void simple_set_dvb(struct dvb_frontend *fe, u8 *buf,
725 params->frequency >= 158870000) 756 params->frequency >= 158870000)
726 buf[3] |= 0x08; 757 buf[3] |= 0x08;
727 break; 758 break;
759 case TUNER_PHILIPS_TUV1236D:
760 case TUNER_PHILIPS_ATSC:
761 {
762 unsigned int new_rf;
763
764 switch (params->u.vsb.modulation) {
765 case QAM_64:
766 case QAM_256:
767 new_rf = 1;
768 break;
769 case VSB_8:
770 default:
771 new_rf = 0;
772 break;
773 }
774 simple_set_rf_input(fe, &buf[2], &buf[3], new_rf);
775 break;
776 }
728 default: 777 default:
729 break; 778 break;
730 } 779 }