summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/msp3400-kthreads.c
diff options
context:
space:
mode:
authorHans Verkuil <devnull@localhost>2006-01-18 21:48:19 +0000
committerHans Verkuil <devnull@localhost>2006-01-18 21:48:19 +0000
commitf7ef0e07e02040e66dd49a7bfce0cce75ab777a0 (patch)
tree950793f957a47bc7c1ab06eecb28db9f0b71b51f /linux/drivers/media/video/msp3400-kthreads.c
parent09194f0467e86ca029cd55ec178869f5f9dbf2b2 (diff)
downloadmediapointer-dvb-s2-f7ef0e07e02040e66dd49a7bfce0cce75ab777a0.tar.gz
mediapointer-dvb-s2-f7ef0e07e02040e66dd49a7bfce0cce75ab777a0.tar.bz2
Fix handling of VIDIOC_G_TUNER audmode in msp3400
Fix handling of VIDIOC_G_TUNER audmode in msp3400: audmode is only changed by the user with S_TUNER, never by the driver. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/msp3400-kthreads.c')
-rw-r--r--linux/drivers/media/video/msp3400-kthreads.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/linux/drivers/media/video/msp3400-kthreads.c b/linux/drivers/media/video/msp3400-kthreads.c
index ec7fc7a07..cd15535e1 100644
--- a/linux/drivers/media/video/msp3400-kthreads.c
+++ b/linux/drivers/media/video/msp3400-kthreads.c
@@ -176,7 +176,6 @@ void msp3400c_setmode(struct i2c_client *client, int type)
v4l_dbg(1, msp_debug, client, "setmode: %d\n", type);
state->mode = type;
- state->audmode = V4L2_TUNER_MODE_MONO;
state->rxsubchans = V4L2_TUNER_SUB_MONO;
msp_write_dem(client, 0x00bb, msp3400c_init_data[type].ad_cv);
@@ -216,7 +215,7 @@ void msp3400c_setmode(struct i2c_client *client, int type)
}
/* turn on/off nicam + stereo */
-void msp3400c_setstereo(struct i2c_client *client, int mode)
+void msp3400c_setstereo(struct i2c_client *client, int audmode)
{
static char *strmode[] = { "mono", "stereo", "lang2", "lang1" };
struct msp_state *state = i2c_get_clientdata(client);
@@ -228,16 +227,16 @@ void msp3400c_setstereo(struct i2c_client *client, int mode)
* it's never called
*/
v4l_dbg(1, msp_debug, client, "setstereo called with mode=%d instead of set_source (ignored)\n",
- mode);
+ audmode);
return;
}
/* switch demodulator */
switch (state->mode) {
case MSP_MODE_FM_TERRA:
- v4l_dbg(1, msp_debug, client, "FM setstereo: %s\n", strmode[mode]);
+ v4l_dbg(1, msp_debug, client, "FM setstereo: %s\n", strmode[audmode]);
msp3400c_setcarrier(client, state->second, state->main);
- switch (mode) {
+ switch (audmode) {
case V4L2_TUNER_MODE_STEREO:
msp_write_dsp(client, 0x000e, 0x3001);
break;
@@ -249,8 +248,8 @@ void msp3400c_setstereo(struct i2c_client *client, int mode)
}
break;
case MSP_MODE_FM_SAT:
- v4l_dbg(1, msp_debug, client, "SAT setstereo: %s\n", strmode[mode]);
- switch (mode) {
+ v4l_dbg(1, msp_debug, client, "SAT setstereo: %s\n", strmode[audmode]);
+ switch (audmode) {
case V4L2_TUNER_MODE_MONO:
msp3400c_setcarrier(client, MSP_CARRIER(6.5), MSP_CARRIER(6.5));
break;
@@ -268,21 +267,21 @@ void msp3400c_setstereo(struct i2c_client *client, int mode)
case MSP_MODE_FM_NICAM1:
case MSP_MODE_FM_NICAM2:
case MSP_MODE_AM_NICAM:
- v4l_dbg(1, msp_debug, client, "NICAM setstereo: %s\n",strmode[mode]);
+ v4l_dbg(1, msp_debug, client, "NICAM setstereo: %s\n",strmode[audmode]);
msp3400c_setcarrier(client,state->second,state->main);
if (state->nicam_on)
nicam=0x0100;
break;
case MSP_MODE_BTSC:
- v4l_dbg(1, msp_debug, client, "BTSC setstereo: %s\n",strmode[mode]);
+ v4l_dbg(1, msp_debug, client, "BTSC setstereo: %s\n",strmode[audmode]);
nicam=0x0300;
break;
case MSP_MODE_EXTERN:
- v4l_dbg(1, msp_debug, client, "extern setstereo: %s\n",strmode[mode]);
+ v4l_dbg(1, msp_debug, client, "extern setstereo: %s\n",strmode[audmode]);
nicam = 0x0200;
break;
case MSP_MODE_FM_RADIO:
- v4l_dbg(1, msp_debug, client, "FM-Radio setstereo: %s\n",strmode[mode]);
+ v4l_dbg(1, msp_debug, client, "FM-Radio setstereo: %s\n",strmode[audmode]);
break;
default:
v4l_dbg(1, msp_debug, client, "mono setstereo\n");
@@ -290,7 +289,7 @@ void msp3400c_setstereo(struct i2c_client *client, int mode)
}
/* switch audio */
- switch (mode) {
+ switch (audmode) {
case V4L2_TUNER_MODE_STEREO:
src = 0x0020 | nicam;
#if 0
@@ -789,7 +788,6 @@ int msp3410d_thread(void *data)
case 0x0040: /* FM radio */
state->mode = MSP_MODE_FM_RADIO;
state->rxsubchans = V4L2_TUNER_SUB_STEREO;
- state->audmode = V4L2_TUNER_MODE_STEREO;
state->nicam_on = 0;
state->watch_stereo = 0;
/* not needed in theory if we have radio, but
@@ -816,7 +814,6 @@ int msp3410d_thread(void *data)
case 0x0005:
state->mode = MSP_MODE_FM_TERRA;
state->rxsubchans = V4L2_TUNER_SUB_MONO;
- state->audmode = V4L2_TUNER_MODE_MONO;
state->nicam_on = 0;
state->watch_stereo = 1;
break;