diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2006-01-30 20:30:40 -0500 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2006-01-30 20:30:40 -0500 |
commit | df231d4b39f89f136f57c52a1a8dff71350338e8 (patch) | |
tree | 13347e0a337121b5cb7d14e6cec0923cc9a794a9 /linux/drivers/media/video/tuner-simple.c | |
parent | aa771efa203137dff408d5e8002da2dbea0f41df (diff) | |
download | mediapointer-dvb-s2-df231d4b39f89f136f57c52a1a8dff71350338e8.tar.gz mediapointer-dvb-s2-df231d4b39f89f136f57c52a1a8dff71350338e8.tar.bz2 |
use default tuner_params if desired_type not available
From: Michael Krufky <mkrufky@linuxtv.org>
If a given tuner definition contains more than one tuner_params array members,
it will try to select the appropriate tuner_params based on the video standard
in use. If there is no tuner_params defined for the current video standard, it
will select the default, tuner_params[0]
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/video/tuner-simple.c')
-rw-r--r-- | linux/drivers/media/video/tuner-simple.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tuner-simple.c b/linux/drivers/media/video/tuner-simple.c index 658d3b265..508227c3f 100644 --- a/linux/drivers/media/video/tuner-simple.c +++ b/linux/drivers/media/video/tuner-simple.c @@ -189,6 +189,10 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) continue; break; } + /* use default tuner_params if desired_type not available */ + if (desired_type != tun->params[j].type) + j = 0; + for (i = 0; i < tun->params[j].count; i++) { if (freq > tun->params[j].ranges[i].limit) continue; @@ -366,6 +370,9 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) continue; break; } + /* use default tuner_params if desired_type not available */ + if (desired_type != tun->params[j].type) + j = 0; div = (20 * freq / 16000) + (int)(20*10.7); /* IF 10.7 MHz */ buffer[2] = (tun->params[j].ranges[0].config & ~TUNER_RATIO_MASK) | TUNER_RATIO_SELECT_50; /* 50 kHz step */ |