diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-06-06 04:54:42 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-06-06 04:54:42 +0000 |
commit | a1c94280a70a682e3468e3710c3f5790d22a3574 (patch) | |
tree | 53cec362b436ce2a2720e304fef42a07e4bddf8f /linux/drivers/media/video/tuner-core.c | |
parent | 8a59c7d103ce703187bbc6aa1498adfb25dbb12d (diff) | |
download | mediapointer-dvb-s2-a1c94280a70a682e3468e3710c3f5790d22a3574.tar.gz mediapointer-dvb-s2-a1c94280a70a682e3468e3710c3f5790d22a3574.tar.bz2 |
tea5767.c:
- Implemented status dump information for debug
- Signal strengh indication corrected
- Mono/Stereo detection corrected
tuner-core.c:
- Implemented radio stereo indication according w/ V4L and V4L2 API
Diffstat (limited to 'linux/drivers/media/video/tuner-core.c')
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index cb954082b..f44f7d9be 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.8 2005/06/05 17:44:04 mchehab Exp $ + * $Id: tuner-core.c,v 1.9 2005/06/06 04:54:42 mchehab Exp $ * * i2c tv tuner chip device driver * core core, i.e. kernel interfaces, registering and so on @@ -400,8 +400,15 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) CHECK_ADDR(radio_tuner,"VIDIOCGTUNER:"); CHECK_V4L2; - if (V4L2_TUNER_RADIO == t->mode && t->has_signal) - vt->signal = t->has_signal(client); + if (V4L2_TUNER_RADIO == t->mode) { + if (t->has_signal) + vt->signal = t->has_signal(client); + if (t->is_stereo(client)) + vt-> flags |= VIDEO_TUNER_STEREO_ON; + else + vt-> flags &= 0xffff ^ VIDEO_TUNER_STEREO_ON; + } + return 0; } case VIDIOCGAUDIO: @@ -459,8 +466,18 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) CHECK_MODE("VIDIOC_G_TUNER"); SWITCH_V4L2; - if (V4L2_TUNER_RADIO == t->mode && t->has_signal) - tuner->signal = t->has_signal(client); + if (V4L2_TUNER_RADIO == t->mode) { + if (t->has_signal) + tuner -> signal = t->has_signal(client); + if (t->is_stereo(client)) { + tuner -> capability |= V4L2_TUNER_CAP_STEREO; + tuner -> rxsubchans |= V4L2_TUNER_SUB_STEREO; + tuner_dbg("stereo"); + } else { + tuner -> rxsubchans &= 0xffff ^ V4L2_TUNER_SUB_STEREO; + tuner_dbg("mono"); + } + } tuner->rangelow = tv_range[0] * 16; tuner->rangehigh = tv_range[1] * 16; break; |