From: Stefan Ringel <stefan.ringel@arcor.de>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: linux-media@vger.kernel.org,
Devin Heitmueller <dheitmueller@kernellabs.com>
Subject: [PATCH 15/15] - tm6000 hack with different demodulator parameter
Date: Wed, 03 Feb 2010 21:40:49 +0100 [thread overview]
Message-ID: <4B69DF51.4020704@arcor.de> (raw)
In-Reply-To: <4B69D8CC.2030008@arcor.de>
signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
--- a/drivers/staging/tm6000/hack.c
+++ b/drivers/staging/tm6000/hack.c
@@ -37,7 +37,6 @@ static inline int tm6000_snd_control_msg(struct
tm6000_core *dev, __u8 request,
static int pseudo_zl10353_pll(struct tm6000_core *tm6000_dev, struct
dvb_frontend_parameters *p)
{
- int ret;
u8 *data = kzalloc(50*sizeof(u8), GFP_KERNEL);
printk(KERN_ALERT "should set frequency %u\n", p->frequency);
@@ -51,7 +50,7 @@ printk(KERN_ALERT "and bandwith %u\n",
p->u.ofdm.bandwidth);
}
// init ZL10353
- data[0] = 0x0b;
+/* data[0] = 0x0b;
ret = tm6000_snd_control_msg(tm6000_dev, 0x10, 0x501e, 0x00, data,
0x1);
msleep(15);
data[0] = 0x80;
@@ -159,7 +158,7 @@ printk(KERN_ALERT "and bandwith %u\n",
p->u.ofdm.bandwidth);
msleep(15);
data[0] = 0x5a;
ret = tm6000_snd_control_msg(tm6000_dev, 0x10, 0x651e,
0x00, data, 0x1);
- msleep(15);
+ msleep(15)
data[0] = 0xe9;
ret = tm6000_snd_control_msg(tm6000_dev, 0x10, 0x661e,
0x00, data, 0x1);
msleep(15);
@@ -189,7 +188,162 @@ printk(KERN_ALERT "and bandwith %u\n",
p->u.ofdm.bandwidth);
msleep(15);
break;
}
-
+*/
+ switch(p->u.ofdm.bandwidth) {
+ case BANDWIDTH_8_MHZ:
+ data[0] = 0x03;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x501e,0,data,1);
+ msleep(40);
+ data[0] = 0x44;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x511e,0,data,1);
+ msleep(40);
+ data[0] = 0x40;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x551e,0,data,1);
+ msleep(40);
+ data[0] = 0x46;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x521e,0,data,1);
+ msleep(40);
+ data[0] = 0x15;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x531e,0,data,1);
+ msleep(40);
+ data[0] = 0x0f;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x541e,0,data,1);
+ msleep(40);
+ data[0] = 0x80;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x551e,0,data,1);
+ msleep(40);
+ data[0] = 0x01;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0xea1e,0,data,1);
+ msleep(40);
+ data[0] = 0x00;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0xea1e,0,data,1);
+ msleep(40);
+ data[0] = 0x8b;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x631e,0,data,1);
+ msleep(40);
+ data[0] = 0x75;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0xcc1e,0,data,1);
+ msleep(40);
+ data[0] = 0xe6; //0x19;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x6c1e,0,data,1);
+ msleep(40);
+ data[0] = 0x09; //0xf7;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x6d1e,0,data,1);
+ msleep(40);
+ data[0] = 0x67;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x651e,0,data,1);
+ msleep(40);
+ data[0] = 0xe5;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x661e,0,data,1);
+ msleep(40);
+ data[0] = 0x75;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x5c1e,0,data,1);
+ msleep(40);
+ data[0] = 0x17;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x5f1e,0,data,1);
+ msleep(40);
+ data[0] = 0x40;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x5e1e,0,data,1);
+ msleep(40);
+ data[0] = 0x01;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x701e,0,data,1);
+ msleep(40);
+ break;
+ case BANDWIDTH_7_MHZ:
+ data[0] = 0x03;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x501e,0,data,1);
+ msleep(40);
+ data[0] = 0x44;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x511e,0,data,1);
+ msleep(40);
+ data[0] = 0x40;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x551e,0,data,1);
+ msleep(40);
+ data[0] = 0x46;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x521e,0,data,1);
+ msleep(40);
+ data[0] = 0x15;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x531e,0,data,1);
+ msleep(40);
+ data[0] = 0x0f;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x541e,0,data,1);
+ msleep(40);
+ data[0] = 0x80;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x551e,0,data,1);
+ msleep(40);
+ data[0] = 0x01;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0xea1e,0,data,1);
+ msleep(40);
+ data[0] = 0x00;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0xea1e,0,data,1);
+ msleep(40);
+ data[0] = 0x83;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x631e,0,data,1);
+ msleep(40);
+ data[0] = 0xa3;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0xcc1e,0,data,1);
+ msleep(40);
+ data[0] = 0xe6; //0x19;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x6c1e,0,data,1);
+ msleep(40);
+ data[0] = 0x09; //0xf7;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x6d1e,0,data,1);
+ msleep(40);
+ data[0] = 0x5a;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x651e,0,data,1);
+ msleep(40);
+ data[0] = 0xe9;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x661e,0,data,1);
+ msleep(40);
+ data[0] = 0x86;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x5c1e,0,data,1);
+ msleep(40);
+ data[0] = 0x17;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x5f1e,0,data,1);
+ msleep(40);
+ data[0] = 0x40;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x5e1e,0,data,1);
+ msleep(40);
+ data[0] = 0x01;
+ tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x701e,0,data,1);
+ msleep(40);
+ break;
+ default:
+ printk(KERN_ALERT "tm6000: bandwidth not supported\n");
+ }
+
+ tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x051f,0,data,2);
+ printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]);
+ msleep(40);
+
+ tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x051f,0,data,2);
+ printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]);
+ msleep(40);
+
+ tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x051f,0,data,2);
+ printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]);
+ msleep(40);
+
+ tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x051f,0,data,2);
+ printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]);
+ msleep(40);
+
+ tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x051f,0,data,2);
+ printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]);
+ msleep(40);
+
+ tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x0f1f,0,data,2);
+ printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]);
+ msleep(40);
+
+ tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x091f,0,data,2);
+ printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]);
+ msleep(40);
+
+ tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x0b1f,0,data,2);
+ printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]);
+ msleep(40);
+
kfree(data);
return 0;
--
Stefan Ringel <stefan.ringel@arcor.de>
next prev parent reply other threads:[~2010-02-03 20:41 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-01 20:20 [PATCH] - tm6000 DVB support Stefan Ringel
2010-02-01 20:35 ` Stefan Ringel
2010-02-01 20:52 ` Devin Heitmueller
2010-02-01 21:23 ` Stefan Ringel
2010-02-01 21:44 ` Devin Heitmueller
2010-02-01 22:00 ` Stefan Ringel
2010-02-01 23:05 ` Mauro Carvalho Chehab
2010-02-02 16:14 ` Stefan Ringel
2010-02-02 16:44 ` Mauro Carvalho Chehab
2010-02-02 17:38 ` Stefan Ringel
2010-02-02 20:05 ` Mauro Carvalho Chehab
2010-02-01 22:52 ` Mauro Carvalho Chehab
2010-02-02 17:24 ` Stefan Ringel
2010-02-02 20:03 ` Mauro Carvalho Chehab
2010-02-02 20:19 ` Stefan Ringel
2010-02-02 20:30 ` Mauro Carvalho Chehab
2010-02-02 20:42 ` Stefan Ringel
2010-02-02 20:52 ` Mauro Carvalho Chehab
2010-02-02 21:11 ` Stefan Ringel
2010-02-03 20:10 ` [PATCH 1/15] - tm6000 build hunk Stefan Ringel
2010-02-03 20:13 ` [PATCH 2/15] - tm6000 add Terratec Cinergy Hybrid XE Stefan Ringel
2010-02-03 20:15 ` [PATCH 3/15] - tm6000 bugfix hunk in init_dev Stefan Ringel
2010-02-03 20:22 ` Mauro Carvalho Chehab
2010-02-03 20:16 ` [PATCH 4/15] - tm6000.h Stefan Ringel
2010-02-03 20:25 ` Mauro Carvalho Chehab
2010-02-03 20:50 ` Stefan Ringel
2010-02-03 20:58 ` Devin Heitmueller
2010-02-03 21:31 ` Mauro Carvalho Chehab
2010-02-03 20:18 ` [PATCH 5/15] - tm6000 bugfix i2c transfer Stefan Ringel
2010-02-03 20:18 ` [PATCH 2/15] - tm6000 add Terratec Cinergy Hybrid XE Mauro Carvalho Chehab
2010-02-03 20:20 ` [PATCH 6/15] - tm6000 bugfix usb transfer in DVB mode Stefan Ringel
2010-02-03 20:22 ` [PATCH 7/15] - tm6000 Stefan Ringel
2010-02-03 20:23 ` [PATCH 2/15] - tm6000 bugfix Stefan Ringel
2010-02-03 20:25 ` [PATCH 9/15] - tm6000 analog digital switch Stefan Ringel
2010-02-03 20:40 ` Mauro Carvalho Chehab
2010-02-03 20:55 ` Stefan Ringel
2010-02-03 21:21 ` Mauro Carvalho Chehab
2010-02-03 20:27 ` [PATCH 2/15] - tm6000 add digital init for tm6010 Stefan Ringel
2010-02-03 20:29 ` [PATCH 11/15] - tm6000 add " Stefan Ringel
2010-02-03 20:31 ` [PATCH 12/15] - tm6000 bugfix tuner reset time and tuner param Stefan Ringel
2010-02-03 20:52 ` Devin Heitmueller
2010-02-03 21:15 ` Stefan Ringel
2010-02-03 20:36 ` [PATCH 13/15] - xc2028 bugfix for firmware 3.6 -> Zarlink use without shift in DTV8 or DTV78 Stefan Ringel
2010-02-03 20:45 ` Devin Heitmueller
2010-02-03 20:38 ` [PATCH 14/15] - zl10353 Stefan Ringel
2010-02-03 20:49 ` Devin Heitmueller
2010-02-03 21:07 ` Stefan Ringel
2010-02-04 2:43 ` Mauro Carvalho Chehab
2010-02-04 21:12 ` Stefan Ringel
2010-02-05 0:06 ` Mauro Carvalho Chehab
2010-02-03 20:40 ` Stefan Ringel [this message]
2010-02-03 20:47 ` [PATCH 15/15] - tm6000 hack with different demodulator parameter Devin Heitmueller
2010-02-03 20:16 ` [PATCH 1/15] - tm6000 build hunk Mauro Carvalho Chehab
2010-02-03 20:17 ` Devin Heitmueller
2010-02-03 21:48 ` Stefan Ringel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B69DF51.4020704@arcor.de \
--to=stefan.ringel@arcor.de \
--cc=dheitmueller@kernellabs.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox