Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23641
b: refs/heads/master
c: 9a80a93
h: refs/heads/master
i:
  23639: 5f44960
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 24, 2006
1 parent 1df13b7 commit e8febc6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 427725748b38997628d95ffdf8501bcc176cf631
refs/heads/master: 9a80a93da738c631de644175fbd669ab9a9cb624
31 changes: 0 additions & 31 deletions trunk/drivers/media/video/msp3400-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,37 +336,6 @@ void msp_set_audio(struct i2c_client *client)
msp_write_dsp(client, 0x0033, loudness);
}

int msp_modus(struct i2c_client *client)
{
struct msp_state *state = i2c_get_clientdata(client);

if (state->radio) {
v4l_dbg(1, msp_debug, client, "video mode selected to Radio\n");
return 0x0003;
}

if (state->v4l2_std & V4L2_STD_PAL) {
v4l_dbg(1, msp_debug, client, "video mode selected to PAL\n");

#if 1
/* experimental: not sure this works with all chip versions */
return 0x7003;
#else
/* previous value, try this if it breaks ... */
return 0x1003;
#endif
}
if (state->v4l2_std & V4L2_STD_NTSC) {
v4l_dbg(1, msp_debug, client, "video mode selected to NTSC\n");
return 0x2003;
}
if (state->v4l2_std & V4L2_STD_SECAM) {
v4l_dbg(1, msp_debug, client, "video mode selected to SECAM\n");
return 0x0003;
}
return 0x0003;
}

/* ------------------------------------------------------------------------ */


Expand Down
34 changes: 33 additions & 1 deletion trunk/drivers/media/video/msp3400-kthreads.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/media/video/msp3400.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ int msp_reset(struct i2c_client *client);
void msp_set_scart(struct i2c_client *client, int in, int out);
void msp_set_mute(struct i2c_client *client);
void msp_set_audio(struct i2c_client *client);
int msp_modus(struct i2c_client *client);
int msp_sleep(struct msp_state *state, int timeout);

/* msp3400-kthreads.c */
Expand Down

0 comments on commit e8febc6

Please sign in to comment.