]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: em28xx-cards: disable V4L2 mode for dual tuners
authorMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 28 Jun 2018 18:43:21 +0000 (14:43 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 27 Jul 2018 10:39:57 +0000 (06:39 -0400)
Right now, the code that calculates alternate modes is not ready
for devices with dual tuners. That's ok, as we currently don't
have any such devices, but better to add a warning for such
case, as, if anyone adds such device, the logic will need to
be reviewed.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Acked-by: Brad Love <brad@nextdimension.cc>
Reviewed-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/em28xx/em28xx-cards.c

index 48bc505a872abb818a4adfc03370eb060cbdd8f1..afdc92998fff92160e8652be0c86ac34d9df72a2 100644 (file)
@@ -3861,6 +3861,17 @@ static int em28xx_usb_probe(struct usb_interface *intf,
                dev->has_video = false;
        }
 
+       if (dev->board.has_dual_ts &&
+           (dev->tuner_type != TUNER_ABSENT || INPUT(0)->type)) {
+               /*
+                * The logic with sets alternate is not ready for dual-tuners
+                * which analog modes.
+                */
+               dev_err(&intf->dev,
+                       "We currently don't support analog TV or stream capture on dual tuners.\n");
+               has_video = false;
+       }
+
        /* Select USB transfer types to use */
        if (has_video) {
                if (!dev->analog_ep_isoc || (try_bulk && dev->analog_ep_bulk))