From cc8c4f3a9c8dacff198438debd159ae4753744fc Mon Sep 17 00:00:00 2001 From: "Igor M. Liplianin" Date: Tue, 9 Sep 2008 13:57:47 -0300 Subject: V4L/DVB (8994): Adjust MPEG initialization in cx24116 Adjust MPEG initialization in cx24116 in order to accomodate different MPEG CLK position and polarity in different cards. Signed-off-by: Igor M. Liplianin Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/frontends/cx24116.c | 5 ++++- drivers/media/dvb/frontends/cx24116.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers/media/dvb/frontends') diff --git a/drivers/media/dvb/frontends/cx24116.c b/drivers/media/dvb/frontends/cx24116.c index 2ff9e20c595..666a0d89e83 100644 --- a/drivers/media/dvb/frontends/cx24116.c +++ b/drivers/media/dvb/frontends/cx24116.c @@ -478,7 +478,10 @@ static int cx24116_load_firmware (struct dvb_frontend* fe, const struct firmware cmd.args[0x01] = 0x01; cmd.args[0x02] = 0x75; cmd.args[0x03] = 0x00; - cmd.args[0x04] = 0x02; + if (state->config->mpg_clk_pos_pol) + cmd.args[0x04] = state->config->mpg_clk_pos_pol; + else + cmd.args[0x04] = 0x02; cmd.args[0x05] = 0x00; cmd.len= 0x06; ret = cx24116_cmd_execute(fe, &cmd); diff --git a/drivers/media/dvb/frontends/cx24116.h b/drivers/media/dvb/frontends/cx24116.h index 27896725204..8dbcec26839 100644 --- a/drivers/media/dvb/frontends/cx24116.h +++ b/drivers/media/dvb/frontends/cx24116.h @@ -33,6 +33,9 @@ struct cx24116_config /* Need to reset device during firmware loading */ int (*reset_device)(struct dvb_frontend* fe); + + /* Need to set MPEG parameters */ + u8 mpg_clk_pos_pol:0x02; }; #if defined(CONFIG_DVB_CX24116) || defined(CONFIG_DVB_CX24116_MODULE) -- cgit v1.2.3-70-g09d2