diff options
author | Hans Verkuil <devnull@localhost> | 2006-01-18 21:48:19 +0000 |
---|---|---|
committer | Hans Verkuil <devnull@localhost> | 2006-01-18 21:48:19 +0000 |
commit | f7ef0e07e02040e66dd49a7bfce0cce75ab777a0 (patch) | |
tree | 950793f957a47bc7c1ab06eecb28db9f0b71b51f /linux/drivers/media/video/msp3400-driver.c | |
parent | 09194f0467e86ca029cd55ec178869f5f9dbf2b2 (diff) | |
download | mediapointer-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-driver.c')
-rw-r--r-- | linux/drivers/media/video/msp3400-driver.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c index d50f8cac1..cf9a17e66 100644 --- a/linux/drivers/media/video/msp3400-driver.c +++ b/linux/drivers/media/video/msp3400-driver.c @@ -705,7 +705,6 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) } if (scart) { state->rxsubchans = V4L2_TUNER_SUB_STEREO; - state->audmode = V4L2_TUNER_MODE_STEREO; msp_set_scart(client, scart, 0); msp_write_dsp(client, 0x000d, 0x1900); if (state->opmode != OPMODE_AUTOSELECT) @@ -883,11 +882,8 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) return -EINVAL; } - msp_any_detect_stereo(client); - if (state->audmode == V4L2_TUNER_MODE_STEREO) { - a->capability = V4L2_AUDCAP_STEREO; - } - + a->capability = V4L2_AUDCAP_STEREO; + a->mode = 0; /* TODO: add support for AVL */ break; } @@ -917,15 +913,9 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) } if (scart) { state->rxsubchans = V4L2_TUNER_SUB_STEREO; - state->audmode = V4L2_TUNER_MODE_STEREO; msp_set_scart(client, scart, 0); msp_write_dsp(client, 0x000d, 0x1900); } - if (sarg->capability == V4L2_AUDCAP_STEREO) { - state->audmode = V4L2_TUNER_MODE_STEREO; - } else { - state->audmode &= ~V4L2_TUNER_MODE_STEREO; - } msp_any_set_audmode(client, state->audmode); msp_wake_thread(client); break; @@ -950,11 +940,10 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) { struct v4l2_tuner *vt = (struct v4l2_tuner *)arg; - if (state->radio) + if (state->radio) /* TODO: add mono/stereo support for radio */ break; /* only set audmode */ - if (vt->audmode != -1 && vt->audmode != 0) - msp_any_set_audmode(client, vt->audmode); + msp_any_set_audmode(client, vt->audmode); break; } @@ -979,7 +968,6 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) return -EINVAL; } break; - } case VIDIOC_S_AUDOUT: @@ -1168,6 +1156,7 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind) memset(state, 0, sizeof(*state)); state->v4l2_std = V4L2_STD_NTSC; + state->audmode = V4L2_TUNER_MODE_STEREO; state->volume = 58880; /* 0db gain */ state->balance = 32768; /* 0db gain */ state->bass = 32768; |