From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Fri, 25 Dec 2009 21:04:17 +0000 (-0300)
Subject: V4L/DVB (13848): smsdvb: Add the proper status for IsRfLocked
X-Git-Tag: firefly_0821_release~9833^2~3102^2~335
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b4622c14a1450fa40dd89dc134ec008fd1c2d38c;p=firefly-linux-kernel-4.4.55.git

V4L/DVB (13848): smsdvb: Add the proper status for IsRfLocked

Now, if RF is locked but demod is not locked, it will report:
>>> tuning status == 0x03

This happens, for example, if the device is on DVB-T, and the video
standard is ISDB-T.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---

diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c
index 4784c8f21224..5f3939821ca3 100644
--- a/drivers/media/dvb/siano/smsdvb.c
+++ b/drivers/media/dvb/siano/smsdvb.c
@@ -380,10 +380,10 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
 						DVB3_EVENT_UNC_ERR);
 
 		} else {
-			/*client->fe_status =
-				(phdr->msgType == MSG_SMS_NO_SIGNAL_IND) ?
-				0 : FE_HAS_SIGNAL;*/
-			client->fe_status = 0;
+			if (client->sms_stat_dvb.ReceptionData.IsRfLocked)
+				client->fe_status = FE_HAS_SIGNAL | FE_HAS_CARRIER;
+			else
+				client->fe_status = 0;
 			sms_board_dvb3_event(client, DVB3_EVENT_FE_UNLOCK);
 		}
 	}