summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-core
diff options
context:
space:
mode:
authorManu Abraham <manu@linuxtv.org>2008-10-20 13:05:21 +0400
committerManu Abraham <manu@linuxtv.org>2008-10-20 13:05:21 +0400
commit5af7b1c77d823a240dc19f0d61549a5ab9e244e5 (patch)
treef645424f5e77a5fa294b891107627be22606df15 /linux/drivers/media/dvb/dvb-core
parent95c0daf114659d2869c4fd90c735d5393e276f7d (diff)
downloadmediapointer-dvb-s2-5af7b1c77d823a240dc19f0d61549a5ab9e244e5.tar.gz
mediapointer-dvb-s2-5af7b1c77d823a240dc19f0d61549a5ab9e244e5.tar.bz2
Add event with changed status only
From: Arvo Jarve <arvo@softshark.ee> Signed-off-by: Arvo Jarve <arvo@softshark.ee> Signed-off-by: Manu Abraham <manu@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-core')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index ed28a061e..17097cdcb 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -610,27 +610,33 @@ restart:
* requesting a search with a new set of parameters
*/
if (fepriv->algo_status & DVBFE_ALGO_SEARCH_AGAIN) {
- if (fe->ops.search)
+ if (fe->ops.search) {
fepriv->algo_status = fe->ops.search(fe, &fepriv->parameters);
/* We did do a search as was requested, the flags are
* now unset as well and has the flags wrt to search.
*/
-
- fepriv->algo_status &= ~DVBFE_ALGO_SEARCH_AGAIN;
+ } else {
+ fepriv->algo_status &= ~DVBFE_ALGO_SEARCH_AGAIN;
+ }
}
/* Track the carrier if the search was successful */
if (fepriv->algo_status == DVBFE_ALGO_SEARCH_SUCCESS) {
- if (fepriv->algo_status & DVBFE_ALGO_SEARCH_SUCCESS)
- dprintk("%s: status = DVBFE_ALGO_SEARCH_SUCCESS\n", __func__);
- if (fepriv->algo_status & DVBFE_ALGO_SEARCH_FAILED)
- fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN;
-
- fe->ops.read_status(fe, &s);
- dvb_frontend_add_event(fe, s); /* update event list */
- fepriv->status = s;
if (fe->ops.track)
fe->ops.track(fe, &fepriv->parameters);
-
+ } else {
+ fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN;
+ fepriv->delay = HZ / 2;
+ }
+ fe->ops.read_status(fe, &s);
+ if (s != fepriv->status) {
+ dvb_frontend_add_event(fe, s); /* update event list */
+ fepriv->status = s;
+ if (!(s & FE_HAS_LOCK)) {
+ fepriv->delay = HZ / 10;
+ fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN;
+ } else {
+ fepriv->delay = 60 * HZ;
+ }
}
break;
default: