diff options
author | Nickolay V. Shmyrev <devnull@localhost> | 2005-06-16 08:29:49 +0000 |
---|---|---|
committer | Nickolay V. Shmyrev <devnull@localhost> | 2005-06-16 08:29:49 +0000 |
commit | e98a77ecc1772a9a4a4a4e97bdd61b246c07b829 (patch) | |
tree | 6f16abc2e932a4ccac0f8a01cdfda8e0b7332424 /linux/drivers/media/video/tuner-core.c | |
parent | 454ba97a0963dd203c734111f332addfc74a08fc (diff) | |
download | mediapointer-dvb-s2-e98a77ecc1772a9a4a4a4e97bdd61b246c07b829.tar.gz mediapointer-dvb-s2-e98a77ecc1772a9a4a4a4e97bdd61b246c07b829.tar.bz2 |
Make all radio tuners use CAP_LOW
Diffstat (limited to 'linux/drivers/media/video/tuner-core.c')
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 63 |
1 files changed, 16 insertions, 47 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index ca55bd188..c81f87968 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -1,5 +1,5 @@ /* - * $Id: tuner-core.c,v 1.17 2005/06/15 02:43:03 mchehab Exp $ + * $Id: tuner-core.c,v 1.18 2005/06/16 08:29:49 nsh Exp $ * * i2c tv tuner chip device driver * core core, i.e. kernel interfaces, registering and so on @@ -90,25 +90,9 @@ static void set_tv_freq(struct i2c_client *c, unsigned int freq) return; } if (freq < tv_range[0]*16 || freq > tv_range[1]*16) { - if (freq >= tv_range[0]*16000 && freq <= tv_range[1]*16000) { - /* V4L2_TUNER_CAP_LOW frequency */ - - tuner_dbg("V4L2_TUNER_CAP_LOW freq selected for TV. Tuners yet doesn't support converting it to valid freq.\n"); - - t->tv_freq(c,freq/1000); - - return; - } else { - /* FIXME: better do that chip-specific, but - right now we don't have that in the config - struct and this way is still better than no - check at all */ tuner_info("TV freq (%d.%02d) out of range (%d-%d)\n", freq/16,freq%16*100/16,tv_range[0],tv_range[1]); - return; - } } - tuner_dbg("62.5 Khz freq step selected for TV.\n"); t->tv_freq(c,freq); } @@ -124,32 +108,17 @@ static void set_radio_freq(struct i2c_client *c, unsigned int freq) tuner_info("no radio tuning for this one, sorry.\n"); return; } - if (freq < radio_range[0]*16 || freq > radio_range[1]*16) { - if (freq >= radio_range[0]*16000 && freq <= radio_range[1]*16000) { - /* V4L2_TUNER_CAP_LOW frequency */ - if (t->type == TUNER_TEA5767) { - tuner_info("radio freq step 62.5Hz (%d.%06d)\n", - freq/16000,freq%16000*1000/16); - t->radio_freq(c,freq); - return; - } - - tuner_dbg("V4L2_TUNER_CAP_LOW freq selected for Radio. Tuners yet doesn't support converting it to valid freq.\n"); - - tuner_info("radio freq (%d.%02d)\n",(freq/16000),freq%16000*100/16000); - - t->radio_freq(c,freq>>10); - return; - - } else { - tuner_info("radio freq (%d.%02d) out of range (%d-%d)\n", - freq/16,freq%16*100/16, - radio_range[0],radio_range[1]); - return; - } + if (freq >= radio_range[0]*16000 && freq <= radio_range[1]*16000) { + tuner_info("radio freq step 62.5Hz (%d.%06d)\n", + freq/16000,freq%16000*1000/16); + t->radio_freq(c,freq); + } else { + tuner_info("radio freq (%d.%02d) out of range (%d-%d)\n", + freq/16,freq%16*100/16, + radio_range[0],radio_range[1]); } - tuner_dbg("62.5 Khz freq step selected for Radio.\n"); - t->radio_freq(c,freq); + + return; } static void set_freq(struct i2c_client *c, unsigned long freq) @@ -451,9 +420,9 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) vt->signal = t->has_signal(client); if (t->is_stereo) { if (t->is_stereo(client)) - vt-> flags |= VIDEO_TUNER_STEREO_ON; + vt->flags |= VIDEO_TUNER_STEREO_ON; else - vt-> flags &= 0xffff ^ VIDEO_TUNER_STEREO_ON; + vt->flags &= ~VIDEO_TUNER_STEREO_ON; } vt->flags |= V4L2_TUNER_CAP_LOW; /* Allow freqs at 62.5 Hz */ @@ -528,13 +497,13 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) tuner -> signal = t->has_signal(client); if (t->is_stereo) { if (t->is_stereo(client)) { - tuner -> capability |= V4L2_TUNER_CAP_STEREO; tuner -> rxsubchans |= V4L2_TUNER_SUB_STEREO; } else { - tuner -> rxsubchans &= 0xffff ^ V4L2_TUNER_SUB_STEREO; + tuner -> rxsubchans &= V4L2_TUNER_SUB_MONO; } } - tuner -> capability |= V4L2_TUNER_CAP_LOW; + tuner->capability |= V4L2_TUNER_CAP_LOW; + tuner->capability |= V4L2_TUNER_CAP_STEREO; tuner->rangelow = radio_range[0] * 16000; tuner->rangehigh = radio_range[1] * 16000; |