diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/msp3400-driver.c | 31 | ||||
-rw-r--r-- | drivers/media/video/msp3400-kthreads.c | 34 | ||||
-rw-r--r-- | drivers/media/video/msp3400.h | 1 |
3 files changed, 33 insertions, 33 deletions
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index db6a52771c1b..2d59d041f368 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c | |||
@@ -336,37 +336,6 @@ void msp_set_audio(struct i2c_client *client) | |||
336 | msp_write_dsp(client, 0x0033, loudness); | 336 | msp_write_dsp(client, 0x0033, loudness); |
337 | } | 337 | } |
338 | 338 | ||
339 | int msp_modus(struct i2c_client *client) | ||
340 | { | ||
341 | struct msp_state *state = i2c_get_clientdata(client); | ||
342 | |||
343 | if (state->radio) { | ||
344 | v4l_dbg(1, msp_debug, client, "video mode selected to Radio\n"); | ||
345 | return 0x0003; | ||
346 | } | ||
347 | |||
348 | if (state->v4l2_std & V4L2_STD_PAL) { | ||
349 | v4l_dbg(1, msp_debug, client, "video mode selected to PAL\n"); | ||
350 | |||
351 | #if 1 | ||
352 | /* experimental: not sure this works with all chip versions */ | ||
353 | return 0x7003; | ||
354 | #else | ||
355 | /* previous value, try this if it breaks ... */ | ||
356 | return 0x1003; | ||
357 | #endif | ||
358 | } | ||
359 | if (state->v4l2_std & V4L2_STD_NTSC) { | ||
360 | v4l_dbg(1, msp_debug, client, "video mode selected to NTSC\n"); | ||
361 | return 0x2003; | ||
362 | } | ||
363 | if (state->v4l2_std & V4L2_STD_SECAM) { | ||
364 | v4l_dbg(1, msp_debug, client, "video mode selected to SECAM\n"); | ||
365 | return 0x0003; | ||
366 | } | ||
367 | return 0x0003; | ||
368 | } | ||
369 | |||
370 | /* ------------------------------------------------------------------------ */ | 339 | /* ------------------------------------------------------------------------ */ |
371 | 340 | ||
372 | 341 | ||
diff --git a/drivers/media/video/msp3400-kthreads.c b/drivers/media/video/msp3400-kthreads.c index 71a944b447e2..972f2c80dbe2 100644 --- a/drivers/media/video/msp3400-kthreads.c +++ b/drivers/media/video/msp3400-kthreads.c | |||
@@ -806,6 +806,38 @@ static void msp34xxg_set_source(struct i2c_client *client, int source) | |||
806 | state->source = source; | 806 | state->source = source; |
807 | } | 807 | } |
808 | 808 | ||
809 | static int msp34xxg_modus(struct i2c_client *client) | ||
810 | { | ||
811 | struct msp_state *state = i2c_get_clientdata(client); | ||
812 | |||
813 | if (state->radio) { | ||
814 | v4l_dbg(1, msp_debug, client, "selected radio modus\n"); | ||
815 | return 0x0001; | ||
816 | } | ||
817 | |||
818 | if (state->v4l2_std & V4L2_STD_PAL) { | ||
819 | v4l_dbg(1, msp_debug, client, "selected PAL modus\n"); | ||
820 | return 0x7001; | ||
821 | } | ||
822 | if (state->v4l2_std == V4L2_STD_NTSC_M_JP) { | ||
823 | v4l_dbg(1, msp_debug, client, "selected M (EIA-J) modus\n"); | ||
824 | return 0x4001; | ||
825 | } | ||
826 | if (state->v4l2_std == V4L2_STD_NTSC_M_KR) { | ||
827 | v4l_dbg(1, msp_debug, client, "selected M (A2) modus\n"); | ||
828 | return 0x0001; | ||
829 | } | ||
830 | if (state->v4l2_std & V4L2_STD_MN) { | ||
831 | v4l_dbg(1, msp_debug, client, "selected M (BTSC) modus\n"); | ||
832 | return 0x2001; | ||
833 | } | ||
834 | if (state->v4l2_std & V4L2_STD_SECAM) { | ||
835 | v4l_dbg(1, msp_debug, client, "selected SECAM modus\n"); | ||
836 | return 0x6001; | ||
837 | } | ||
838 | return 0x0001; | ||
839 | } | ||
840 | |||
809 | /* (re-)initialize the msp34xxg, according to the current norm in state->norm | 841 | /* (re-)initialize the msp34xxg, according to the current norm in state->norm |
810 | * return 0 if it worked, -1 if it failed | 842 | * return 0 if it worked, -1 if it failed |
811 | */ | 843 | */ |
@@ -826,7 +858,7 @@ static int msp34xxg_reset(struct i2c_client *client) | |||
826 | msp_write_dem(client, 0x40, state->i2s_mode); | 858 | msp_write_dem(client, 0x40, state->i2s_mode); |
827 | 859 | ||
828 | /* step-by-step initialisation, as described in the manual */ | 860 | /* step-by-step initialisation, as described in the manual */ |
829 | modus = msp_modus(client); | 861 | modus = msp34xxg_modus(client); |
830 | if (state->radio) | 862 | if (state->radio) |
831 | std = 0x40; | 863 | std = 0x40; |
832 | else | 864 | else |
diff --git a/drivers/media/video/msp3400.h b/drivers/media/video/msp3400.h index 7fac3ad6228d..c4553f50aa40 100644 --- a/drivers/media/video/msp3400.h +++ b/drivers/media/video/msp3400.h | |||
@@ -98,7 +98,6 @@ int msp_reset(struct i2c_client *client); | |||
98 | void msp_set_scart(struct i2c_client *client, int in, int out); | 98 | void msp_set_scart(struct i2c_client *client, int in, int out); |
99 | void msp_set_mute(struct i2c_client *client); | 99 | void msp_set_mute(struct i2c_client *client); |
100 | void msp_set_audio(struct i2c_client *client); | 100 | void msp_set_audio(struct i2c_client *client); |
101 | int msp_modus(struct i2c_client *client); | ||
102 | int msp_sleep(struct msp_state *state, int timeout); | 101 | int msp_sleep(struct msp_state *state, int timeout); |
103 | 102 | ||
104 | /* msp3400-kthreads.c */ | 103 | /* msp3400-kthreads.c */ |