Commit caa0d36c authored by Stefan Ringel's avatar Stefan Ringel Committed by Mauro Carvalho Chehab

V4L/DVB: tm6000: add a different set param values

Fix several parameter sets, in order to make dvb work
Signed-off-by: default avatarStefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 08e60ba0
...@@ -37,7 +37,6 @@ static inline int tm6000_snd_control_msg(struct tm6000_core *dev, __u8 request, ...@@ -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) 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); u8 *data = kzalloc(50*sizeof(u8), GFP_KERNEL);
printk(KERN_ALERT "should set frequency %u\n", p->frequency); 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); ...@@ -51,7 +50,7 @@ printk(KERN_ALERT "and bandwith %u\n", p->u.ofdm.bandwidth);
} }
// init ZL10353 // init ZL10353
data[0] = 0x0b; /* data[0] = 0x0b;
ret = tm6000_snd_control_msg(tm6000_dev, 0x10, 0x501e, 0x00, data, 0x1); ret = tm6000_snd_control_msg(tm6000_dev, 0x10, 0x501e, 0x00, data, 0x1);
msleep(15); msleep(15);
data[0] = 0x80; data[0] = 0x80;
...@@ -189,6 +188,161 @@ printk(KERN_ALERT "and bandwith %u\n", p->u.ofdm.bandwidth); ...@@ -189,6 +188,161 @@ printk(KERN_ALERT "and bandwith %u\n", p->u.ofdm.bandwidth);
msleep(15); msleep(15);
break; 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); kfree(data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment