From: Manu Abraham <abraham.manu@gmail.com>
To: linux-kernel@vger.kernel.org, v4l-dvb-maintainer@linuxtv.org,
akpm@linux-foundation.org
Cc: Arvo Jarve <arvo@softshark.ee>
Subject: DVB Update [PATCH 15/31] add event with changed status
Date: Fri, 05 Sep 2008 00:25:37 +0400 [thread overview]
Message-ID: <48C04441.5030608@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 543 bytes --]
>From 8053f283eb95229023d30a431e76823acaf4a617 Mon Sep 17 00:00:00 2001
From: Manu Abraham <manu@linuxtv.org>
Date: Thu, 4 Sep 2008 13:50:56 +0200
Subject: [PATCH] DVB Add event only with changed status
The event list was updated continuously, add to the event list
only when the status has changed
From: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
dvb_frontend.c | 35 ++++++++++++++++++++++-------------
1 file changed, 22 insertions(+), 13 deletions(-)
[-- Attachment #2: 15.patch --]
[-- Type: text/x-patch, Size: 2872 bytes --]
>From 8053f283eb95229023d30a431e76823acaf4a617 Mon Sep 17 00:00:00 2001
From: Manu Abraham <manu@linuxtv.org>
Date: Thu, 4 Sep 2008 13:50:56 +0200
Subject: [PATCH] DVB Add event only with changed status
The event list was updated continuously, add to the event list
only when the status has changed
From: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 3ca28d0..93b08fa 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -586,10 +586,13 @@ static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status)
e = &events->events[events->eventw];
- if (fe->legacy)
+ if (fe->legacy) {
memcpy(&e->parameters, &fepriv->parameters, sizeof (struct dvb_frontend_parameters));
- else
+ e->status = status;
+ } else {
memcpy(&e->fe_params, &fepriv->fe_params, sizeof (struct dvbfe_params));
+ e->fe_events.status = status;
+ }
if (fe->legacy) {
/* Legacy */
@@ -606,8 +609,6 @@ static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status)
mutex_unlock(&events->mtx);
- e->status = status;
-
wake_up_interruptible (&events->wait_queue);
}
@@ -1211,19 +1212,13 @@ restart:
/* We did do a search as was requested, the flags are
* now unset as well and has the flags wrt to search.
*/
+ } else {
+ fepriv->algo_status &= ~DVBFE_ALGO_SEARCH_AGAIN;
}
- 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;
+ dprintk("%s: STATUS = DVBFE_ALGO_SEARCH_SUCCESS\n", __func__);
if (fe->ops.track) {
dprintk("%s: TRACK callback exists at 0x%p\n", __func__, fe->ops.track);
#if 0
@@ -1234,6 +1229,20 @@ restart:
#endif
fe->ops.track(fe, fe_params, &fepriv->delay);
}
+ } 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:
reply other threads:[~2008-09-04 20:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48C04441.5030608@gmail.com \
--to=abraham.manu@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arvo@softshark.ee \
--cc=linux-kernel@vger.kernel.org \
--cc=v4l-dvb-maintainer@linuxtv.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.