summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-06-20 15:35:05 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-06-20 15:35:05 +0000
commitaac6384c805c0867edcbc45270a63d4e4b366de8 (patch)
tree7de81377856686cc944f2b2c4a1ed18bf24aadb6
parent4e21c63b1bbee8b312500fa3d5ea141ecc9959e2 (diff)
downloadmediapointer-dvb-s2-aac6384c805c0867edcbc45270a63d4e4b366de8.tar.gz
mediapointer-dvb-s2-aac6384c805c0867edcbc45270a63d4e4b366de8.tar.bz2
This is some small changes on tuner-core.c to correct API behavior for stereo:
- v4l2_tuner has three fields for audio mode: capability (bitmask, says what the hardware is able to do). rxsubchans (bitmask, which channels are available). audmode (enum, current mode). For radio seeing a stereo signal but sending mono the driver can simply set this: rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO; audmode = V4L2_TUNER_MODE_MONO; - VIDIOCSTUNER should not allow turning stereo/mono. Code commented. It will be removed soon. Signed-off-by: Gerd Knorr <kraxel@bytesex.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
-rw-r--r--linux/drivers/media/video/tuner-core.c16
-rw-r--r--v4l/ChangeLog32
2 files changed, 39 insertions, 9 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index bda1fbbda..d86e234e3 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.26 2005/06/19 23:52:22 mchehab Exp $
+ * $Id: tuner-core.c,v 1.27 2005/06/20 15:35:05 mchehab Exp $
*
* i2c tv tuner chip device driver
* core core, i.e. kernel interfaces, registering and so on
@@ -186,14 +186,12 @@ static void set_type(struct i2c_client *c, unsigned int type)
break;
default:
/* TEA5767 autodetection code */
- if ( c->addr==0x60 ) {
if (tea5767_tuner_init(c)!=EINVAL) {
t->type = TUNER_TEA5767;
if (first_tuner == 0x60)
first_tuner++;
break;
}
- }
default_tuner_init(c);
break;
@@ -502,17 +500,16 @@ 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 -> rxsubchans |= V4L2_TUNER_SUB_STEREO;
+ tuner -> rxsubchans = V4L2_TUNER_SUB_STEREO | V4L2_TUNER_SUB_MONO;
} else {
- tuner -> rxsubchans &= V4L2_TUNER_SUB_MONO;
+ tuner -> rxsubchans = V4L2_TUNER_SUB_MONO;
}
}
- tuner->capability |= V4L2_TUNER_CAP_LOW;
- tuner->capability |= V4L2_TUNER_CAP_STEREO;
+ tuner->capability |= V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;
+ tuner->audmode = t->audmode;
tuner->rangelow = radio_range[0] * 16000;
tuner->rangehigh = radio_range[1] * 16000;
-
} else {
tuner->rangelow = tv_range[0] * 16;
tuner->rangehigh = tv_range[1] * 16;
@@ -521,6 +518,8 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
}
case VIDIOCSTUNER:
{
+#if 0
+ /* This is NOT an expected valid behavior for V4L1 API CALL... Should be used only for testing purposes */
struct video_tuner *vt = arg;
struct v4l2_tuner tuner;
@@ -543,6 +542,7 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
tuner_dbg ("Unimplemented IOCTL VIDIO_S_TUNER called to tuner-core.\n");
}
break;
+#endif
return 0;
}
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index 0242abfaf..b7dcdf6ce 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,4 +1,20 @@
-2005-06-20 00:49 mkrufky
+2005-06-20 15:25 mchehab
+ *tuner-core.c:
+ - v4l2_tuner has three fields for audio mode:
+ capability (bitmask, says what the hardware is able to do).
+ rxsubchans (bitmask, which channels are available).
+ audmode (enum, current mode).
+ For radio seeing a stereo signal but sending mono the driver
+ can simply set this:
+ rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO;
+ audmode = V4L2_TUNER_MODE_MONO;
+ - VIDIOCSTUNER should not allow turning stereo/mono. Code commented.
+ It will be removed soon.
+
+ Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
+ Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+
+2005-06-20 00:49 mkrufky
* lgdt3302.c:
fixed FEC error status
@@ -21,6 +37,8 @@
- tea5767 autodetection code included.
It uses the same approach as DScaler code.
+ Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+
2005-06-19 14:41 mchehab
* cx88-video.c, tea5767.c, tuner-core.c:
@@ -30,28 +48,38 @@
switch.
- Issue to solve: tea indicates stereo even when switched to mono.
+ Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+
2005-06-19 14:41 mchehab
* tuner-core.c:
- VIDIOCSTUNER ioctl implemented.
+ Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+
2005-06-19 14:41 mchehab
* cx88-video.c, tea5767.c, tuner-core.c, tuner.h:
- Added initial support for changing radio mode stereo/mono for tea5767
+ Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+
2005-06-19 14:41 mchehab
* tuner.h, tuner-core.c:
- Implemented tuner-core support for VIDIO_S_TUNER
- It can be used by changing mono/stereo mode
+ Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+
2005-06-19 13:45 mchehab
* Makefile:
- make install now remove old installs at /lib/modules/<kern ver>/v4l
- make v4l_install now remove kernel modules
+ Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+
2005-06-19 11:43 nshmyrev
* saa7134-cards.c, saa7134.h:
@@ -64,6 +92,8 @@
- make install now installs file over old 2.6 files
- make v4l_install added for old behavior
+ Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+
2005-06-18 14:18 mkrufky
* cx88-cards.c:
- Remove CABLE type setting from DViCO FusionHDTV3 Gold-T.