aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/au8522_decoder.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-06-08 12:54:55 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-06-19 12:31:17 -0400
commitc9f5ccc24d1c08705ab5ea2bf0d6166c8e8dc545 (patch)
treeba02342e9c1a560284dbb3e00c7d4ee248606822 /drivers/media/dvb-frontends/au8522_decoder.c
parent65c8820912d9469de75e5c607cefda92f11e3d2f (diff)
[media] au8522: Fix demod analog mode setting
There are several issues on the current code: 1) msleep(1) is actually equivalent to msleep(10); 2) au8522_video_set() will set reg 0xa4 to the proper value for SIF, CVBS or S-Video. No need to force it to CVBS; 3) Let's not hardcode 0x9d for CBS on audio_set. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/au8522_decoder.c')
-rw-r--r--drivers/media/dvb-frontends/au8522_decoder.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/dvb-frontends/au8522_decoder.c b/drivers/media/dvb-frontends/au8522_decoder.c
index 569922232eb8..b971c20624bf 100644
--- a/drivers/media/dvb-frontends/au8522_decoder.c
+++ b/drivers/media/dvb-frontends/au8522_decoder.c
@@ -458,8 +458,9 @@ static void set_audio_input(struct au8522_state *state)
458 au8522_writereg(state, AU8522_I2C_CONTROL_REG0_REG090H, 0x84); 458 au8522_writereg(state, AU8522_I2C_CONTROL_REG0_REG090H, 0x84);
459 msleep(150); 459 msleep(150);
460 au8522_writereg(state, AU8522_SYSTEM_MODULE_CONTROL_0_REG0A4H, 0x00); 460 au8522_writereg(state, AU8522_SYSTEM_MODULE_CONTROL_0_REG0A4H, 0x00);
461 msleep(1); 461 msleep(10);
462 au8522_writereg(state, AU8522_SYSTEM_MODULE_CONTROL_0_REG0A4H, 0x9d); 462 au8522_writereg(state, AU8522_SYSTEM_MODULE_CONTROL_0_REG0A4H,
463 AU8522_SYSTEM_MODULE_CONTROL_0_REG0A4H_CVBS);
463 msleep(50); 464 msleep(50);
464 au8522_writereg(state, AU8522_AUDIO_VOLUME_L_REG0F2H, 0x7F); 465 au8522_writereg(state, AU8522_AUDIO_VOLUME_L_REG0F2H, 0x7F);
465 au8522_writereg(state, AU8522_AUDIO_VOLUME_R_REG0F3H, 0x7F); 466 au8522_writereg(state, AU8522_AUDIO_VOLUME_R_REG0F3H, 0x7F);
@@ -585,12 +586,9 @@ static int au8522_s_stream(struct v4l2_subdev *sd, int enable)
585 586
586 au8522_writereg(state, AU8522_SYSTEM_MODULE_CONTROL_0_REG0A4H, 587 au8522_writereg(state, AU8522_SYSTEM_MODULE_CONTROL_0_REG0A4H,
587 0x01); 588 0x01);
588 msleep(1); 589 msleep(10);
589 au8522_writereg(state, AU8522_SYSTEM_MODULE_CONTROL_0_REG0A4H,
590 AU8522_SYSTEM_MODULE_CONTROL_0_REG0A4H_CVBS);
591 590
592 au8522_video_set(state); 591 au8522_video_set(state);
593
594 set_audio_input(state); 592 set_audio_input(state);
595 593
596 state->operational_mode = AU8522_ANALOG_MODE; 594 state->operational_mode = AU8522_ANALOG_MODE;