diff options
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 22 | ||||
-rw-r--r-- | linux/include/media/tuner.h | 5 | ||||
-rw-r--r-- | v4l/ChangeLog | 6 |
3 files changed, 31 insertions, 2 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index 15a8b8109..e92053f27 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.21 2005/06/18 06:00:36 nsh Exp $ + * $Id: tuner-core.c,v 1.22 2005/06/19 14:41:59 mchehab Exp $ * * i2c tv tuner chip device driver * core core, i.e. kernel interfaces, registering and so on @@ -508,6 +508,26 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) } break; } + case VIDIOC_S_TUNER: /* Allow changing radio range and audio mode */ + { + struct v4l2_tuner *tuner = arg; + + /* To switch the audio mode, applications initialize the + index and audmode fields and the reserved array and + call the VIDIOC_S_TUNER ioctl. */ + /* rxsubchannels: V4L2_TUNER_MODE_MONO, V4L2_TUNER_MODE_STEREO, + V4L2_TUNER_MODE_LANG1, V4L2_TUNER_MODE_LANG2, + V4L2_TUNER_MODE_SAP */ + + if (t->set_tuner) { + t->set_tuner(client,tuner); + } else { + tuner_dbg ("Unimplemented IOCTL VIDIO_S_TUNER called to tuner-core.\n"); + } + break; + } + case TDA9887_SET_CONFIG: /* Nothing to do on tuner-core */ + break; default: tuner_dbg ("Unimplemented IOCTL 0x%08x called to tuner.\n", cmd); /* nothing */ diff --git a/linux/include/media/tuner.h b/linux/include/media/tuner.h index aa729ed9b..dd871449e 100644 --- a/linux/include/media/tuner.h +++ b/linux/include/media/tuner.h @@ -1,5 +1,5 @@ -/* $Id: tuner.h,v 1.27 2005/06/18 04:00:19 mkrufky Exp $ +/* $Id: tuner.h,v 1.28 2005/06/19 14:41:59 mchehab Exp $ * tuner.h - definition for different tuners @@ -24,6 +24,8 @@ #ifndef _TUNER_H #define _TUNER_H +#include <linux/videodev2.h> + #include "id.h" #define ADDR_UNSET (255) @@ -200,6 +202,7 @@ struct tuner { void (*radio_freq)(struct i2c_client *c, unsigned int freq); int (*has_signal)(struct i2c_client *c); int (*is_stereo)(struct i2c_client *c); + int (*set_tuner)(struct i2c_client *c, struct v4l2_tuner *v); }; extern unsigned int tuner_debug; diff --git a/v4l/ChangeLog b/v4l/ChangeLog index 8d6c189f2..2de382fe4 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,3 +1,9 @@ +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 + 2005-06-19 13:45 mchehab * Makefile: |