diff options
author | Arvo Jarve <arvo@softshark.ee> | 2008-10-20 05:05:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 14:53:12 -0500 |
commit | 7bcbdf386bdc2ea2bcd916a7b972ad7bca14db04 (patch) | |
tree | 640a7ce0a7161b5f51d506eaebcc5fadc8baf588 /drivers/media/dvb/dvb-core | |
parent | c59e7870fddbbc232221f92fb24958c605be404c (diff) |
V4L/DVB (9345): Add event with changed status only
Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-core')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index d006f042f22..d30e00ff36f 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -601,27 +601,33 @@ restart: | |||
601 | * requesting a search with a new set of parameters | 601 | * requesting a search with a new set of parameters |
602 | */ | 602 | */ |
603 | if (fepriv->algo_status & DVBFE_ALGO_SEARCH_AGAIN) { | 603 | if (fepriv->algo_status & DVBFE_ALGO_SEARCH_AGAIN) { |
604 | if (fe->ops.search) | 604 | if (fe->ops.search) { |
605 | fepriv->algo_status = fe->ops.search(fe, &fepriv->parameters); | 605 | fepriv->algo_status = fe->ops.search(fe, &fepriv->parameters); |
606 | /* We did do a search as was requested, the flags are | 606 | /* We did do a search as was requested, the flags are |
607 | * now unset as well and has the flags wrt to search. | 607 | * now unset as well and has the flags wrt to search. |
608 | */ | 608 | */ |
609 | 609 | } else { | |
610 | fepriv->algo_status &= ~DVBFE_ALGO_SEARCH_AGAIN; | 610 | fepriv->algo_status &= ~DVBFE_ALGO_SEARCH_AGAIN; |
611 | } | ||
611 | } | 612 | } |
612 | /* Track the carrier if the search was successful */ | 613 | /* Track the carrier if the search was successful */ |
613 | if (fepriv->algo_status == DVBFE_ALGO_SEARCH_SUCCESS) { | 614 | if (fepriv->algo_status == DVBFE_ALGO_SEARCH_SUCCESS) { |
614 | if (fepriv->algo_status & DVBFE_ALGO_SEARCH_SUCCESS) | ||
615 | dprintk("%s: status = DVBFE_ALGO_SEARCH_SUCCESS\n", __func__); | ||
616 | if (fepriv->algo_status & DVBFE_ALGO_SEARCH_FAILED) | ||
617 | fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; | ||
618 | |||
619 | fe->ops.read_status(fe, &s); | ||
620 | dvb_frontend_add_event(fe, s); /* update event list */ | ||
621 | fepriv->status = s; | ||
622 | if (fe->ops.track) | 615 | if (fe->ops.track) |
623 | fe->ops.track(fe, &fepriv->parameters); | 616 | fe->ops.track(fe, &fepriv->parameters); |
624 | 617 | } else { | |
618 | fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; | ||
619 | fepriv->delay = HZ / 2; | ||
620 | } | ||
621 | fe->ops.read_status(fe, &s); | ||
622 | if (s != fepriv->status) { | ||
623 | dvb_frontend_add_event(fe, s); /* update event list */ | ||
624 | fepriv->status = s; | ||
625 | if (!(s & FE_HAS_LOCK)) { | ||
626 | fepriv->delay = HZ / 10; | ||
627 | fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; | ||
628 | } else { | ||
629 | fepriv->delay = 60 * HZ; | ||
630 | } | ||
625 | } | 631 | } |
626 | break; | 632 | break; |
627 | default: | 633 | default: |