]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
V4L: Fix msp343xG handling regression
authorHans Verkuil <hverkuil@xs4all.nl>
Sun, 8 Oct 2006 18:46:05 +0000 (14:46 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Oct 2006 18:50:10 +0000 (11:50 -0700)
The msp3430G and msp3435G models cannot do Automatic Standard Detection,
so these should be forced to BTSC. These chips are early production
versions for the msp34xxG series and are quite rare.

Due to broken handling of the 'standard' option in 2.6.17, there is
no workaround possible.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/video/msp3400-driver.c
drivers/media/video/msp3400-driver.h
drivers/media/video/msp3400-kthreads.c

index b806999d6e0fc69e11c01c2accf67ba4a38562d5..dd232192746d10da96c53971d226242e486745b8 100644 (file)
@@ -942,6 +942,8 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind)
        state->has_virtual_dolby_surround = msp_revision == 'G' && msp_prod_lo == 1;
        /* Has Virtual Dolby Surround & Dolby Pro Logic: only in msp34x2 */
        state->has_dolby_pro_logic = msp_revision == 'G' && msp_prod_lo == 2;
+       /* The msp343xG supports BTSC only and cannot do Automatic Standard Detection. */
+       state->force_btsc = msp_family == 3 && msp_revision == 'G' && msp_prod_hi == 3;
 
        state->opmode = opmode;
        if (state->opmode == OPMODE_AUTO) {
index 4e451049013de8d87a0f20a8eb27ec8456dfe8bf..6359d74e6fca491602400f065d0796072042df84 100644 (file)
@@ -64,6 +64,7 @@ struct msp_state {
        u8 has_sound_processing;
        u8 has_virtual_dolby_surround;
        u8 has_dolby_pro_logic;
+       u8 force_btsc;
 
        int radio;
        int opmode;
index 633a1021378930261d3ff20f8b4edfc42a846fa5..a0ac592426e105f33492db83077407043cfe0daa 100644 (file)
@@ -949,11 +949,12 @@ int msp34xxg_thread(void *data)
 
                /* setup the chip*/
                msp34xxg_reset(client);
-               state->std = state->radio ? 0x40 : msp_standard;
-               if (state->std != 1)
-                       goto unmute;
+               state->std = state->radio ? 0x40 :
+                       (state->force_btsc && msp_standard == 1) ? 32 : msp_standard;
                /* start autodetect */
                msp_write_dem(client, 0x20, state->std);
+               if (state->std != 1)
+                       goto unmute;
 
                /* watch autodetect */
                v4l_dbg(1, msp_debug, client, "started autodetect, waiting for result\n");