summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMichel Ludwig <michel.ludwig@gmail.com>2007-07-18 10:26:38 -0300
committerMichel Ludwig <michel.ludwig@gmail.com>2007-07-18 10:26:38 -0300
commit908c46b58537173c0c70a9a9f0702d86b26ae7b1 (patch)
tree2f2688cbebc178460277a7fd7edec6af4dc8adec /linux/drivers/media/video
parent2a79b63774ae84b3f0f43c058e9c2a1bf8cf0ce9 (diff)
downloadmediapointer-dvb-s2-908c46b58537173c0c70a9a9f0702d86b26ae7b1.tar.gz
mediapointer-dvb-s2-908c46b58537173c0c70a9a9f0702d86b26ae7b1.tar.bz2
Improve tuner-xc2028 script
From: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> --- linux/drivers/media/video/tuner-xc2028.c | 50 ++++++++++++++++++------------- 1 file changed, 30 insertions(+), 20 deletions(-)
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/tuner-xc2028.c50
1 files changed, 30 insertions, 20 deletions
diff --git a/linux/drivers/media/video/tuner-xc2028.c b/linux/drivers/media/video/tuner-xc2028.c
index 4855cbd0b..4ce21b25b 100644
--- a/linux/drivers/media/video/tuner-xc2028.c
+++ b/linux/drivers/media/video/tuner-xc2028.c
@@ -193,6 +193,26 @@ static int check_firmware(struct i2c_client *c)
if (xc2028->firm_type & t->std)
return 0;
+ send_seq (c, {0x12, 0x39});
+ send_seq (c, {0x0c, 0x80, 0xf0, 0xf7, 0x3e, 0x75, 0xc1, 0x8a, 0xe4});
+ send_seq (c, {0x0c, 0x02, 0x00});
+ send_seq (c, {0x05, 0x0f, 0xee, 0xaa, 0x5f, 0xea, 0x90});
+ send_seq (c, {0x06, 0x00, 0x0a, 0x4d, 0x8c, 0xf2, 0xd8, 0xcf, 0x30});
+ send_seq (c, {0x06, 0x79, 0x9f});
+ send_seq (c, {0x0b, 0x0d, 0xa4, 0x6c});
+ send_seq (c, {0x0a, 0x01, 0x67, 0x24, 0x40, 0x08, 0xc3, 0x20, 0x10});
+ send_seq (c, {0x0a, 0x64, 0x3c, 0xfa, 0xf7, 0xe1, 0x0c, 0x2c});
+ send_seq (c, {0x09, 0x0b});
+ send_seq (c, {0x10, 0x13});
+ send_seq (c, {0x16, 0x12});
+ send_seq (c, {0x1f, 0x02});
+ send_seq (c, {0x21, 0x02});
+ send_seq (c, {0x01, 0x02});
+ send_seq (c, {0x2b, 0x10});
+ send_seq (c, {0x02, 0x02});
+ send_seq (c, {0x02, 0x03});
+ send_seq (c, {0x00, 0x8c});
+
if (t->std & V4L2_STD_MN)
name=firmware_MN;
else
@@ -253,26 +273,7 @@ static void set_tv_freq(struct i2c_client *c, unsigned int freq)
}
msleep(10);
- send_seq (c, {0x12, 0x39});
- send_seq (c, {0x0c, 0x80, 0xf0, 0xf7, 0x3e, 0x75, 0xc1, 0x8a, 0xe4});
- send_seq (c, {0x0c, 0x02, 0x00});
- send_seq (c, {0x05, 0x0f, 0xee, 0xaa, 0x5f, 0xea, 0x90});
- send_seq (c, {0x06, 0x00, 0x0a, 0x4d, 0x8c, 0xf2, 0xd8, 0xcf, 0x30});
- send_seq (c, {0x06, 0x79, 0x9f});
- send_seq (c, {0x0b, 0x0d, 0xa4, 0x6c});
- send_seq (c, {0x0a, 0x01, 0x67, 0x24, 0x40, 0x08, 0xc3, 0x20, 0x10});
- send_seq (c, {0x0a, 0x64, 0x3c, 0xfa, 0xf7, 0xe1, 0x0c, 0x2c});
- send_seq (c, {0x09, 0x0b});
- send_seq (c, {0x10, 0x13});
- send_seq (c, {0x16, 0x12});
- send_seq (c, {0x1f, 0x02});
- send_seq (c, {0x21, 0x02});
- send_seq (c, {0x01, 0x02});
- send_seq (c, {0x2b, 0x10});
- send_seq (c, {0x02, 0x02});
- send_seq (c, {0x02, 0x03});
- send_seq (c, {0x00, 0x8c});
-
+#if 0
send_seq (c, {0x00, 0x01, 0x00, 0x00});
send_seq (c, {0x00, 0xcc, 0x20, 0x06});
send_seq (c, {0x2b, 0x1a});
@@ -301,7 +302,16 @@ static void set_tv_freq(struct i2c_client *c, unsigned int freq)
send_seq (c, {0x21, 0x03});
send_seq (c, {0x00, 0x8c});
send_seq (c, {0x00, 0x00, 0x00, 0x00});
+//#else
+ char *name;
+
+ if (t->std & V4L2_STD_MN)
+ name=firmware_MN;
+ else
+ name=firmware_DK;
+ rc = load_firmware(c,name);
+#endif
/* CMD= Set frequency */
send_seq(c, {0x00, 0x02, 0x00, 0x00});
if (t->tuner_callback) {