public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 8/9] stv090x: additional check for packet delineator lock in stv090x_read_status
@ 2009-11-02 22:51 Andreas Regel
  0 siblings, 0 replies; only message in thread
From: Andreas Regel @ 2009-11-02 22:51 UTC (permalink / raw)
  To: linux-media

This patch add an additional check for packet delineator lock in stv090x_read_status in case of a tuned DVB-S2 signal.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>

diff -r 07782fabbff1 linux/drivers/media/dvb/frontends/stv090x.c
--- a/linux/drivers/media/dvb/frontends/stv090x.c	Mon Nov 02 23:09:33 2009 +0100
+++ b/linux/drivers/media/dvb/frontends/stv090x.c	Mon Nov 02 23:15:41 2009 +0100
@@ -4136,7 +4136,6 @@
 	return DVBFE_ALGO_SEARCH_ERROR;
 }
 
-/* FIXME! */
 static int stv090x_read_status(struct dvb_frontend *fe, enum fe_status *status)
 {
 	struct stv090x_state *state = fe->demodulator_priv;
@@ -4158,9 +4157,15 @@
 		dprintk(FE_DEBUG, 1, "Delivery system: DVB-S2");
 		reg = STV090x_READ_DEMOD(state, DSTATUS);
 		if (STV090x_GETFIELD_Px(reg, LOCK_DEFINITIF_FIELD)) {
-			reg = STV090x_READ_DEMOD(state, TSSTATUS);
-			if (STV090x_GETFIELD_Px(reg, TSFIFO_LINEOK_FIELD)) {
-				*status = FE_HAS_CARRIER | FE_HAS_VITERBI | FE_HAS_SYNC | FE_HAS_LOCK;
+			reg = STV090x_READ_DEMOD(state, PDELSTATUS1);
+			if (STV090x_GETFIELD_Px(reg, PKTDELIN_LOCK_FIELD)) {
+				reg = STV090x_READ_DEMOD(state, TSSTATUS);
+				if (STV090x_GETFIELD_Px(reg, TSFIFO_LINEOK_FIELD)) {
+					*status = FE_HAS_CARRIER |
+						  FE_HAS_VITERBI |
+						  FE_HAS_SYNC |
+						  FE_HAS_LOCK;
+				}
 			}
 		}
 		break;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-02 22:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-02 22:51 [PATCH 8/9] stv090x: additional check for packet delineator lock in stv090x_read_status Andreas Regel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox