diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-12-18 13:18:28 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-12-27 14:19:32 -0200 |
commit | b331def2d382d7a51c379f336fe80ef87d6674e3 (patch) | |
tree | 5d0a5755688cdb1d73a1ce8fc657b9761303dd68 /drivers/media/video/msp3400-kthreads.c | |
parent | 315eb962d2e9438bc10da2488b604f04a1c0006f (diff) | |
download | blackbird-op-linux-b331def2d382d7a51c379f336fe80ef87d6674e3.tar.gz blackbird-op-linux-b331def2d382d7a51c379f336fe80ef87d6674e3.zip |
V4L/DVB (4982): Fix broken audio mode handling for line-in in msp3400.
The wrong matrix was used when an external input was selected instead of
the tuner input. The rxsubchans field was also not initialized to STEREO
for an external input. And finally the msp34xxg_detect_stereo() should
not try to detect stereo for an external input, that code is for the
tuner input only.
Together these bugs made it hit 'n miss whether you ever got stereo out
of the msp3400 for an external input.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/msp3400-kthreads.c')
-rw-r--r-- | drivers/media/video/msp3400-kthreads.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/video/msp3400-kthreads.c b/drivers/media/video/msp3400-kthreads.c index 4c7f85b566a0..e1821eb82fb5 100644 --- a/drivers/media/video/msp3400-kthreads.c +++ b/drivers/media/video/msp3400-kthreads.c @@ -483,7 +483,6 @@ int msp3400c_thread(void *data) /* no carrier scan, just unmute */ v4l_dbg(1, msp_debug, client, "thread: no carrier scan\n"); state->scan_in_progress = 0; - state->rxsubchans = V4L2_TUNER_SUB_STEREO; msp_set_audio(client); continue; } @@ -851,12 +850,15 @@ static void msp34xxg_set_source(struct i2c_client *client, u16 reg, int in) source = 1; /* stereo or A|B */ matrix = 0x20; break; - case V4L2_TUNER_MODE_STEREO: case V4L2_TUNER_MODE_LANG1: - default: source = 3; /* stereo or A */ matrix = 0x00; break; + case V4L2_TUNER_MODE_STEREO: + default: + source = 3; /* stereo or A */ + matrix = 0x20; + break; } if (in == MSP_DSP_IN_TUNER) @@ -1030,6 +1032,9 @@ static int msp34xxg_detect_stereo(struct i2c_client *client) int is_stereo = status & 0x40; int oldrx = state->rxsubchans; + if (state->mode == MSP_MODE_EXTERN) + return 0; + state->rxsubchans = 0; if (is_stereo) state->rxsubchans = V4L2_TUNER_SUB_STEREO; |