linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] tda10071: force modulation to QPSK on DVB-S
@ 2014-07-08  5:53 Antti Palosaari
  2014-07-08  5:53 ` [PATCH 2/4] tda10071: add missing DVB-S2/PSK-8 FEC AUTO Antti Palosaari
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Antti Palosaari @ 2014-07-08  5:53 UTC (permalink / raw)
  To: linux-media; +Cc: Antti Palosaari

Only supported modulation for DVB-S is QPSK. Modulation parameter
contains invalid value for DVB-S on some cases, which leads driver
refusing tuning attempt. Due to that, hard code modulation to QPSK
in case of DVB-S.

Cc: stable@vger.kernel.org
Signed-off-by: Antti Palosaari <crope@iki.fi>
---
 drivers/media/dvb-frontends/tda10071.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c
index 522fe00..49874e7 100644
--- a/drivers/media/dvb-frontends/tda10071.c
+++ b/drivers/media/dvb-frontends/tda10071.c
@@ -668,6 +668,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
 	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 	int ret, i;
 	u8 mode, rolloff, pilot, inversion, div;
+	fe_modulation_t modulation;
 
 	dev_dbg(&priv->i2c->dev,
 			"%s: delivery_system=%d modulation=%d frequency=%d symbol_rate=%d inversion=%d pilot=%d rolloff=%d\n",
@@ -702,10 +703,13 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
 
 	switch (c->delivery_system) {
 	case SYS_DVBS:
+		modulation = QPSK;
 		rolloff = 0;
 		pilot = 2;
 		break;
 	case SYS_DVBS2:
+		modulation = c->modulation;
+
 		switch (c->rolloff) {
 		case ROLLOFF_20:
 			rolloff = 2;
@@ -750,7 +754,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe)
 
 	for (i = 0, mode = 0xff; i < ARRAY_SIZE(TDA10071_MODCOD); i++) {
 		if (c->delivery_system == TDA10071_MODCOD[i].delivery_system &&
-			c->modulation == TDA10071_MODCOD[i].modulation &&
+			modulation == TDA10071_MODCOD[i].modulation &&
 			c->fec_inner == TDA10071_MODCOD[i].fec) {
 			mode = TDA10071_MODCOD[i].val;
 			dev_dbg(&priv->i2c->dev, "%s: mode found=%02x\n",
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/4] tda10071: add missing DVB-S2/PSK-8 FEC AUTO
  2014-07-08  5:53 [PATCH 1/4] tda10071: force modulation to QPSK on DVB-S Antti Palosaari
@ 2014-07-08  5:53 ` Antti Palosaari
  2014-07-08  5:53 ` [PATCH 3/4] tda10071: fix spec inversion reporting Antti Palosaari
  2014-07-08  5:53 ` [PATCH 4/4] tda10071: fix returned symbol rate calculation Antti Palosaari
  2 siblings, 0 replies; 4+ messages in thread
From: Antti Palosaari @ 2014-07-08  5:53 UTC (permalink / raw)
  To: linux-media; +Cc: Antti Palosaari

FEC AUTO is valid for PSK-8 modulation too. Add it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
---
 drivers/media/dvb-frontends/tda10071_priv.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/dvb-frontends/tda10071_priv.h b/drivers/media/dvb-frontends/tda10071_priv.h
index 4baf14b..4204861 100644
--- a/drivers/media/dvb-frontends/tda10071_priv.h
+++ b/drivers/media/dvb-frontends/tda10071_priv.h
@@ -55,6 +55,7 @@ static struct tda10071_modcod {
 	{ SYS_DVBS2, QPSK,  FEC_8_9,  0x0a },
 	{ SYS_DVBS2, QPSK,  FEC_9_10, 0x0b },
 	/* 8PSK */
+	{ SYS_DVBS2, PSK_8, FEC_AUTO, 0x00 },
 	{ SYS_DVBS2, PSK_8, FEC_3_5,  0x0c },
 	{ SYS_DVBS2, PSK_8, FEC_2_3,  0x0d },
 	{ SYS_DVBS2, PSK_8, FEC_3_4,  0x0e },
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/4] tda10071: fix spec inversion reporting
  2014-07-08  5:53 [PATCH 1/4] tda10071: force modulation to QPSK on DVB-S Antti Palosaari
  2014-07-08  5:53 ` [PATCH 2/4] tda10071: add missing DVB-S2/PSK-8 FEC AUTO Antti Palosaari
@ 2014-07-08  5:53 ` Antti Palosaari
  2014-07-08  5:53 ` [PATCH 4/4] tda10071: fix returned symbol rate calculation Antti Palosaari
  2 siblings, 0 replies; 4+ messages in thread
From: Antti Palosaari @ 2014-07-08  5:53 UTC (permalink / raw)
  To: linux-media; +Cc: Antti Palosaari

Inversion ON was reported as inversion OFF and vice versa.

Signed-off-by: Antti Palosaari <crope@iki.fi>
---
 drivers/media/dvb-frontends/tda10071.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c
index 49874e7..d590798 100644
--- a/drivers/media/dvb-frontends/tda10071.c
+++ b/drivers/media/dvb-frontends/tda10071.c
@@ -838,10 +838,10 @@ static int tda10071_get_frontend(struct dvb_frontend *fe)
 
 	switch ((buf[1] >> 0) & 0x01) {
 	case 0:
-		c->inversion = INVERSION_OFF;
+		c->inversion = INVERSION_ON;
 		break;
 	case 1:
-		c->inversion = INVERSION_ON;
+		c->inversion = INVERSION_OFF;
 		break;
 	}
 
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 4/4] tda10071: fix returned symbol rate calculation
  2014-07-08  5:53 [PATCH 1/4] tda10071: force modulation to QPSK on DVB-S Antti Palosaari
  2014-07-08  5:53 ` [PATCH 2/4] tda10071: add missing DVB-S2/PSK-8 FEC AUTO Antti Palosaari
  2014-07-08  5:53 ` [PATCH 3/4] tda10071: fix spec inversion reporting Antti Palosaari
@ 2014-07-08  5:53 ` Antti Palosaari
  2 siblings, 0 replies; 4+ messages in thread
From: Antti Palosaari @ 2014-07-08  5:53 UTC (permalink / raw)
  To: linux-media; +Cc: Antti Palosaari

Detected symbol rate value was returned too small.

Signed-off-by: Antti Palosaari <crope@iki.fi>
---
 drivers/media/dvb-frontends/tda10071.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c
index d590798..9619be5 100644
--- a/drivers/media/dvb-frontends/tda10071.c
+++ b/drivers/media/dvb-frontends/tda10071.c
@@ -860,7 +860,7 @@ static int tda10071_get_frontend(struct dvb_frontend *fe)
 	if (ret)
 		goto error;
 
-	c->symbol_rate = (buf[0] << 16) | (buf[1] << 8) | (buf[2] << 0);
+	c->symbol_rate = ((buf[0] << 16) | (buf[1] << 8) | (buf[2] << 0)) * 1000;
 
 	return ret;
 error:
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-08  5:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-08  5:53 [PATCH 1/4] tda10071: force modulation to QPSK on DVB-S Antti Palosaari
2014-07-08  5:53 ` [PATCH 2/4] tda10071: add missing DVB-S2/PSK-8 FEC AUTO Antti Palosaari
2014-07-08  5:53 ` [PATCH 3/4] tda10071: fix spec inversion reporting Antti Palosaari
2014-07-08  5:53 ` [PATCH 4/4] tda10071: fix returned symbol rate calculation Antti Palosaari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).