summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/msp3400-kthreads.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-03-19 07:25:42 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-03-24 16:26:56 -0300
commit9a80a93da738c631de644175fbd669ab9a9cb624 (patch)
tree971defc56764634e9747a6edb821b4ede86cbb89 /drivers/media/video/msp3400-kthreads.c
parent427725748b38997628d95ffdf8501bcc176cf631 (diff)
downloadblackbird-op-linux-9a80a93da738c631de644175fbd669ab9a9cb624.tar.gz
blackbird-op-linux-9a80a93da738c631de644175fbd669ab9a9cb624.zip
V4L/DVB (3579): Move msp_modus to msp3400-kthreads, add JP and KR std detection
msp_modus is 'G' model specific. Moved it to kthreads and also added proper handling for the Japanese and South Korean TV standards. 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.c34
1 files changed, 33 insertions, 1 deletions
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)
state->source = source;
}
+static int msp34xxg_modus(struct i2c_client *client)
+{
+ struct msp_state *state = i2c_get_clientdata(client);
+
+ if (state->radio) {
+ v4l_dbg(1, msp_debug, client, "selected radio modus\n");
+ return 0x0001;
+ }
+
+ if (state->v4l2_std & V4L2_STD_PAL) {
+ v4l_dbg(1, msp_debug, client, "selected PAL modus\n");
+ return 0x7001;
+ }
+ if (state->v4l2_std == V4L2_STD_NTSC_M_JP) {
+ v4l_dbg(1, msp_debug, client, "selected M (EIA-J) modus\n");
+ return 0x4001;
+ }
+ if (state->v4l2_std == V4L2_STD_NTSC_M_KR) {
+ v4l_dbg(1, msp_debug, client, "selected M (A2) modus\n");
+ return 0x0001;
+ }
+ if (state->v4l2_std & V4L2_STD_MN) {
+ v4l_dbg(1, msp_debug, client, "selected M (BTSC) modus\n");
+ return 0x2001;
+ }
+ if (state->v4l2_std & V4L2_STD_SECAM) {
+ v4l_dbg(1, msp_debug, client, "selected SECAM modus\n");
+ return 0x6001;
+ }
+ return 0x0001;
+}
+
/* (re-)initialize the msp34xxg, according to the current norm in state->norm
* return 0 if it worked, -1 if it failed
*/
@@ -826,7 +858,7 @@ static int msp34xxg_reset(struct i2c_client *client)
msp_write_dem(client, 0x40, state->i2s_mode);
/* step-by-step initialisation, as described in the manual */
- modus = msp_modus(client);
+ modus = msp34xxg_modus(client);
if (state->radio)
std = 0x40;
else
OpenPOWER on IntegriCloud