Skip to contentSkip to conversation

cxd2820r_t2: Multistream support (MultiPLP)

PATCH In review CrazyCat 2 participants 3 messages Mar 7, 2013 – Apr 3, 2013

Subsystems (2)
lore
Share & tools
lore

CrazyCat

author
#0 lore raw

PATCH 1/1 cxd2820r_t2: Multistream support (MultiPLP)

MultiPLP filtering support for CXD2820r, not tested.
Somebody from Russia please test (exclude Moscow, because used singlePLP). Usual used PLP 0 (4TV + 3 radio) and 1 (4TV). PLP 2,3 reserved (regional channels).

P.S. You can use my scan-s2 with multistream support - https://bitbucket.org/CrazyCat/scan-s2. Generated channel list compatible with current VDR 1.7.3x

drivers/media/dvb-frontends/cxd2820r_core.c +2 -1
index 9b658c1..7ca5c69 100644
@@ -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,
drivers/media/dvb-frontends/cxd2820r_t2.c +17 -0
index e82d82a..c2bfea7 100644
@@ -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;
#1 lore raw

Is there anyone who could test that patch?

I have no multi PLP signal here.

Also there is minor issue on that patch. As stream ID validy is already checked there is no reason for bit AND 0xff.

Antti

Quoted 53 lines · CrazyCat

MultiPLP filtering support for CXD2820r, not tested.
Somebody from Russia please test (exclude Moscow, because used singlePLP). Usual used PLP 0 (4TV + 3 radio) and 1 (4TV). PLP 2,3 reserved (regional channels).

P.S. You can use my scan-s2 with multistream support - https://bitbucket.org/CrazyCat/scan-s2. Generated channel list compatible with current VDR 1.7.3x

drivers/media/dvb-frontends/cxd2820r_core.c +2 -1
index 9b658c1..7ca5c69 100644
@@ -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,
drivers/media/dvb-frontends/cxd2820r_t2.c +17 -1
index e82d82a..c2bfea7 100644
@@ -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;
--

To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
http://palosaari.fi/