[media] cx231xx: use callback to set agc on PixelView
authorMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 29 Sep 2010 14:07:08 +0000 (11:07 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 29 Dec 2010 10:16:27 +0000 (08:16 -0200)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx231xx/cx231xx-cards.c
drivers/media/video/cx231xx/cx231xx-core.c

index 4d0ab458fa6413f1d3b17a41a8136f4097c3030f..400447fbf7fbaed29f67dc384a2b1c9aea6ab90a 100644 (file)
@@ -34,6 +34,7 @@
 #include <media/cx25840.h>
 #include "dvb-usb-ids.h"
 #include "xc5000.h"
+#include "tda18271.h"
 
 #include "cx231xx.h"
 
@@ -490,6 +491,16 @@ int cx231xx_tuner_callback(void *ptr, int component, int command, int arg)
                                               1);
                        msleep(10);
                }
+       } else if (dev->tuner_type == TUNER_NXP_TDA18271) {
+               switch (command) {
+               case TDA18271_CALLBACK_CMD_AGC_ENABLE:
+                       if (dev->model == CX231XX_BOARD_PV_PLAYTV_USB_HYBRID)
+                               rc = cx231xx_set_agc_analog_digital_mux_select(dev, arg);
+                       break;
+               default:
+                       rc = -EINVAL;
+                       break;
+               }
        }
        return rc;
 }
index 5664bdf7785d3058340c0e346f8ba897ff75894b..d6028c92b6f2e4053c7ab048d5d8babecc2e0994 100644 (file)
@@ -719,7 +719,6 @@ int cx231xx_set_mode(struct cx231xx *dev, enum cx231xx_mode set_mode)
                        break;
                case CX231XX_BOARD_CNXT_RDE_253S:
                case CX231XX_BOARD_CNXT_RDU_253S:
-               case CX231XX_BOARD_PV_PLAYTV_USB_HYBRID:
                        errCode = cx231xx_set_agc_analog_digital_mux_select(dev, 1);
                        break;
                case CX231XX_BOARD_HAUPPAUGE_EXETER: