diff options
author | Michael Krufky <devnull@localhost> | 2006-01-23 04:28:12 +0000 |
---|---|---|
committer | Michael Krufky <devnull@localhost> | 2006-01-23 04:28:12 +0000 |
commit | 5d0f5320141f17233a31cbd93e569d0db79f51bf (patch) | |
tree | aa441396bf6ff16233e94df770d40fc153bd41a1 /linux/drivers/media/video/tuner-simple.c | |
parent | 0e8d89adbdf6f9d47d98227fd64e1ae9cdc3ec2f (diff) | |
download | mediapointer-dvb-s2-5d0f5320141f17233a31cbd93e569d0db79f51bf.tar.gz mediapointer-dvb-s2-5d0f5320141f17233a31cbd93e569d0db79f51bf.tar.bz2 |
move config byte from tuner_params to tuner_range struct.
- move config byte from tuner_params to tuner_range struct.
- dvb tuners must be able to set different config byte for each range.
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Diffstat (limited to 'linux/drivers/media/video/tuner-simple.c')
-rw-r--r-- | linux/drivers/media/video/tuner-simple.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/linux/drivers/media/video/tuner-simple.c b/linux/drivers/media/video/tuner-simple.c index d3344466b..4bb5ca492 100644 --- a/linux/drivers/media/video/tuner-simple.c +++ b/linux/drivers/media/video/tuner-simple.c @@ -1,5 +1,5 @@ /* - * $Id: tuner-simple.c,v 1.72 2006/01/23 04:25:01 mkrufky Exp $ + * $Id: tuner-simple.c,v 1.73 2006/01/23 04:28:12 mkrufky Exp $ * * i2c tv tuner chip device driver * controls all those simple 4-control-bytes style tuners. @@ -159,7 +159,7 @@ static int tuner_mode (struct i2c_client *c) static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) { struct tuner *t = i2c_get_clientdata(c); - u8 cb, tuneraddr; + u8 config, cb, tuneraddr; u16 div; struct tunertype *tun; u8 buffer[4]; @@ -178,6 +178,7 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) freq, tun->params[j].ranges[i - 1].limit); freq = tun->params[j].ranges[--i].limit; } + config = tun->params[j].ranges[i].config; cb = tun->params[j].ranges[i].cb; /* i == 0 -> VHF_LO */ /* i == 1 -> VHF_HI */ @@ -241,7 +242,7 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) case TUNER_MICROTUNE_4042FI5: /* Set the charge pump for fast tuning */ - tun->params[j].config |= TUNER_CHARGE_PUMP; + config |= TUNER_CHARGE_PUMP; break; case TUNER_PHILIPS_TUV1236D: @@ -302,14 +303,14 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) div); if (tuners[t->type].params->cb_first_if_lower_freq && div < t->last_div) { - buffer[0] = tun->params[j].config; + buffer[0] = config; buffer[1] = cb; buffer[2] = (div>>8) & 0x7f; buffer[3] = div & 0xff; } else { buffer[0] = (div>>8) & 0x7f; buffer[1] = div & 0xff; - buffer[2] = tun->params[j].config; + buffer[2] = config; buffer[3] = cb; } t->last_div = div; @@ -338,10 +339,10 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) } /* Set the charge pump for optimized phase noise figure */ - tun->params[j].config &= ~TUNER_CHARGE_PUMP; + config &= ~TUNER_CHARGE_PUMP; buffer[0] = (div>>8) & 0x7f; buffer[1] = div & 0xff; - buffer[2] = tun->params[j].config; + buffer[2] = config; buffer[3] = cb; tuner_dbg("tv 0x%02x 0x%02x 0x%02x 0x%02x\n", buffer[0],buffer[1],buffer[2],buffer[3]); @@ -363,7 +364,7 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) j = TUNER_PARAM_ANALOG; div = (20 * freq / 16000) + (int)(20*10.7); /* IF 10.7 MHz */ - buffer[2] = (tun->params[j].config & ~TUNER_RATIO_MASK) | TUNER_RATIO_SELECT_50; /* 50 kHz step */ + buffer[2] = (tun->params[j].ranges[0].config & ~TUNER_RATIO_MASK) | TUNER_RATIO_SELECT_50; /* 50 kHz step */ switch (t->type) { case TUNER_TENA_9533_DI: |