public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: "Igor M. Liplianin" <liplianin@me.by>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 6/9 v2] ds3000: yet clean up in tune procedure
Date: Thu, 24 Feb 2011 16:08:33 -0300	[thread overview]
Message-ID: <4D66ACB1.5030108@infradead.org> (raw)
In-Reply-To: <201102020040.57353.liplianin@me.by>

Hi Igor,

Em 01-02-2011 20:40, Igor M. Liplianin escreveu:
> Remove a lot of debug messages and delays.

This patch didn't apply, probably because of the removal of the first one. 
Please fix and resend. The better is to join patches 5/9 and 6/9.

Thanks!
Mauro.
> 
> Signed-off-by: Igor M. Liplianin <liplianin@me.by>
> ---
>  drivers/media/dvb/frontends/ds3000.c |   50 +++++-----------------------------
>  1 files changed, 7 insertions(+), 43 deletions(-)
> 
> diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
> index 7c61936..11f1aa2 100644
> --- a/drivers/media/dvb/frontends/ds3000.c
> +++ b/drivers/media/dvb/frontends/ds3000.c
> @@ -536,25 +536,6 @@ static int ds3000_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t 
> voltage)
>  	return 0;
>  }
>  
> -static void ds3000_dump_registers(struct dvb_frontend *fe)
> -{
> -	struct ds3000_state *state = fe->demodulator_priv;
> -	int x, y, reg = 0, val;
> -
> -	for (y = 0; y < 16; y++) {
> -		dprintk("%s: %02x: ", __func__, y);
> -		for (x = 0; x < 16; x++) {
> -			reg = (y << 4) + x;
> -			val = ds3000_readreg(state, reg);
> -			if (x != 15)
> -				dprintk("%02x ",  val);
> -			else
> -				dprintk("%02x\n", val);
> -		}
> -	}
> -	dprintk("%s: -- DS3000 DUMP DONE --\n", __func__);
> -}
> -
>  static int ds3000_read_status(struct dvb_frontend *fe, fe_status_t* status)
>  {
>  	struct ds3000_state *state = fe->demodulator_priv;
> @@ -589,16 +570,6 @@ static int ds3000_read_status(struct dvb_frontend *fe, fe_status_t* status)
>  	return 0;
>  }
>  
> -#define FE_IS_TUNED (FE_HAS_SIGNAL + FE_HAS_LOCK)
> -static int ds3000_is_tuned(struct dvb_frontend *fe)
> -{
> -	fe_status_t tunerstat;
> -
> -	ds3000_read_status(fe, &tunerstat);
> -
> -	return ((tunerstat & FE_IS_TUNED) == FE_IS_TUNED);
> -}
> -
>  /* read DS3000 BER value */
>  static int ds3000_read_ber(struct dvb_frontend *fe, u32* ber)
>  {
> @@ -1049,7 +1020,7 @@ static int ds3000_tune(struct dvb_frontend *fe,
>  	struct ds3000_state *state = fe->demodulator_priv;
>  	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
>  
> -	int ret = 0, i;
> +	int i;
>  	u8 status, mlpf, mlpf_new, mlpf_max, mlpf_min, nlpf;
>  	u16 value, ndiv;
>  	u32 f3db;
> @@ -1292,22 +1263,15 @@ static int ds3000_tune(struct dvb_frontend *fe,
>  
>  	/* TODO: calculate and set carrier offset */
>  
> -	/* wait before retrying */
>  	for (i = 0; i < 30 ; i++) {
> -		if (ds3000_is_tuned(fe)) {
> -			dprintk("%s: Tuned\n", __func__);
> -			ds3000_dump_registers(fe);
> -			goto tuned;
> -		}
> -		msleep(1);
> -	}
> -
> -	dprintk("%s: Not tuned\n", __func__);
> -	ds3000_dump_registers(fe);
> +		ds3000_read_status(fe, &status);
> +		if (status && FE_HAS_LOCK)
> +			return 0;
>  
> +		msleep(10);
> +	}
>  
> -tuned:
> -	return ret;
> +	return 1;
>  }
>  
>  static enum dvbfe_algo ds3000_get_algo(struct dvb_frontend *fe)


      reply	other threads:[~2011-02-24 19:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01 22:40 [PATCH 6/9 v2] ds3000: yet clean up in tune procedure Igor M. Liplianin
2011-02-24 19:08 ` Mauro Carvalho Chehab [this message]

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=4D66ACB1.5030108@infradead.org \
    --to=mchehab@infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=liplianin@me.by \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox