[media] af9015: enable 2nd TS flow control when dual mode
authorAntti Palosaari <crope@iki.fi>
Tue, 13 Jun 2017 08:29:50 +0000 (05:29 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 20 Jun 2017 13:24:17 +0000 (10:24 -0300)
It needs to be enabled in order to get stream from slave af9013 demod.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/dvb-usb-v2/af9015.c

index 49aec2f..2b9bb81 100644 (file)
@@ -1132,10 +1132,21 @@ static int af9015_init_endpoint(struct dvb_usb_device *d)
        }
 
        /* enable / disable mp2if2 */
-       if (state->dual_mode)
+       if (state->dual_mode) {
                ret = af9015_set_reg_bit(d, 0xd50b, 0);
-       else
+               if (ret)
+                       goto error;
+               ret = af9015_set_reg_bit(d, 0xd520, 4);
+               if (ret)
+                       goto error;
+       } else {
                ret = af9015_clear_reg_bit(d, 0xd50b, 0);
+               if (ret)
+                       goto error;
+               ret = af9015_clear_reg_bit(d, 0xd520, 4);
+               if (ret)
+                       goto error;
+       }
 
 error:
        if (ret)