linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] mn88472: implement dvb-t signal lock
@ 2014-12-13  0:18 Benjamin Larsson
  2014-12-13  0:18 ` [PATCH 2/4] rtl28xxu: swap frontend order for devices with slave demodulators Benjamin Larsson
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Benjamin Larsson @ 2014-12-13  0:18 UTC (permalink / raw)
  To: crope; +Cc: Linux Media Mailing List

Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
---
 drivers/staging/media/mn88472/mn88472.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/mn88472/mn88472.c b/drivers/staging/media/mn88472/mn88472.c
index 107552a..4d80046 100644
--- a/drivers/staging/media/mn88472/mn88472.c
+++ b/drivers/staging/media/mn88472/mn88472.c
@@ -238,6 +238,7 @@ static int mn88472_read_status(struct dvb_frontend *fe, fe_status_t *status)
 	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 	int ret;
 	unsigned int utmp;
+	int lock = 0;
 
 	*status = 0;
 
@@ -248,6 +249,12 @@ static int mn88472_read_status(struct dvb_frontend *fe, fe_status_t *status)
 
 	switch (c->delivery_system) {
 	case SYS_DVBT:
+		ret = regmap_read(dev->regmap[0], 0x7F, &utmp);
+		if (ret)
+			goto err;
+		if ((utmp&0xF) > 8)
+			lock = 1;
+		break;
 	case SYS_DVBT2:
 		/* FIXME: implement me */
 		utmp = 0x08; /* DVB-C lock value */
@@ -262,7 +269,7 @@ static int mn88472_read_status(struct dvb_frontend *fe, fe_status_t *status)
 		goto err;
 	}
 
-	if (utmp == 0x08)
+	if (lock)
 		*status = FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI |
 				FE_HAS_SYNC | FE_HAS_LOCK;
 
-- 
1.9.1


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

end of thread, other threads:[~2014-12-14 19:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-13  0:18 [PATCH 1/4] mn88472: implement dvb-t signal lock Benjamin Larsson
2014-12-13  0:18 ` [PATCH 2/4] rtl28xxu: swap frontend order for devices with slave demodulators Benjamin Larsson
2014-12-13  4:02   ` Antti Palosaari
2014-12-13 11:09     ` Benjamin Larsson
2014-12-13 13:35       ` Antti Palosaari
2014-12-13 18:52         ` Benjamin Larsson
2014-12-14  8:05           ` Antti Palosaari
2014-12-14 19:17             ` Benjamin Larsson
2014-12-13  0:18 ` [PATCH 3/4] mn88472: elaborate debug printout Benjamin Larsson
2014-12-13  4:05   ` Antti Palosaari
2014-12-13  0:18 ` [PATCH 4/4] mn88472: implemented ber reporting Benjamin Larsson
2014-12-13  4:15   ` Antti Palosaari
2014-12-13 11:12     ` Benjamin Larsson
2014-12-14  8:35       ` Antti Palosaari
2014-12-13  3:52 ` [PATCH 1/4] mn88472: implement dvb-t signal lock Antti Palosaari
2014-12-13 11:13   ` Benjamin Larsson

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).