summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-06-19 20:05:12 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-06-19 20:05:12 +0000
commitd1d2c497c261f42502519d510765671a75f2326e (patch)
tree8b92ae1a6d0ee294ec4bd15f7e3906ff4526137a /linux/drivers/media
parent250cbe7a3a1f0dbd96944b365993b8a34179f665 (diff)
downloadmediapointer-dvb-s2-d1d2c497c261f42502519d510765671a75f2326e.tar.gz
mediapointer-dvb-s2-d1d2c497c261f42502519d510765671a75f2326e.tar.bz2
- Changing radio mode stereo/mono for tea5767 working.
- is not clear at V4L1 API if VIDIOCSTUNER can change to mono. support for changing implemented anyway to allow radio st/mono switch. - Issue to solve: tea indicates stereo even when switched to mono. signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c12
-rw-r--r--linux/drivers/media/video/tea5767.c11
-rw-r--r--linux/drivers/media/video/tuner-core.c11
3 files changed, 25 insertions, 9 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index f508b1256..3a06448df 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-video.c,v 1.68 2005/06/19 15:59:25 mchehab Exp $
+ * $Id: cx88-video.c,v 1.69 2005/06/19 20:05:12 mchehab Exp $
*
* device driver for Conexant 2388x based TV cards
* video4linux video interface
@@ -1760,6 +1760,16 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
*id = 0;
return 0;
}
+ case VIDIOCSTUNER:
+ {
+ struct video_tuner *v = arg;
+
+ if (v->tuner) /* Only tuner 0 */
+ return -EINVAL;
+
+ cx88_call_i2c_clients(dev->core,VIDIOCSTUNER,v);
+ return 0;
+ }
case VIDIOC_S_TUNER:
{
struct v4l2_tuner *t = arg;
diff --git a/linux/drivers/media/video/tea5767.c b/linux/drivers/media/video/tea5767.c
index 7eee795c7..c3154c740 100644
--- a/linux/drivers/media/video/tea5767.c
+++ b/linux/drivers/media/video/tea5767.c
@@ -2,7 +2,7 @@
* For Philips TEA5767 FM Chip used on some TV Cards like Prolink Pixelview
* I2C address is allways 0xC0.
*
- * $Id: tea5767.c,v 1.8 2005/06/19 15:59:25 mchehab Exp $
+ * $Id: tea5767.c,v 1.9 2005/06/19 20:05:12 mchehab Exp $
*
* Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@brturbo.com.br)
* This code is placed under the terms of the GNU General Public License
@@ -148,9 +148,12 @@ static void set_radio_freq(struct i2c_client *c, unsigned int frq)
buffer[4]=0;
- if (!t->audmode == V4L2_TUNER_MODE_MONO)
- buffer[3] |= TEA5767_MONO;
-
+ if (t->audmode == V4L2_TUNER_MODE_MONO) {
+ tuner_dbg("TEA5767 set to mono\n");
+ buffer[2] |= TEA5767_MONO;
+ } else
+ tuner_dbg("TEA5767 set to stereo\n");
+
switch (t->type) {
case TEA5767_HIGH_LO_13MHz:
tuner_dbg("TEA5767 radio HIGH LO inject xtal @ 13 MHz\n");
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index 6bebe514a..e360a5c02 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.24 2005/06/19 17:17:34 mchehab Exp $
+ * $Id: tuner-core.c,v 1.25 2005/06/19 20:05:12 mchehab Exp $
*
* i2c tv tuner chip device driver
* core core, i.e. kernel interfaces, registering and so on
@@ -515,14 +515,17 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
struct v4l2_tuner tuner;
CHECK_ADDR(radio_tuner,"VIDIOCSTUNER","radio");
- CHECK_V4L2;
+/* CHECK_V4L2; */
memcpy (&tuner, t, sizeof(struct v4l2_tuner) );
- if ( VIDEO_TUNER_STEREO_ON & vt->flags)
+ if ( VIDEO_TUNER_STEREO_ON & vt->flags) {
+ tuner_dbg ("radio: stereo\n");
tuner.audmode=V4L2_TUNER_MODE_STEREO;
- else
+ } else {
+ tuner_dbg ("radio: mono\n");
tuner.audmode=V4L2_TUNER_MODE_MONO;
+ }
if (t->set_tuner) {
t->set_tuner(client,&tuner);