V4L/DVB (8994): Adjust MPEG initialization in cx24116

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, October 13, 2008 - 3:13 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cc8c4f...
Commit:     cc8c4f3a9c8dacff198438debd159ae4753744fc
Parent:     3f8e51add2b7d37f16343e6bdcc63862d87ccd04
Author:     Igor M. Liplianin <liplianin@me.by>
AuthorDate: Tue Sep 9 13:57:47 2008 -0300
Committer:  Mauro Carvalho Chehab <mchehab@redhat.com>
CommitDate: Sun Oct 12 09:37:04 2008 -0200

    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 <liplianin@me.by>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/dvb/dvb-usb/dw2102.c    |    2 +-
 drivers/media/dvb/frontends/cx24116.c |    5 ++++-
 drivers/media/dvb/frontends/cx24116.h |    3 +++
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c
index 0f3f962..ad3d6fc 100644
--- a/drivers/media/dvb/dvb-usb/dw2102.c
+++ b/drivers/media/dvb/dvb-usb/dw2102.c
@@ -284,7 +284,7 @@ static int dw2102_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
 
 static struct cx24116_config dw2104_config = {
 	.demod_address = 0x55,
-	/*.mpg_clk_pos_pol = 0x01,*/
+	.mpg_clk_pos_pol = 0x01,
 };
 
 static int dw2104_frontend_attach(struct dvb_usb_adapter *d)
diff --git a/drivers/media/dvb/frontends/cx24116.c b/drivers/media/dvb/frontends/cx24116.c
index 2ff9e20..666a0d8 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 2789672..8dbcec2 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)
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
V4L/DVB (8994): Adjust MPEG initialization in cx24116, Linux Kernel Mailing ..., (Mon Oct 13, 3:13 pm)