DVB Update [PATCH 15/31] multiproto tree
Quoted 1 line
From
8053f283eb95229023d30a431e76823acaf4a617Mon Sep 17 00:00:00 2001
From: Manu Abraham <[email protected]>
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 <[email protected]>
Signed-off-by Arvo Jarve <[email protected]>
Signed-off-by Manu Abraham <[email protected]>
dvb_frontend.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-)
Quoted 1 line
From
8053f283eb95229023d30a431e76823acaf4a617Mon Sep 17 00:00:00 2001
From: Manu Abraham <[email protected]>
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 <[email protected]>
Signed-off-by Arvo Jarve <[email protected]>
Signed-off-by Manu Abraham <[email protected]>
drivers/media/dvb/dvb-core/dvb_frontend.c +22 -13
@@ -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 :