[media] cxd2820r_t2: Multistream support (MultiPLP)
authorEvgeny Plehov <EvgenyPlehov@ukr.net>
Mon, 8 Apr 2013 02:56:46 +0000 (23:56 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 8 Apr 2013 10:13:02 +0000 (07:13 -0300)
MultiPLP filtering support for CXD2820r.

Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb-frontends/cxd2820r_core.c
drivers/media/dvb-frontends/cxd2820r_t2.c

index 9b658c1cf39a48b77edd9341140bae751e80a527..7ca5c69dd2007202c2f3492615019f0055393558 100644 (file)
@@ -660,7 +660,8 @@ static const struct dvb_frontend_ops cxd2820r_ops = {
                        FE_CAN_GUARD_INTERVAL_AUTO      |
                        FE_CAN_HIERARCHY_AUTO           |
                        FE_CAN_MUTE_TS                  |
-                       FE_CAN_2G_MODULATION
+                       FE_CAN_2G_MODULATION            |
+                       FE_CAN_MULTISTREAM
                },
 
        .release                = cxd2820r_release,
index e82d82a7a2ebb6e3c8c40e1d6fc4886f0e8fbde9..c2bfea7551e934705073c28b50e498822388841e 100644 (file)
@@ -124,6 +124,23 @@ int cxd2820r_set_frontend_t2(struct dvb_frontend *fe)
        buf[1] = ((if_ctl >>  8) & 0xff);
        buf[2] = ((if_ctl >>  0) & 0xff);
 
+       /* PLP filtering */
+       if (c->stream_id < 0 || c->stream_id > 255) {
+               dev_dbg(&priv->i2c->dev, "%s: Disable PLP filtering\n", __func__);
+               ret = cxd2820r_wr_reg(priv, 0x023ad , 0);
+               if (ret)
+                       goto error;
+       } else {
+               dev_dbg(&priv->i2c->dev, "%s: Enable PLP filtering = %d\n", __func__,
+                               c->stream_id);
+               ret = cxd2820r_wr_reg(priv, 0x023af , c->stream_id & 0xFF);
+               if (ret)
+                       goto error;
+               ret = cxd2820r_wr_reg(priv, 0x023ad , 1);
+               if (ret)
+                       goto error;
+       }
+
        ret = cxd2820r_wr_regs(priv, 0x020b6, buf, 3);
        if (ret)
                goto error;