diff options
Diffstat (limited to 'v4l_experimental/xc3028/xc3028.c')
-rw-r--r-- | v4l_experimental/xc3028/xc3028.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/v4l_experimental/xc3028/xc3028.c b/v4l_experimental/xc3028/xc3028.c index d2936638e..5db6107eb 100644 --- a/v4l_experimental/xc3028/xc3028.c +++ b/v4l_experimental/xc3028/xc3028.c @@ -51,7 +51,7 @@ int xc3028_probe(struct i2c_client *c) static void xc3028_set_tv_freq(struct i2c_client *c, unsigned int freq){ // the frequency is just shifted and there's a 1:1 relation for all frequencies // E11 is Das Erste in Germany/Ulm all other channels match their frequency too - + unsigned char chanbuf[4]; freq<<=2; chanbuf[0]=0; @@ -84,7 +84,7 @@ int xc3028_init(struct i2c_client *c) // request firmware from /lib/firmware, note that the file got extracted by the convert application I wrote and which is available // on linuxtv.org / xc3028 - + ret = request_firmware(&fw, XC3028_DEFAULT_FIRMWARE, &t->i2c.dev); if (ret) { printk("xc3028: no firmware uploaded please check %s\n",XC3028_DEFAULT_FIRMWARE); @@ -94,7 +94,7 @@ int xc3028_init(struct i2c_client *c) firmware_size = fw->size; // small firmware check, both firmwares I have are between 6 and 7k bytes - + if(fw->size>7000||fw->size<6000){ printk("xc3028: wrong firmware provided!\n"); release_firmware(fw); @@ -111,7 +111,7 @@ int xc3028_init(struct i2c_client *c) } linebuffer[d++]=0x2a; - dev=c->adapter->algo_data; + dev=c->adapter->algo_data; // 0x08 is a GPIO address of the em28xx has to get replaced with something generic here @@ -122,23 +122,23 @@ int xc3028_init(struct i2c_client *c) // the firmware always starts with 0x2a + 0x40 bytes payload I use to add the offset of the first part // as the first line into the firmware binary - + while(i!=fw->size){ linebuffer[d++]=firmware[i]; if((d%64==0&&d!=0)||i==fwoff+txtlen){ i2c_master_send(c,linebuffer,d); if(i==(fwoff+txtlen)){ - i2c_master_send(c,"\x02\x02",2); - i2c_master_send(c,"\x02\x03",2); - i2c_master_send(c,"\x00\x8c",2); - i2c_master_send(c,"\x00\x00\x00\x00",4); + i2c_master_send(c,"\x02\x02",2); + i2c_master_send(c,"\x02\x03",2); + i2c_master_send(c,"\x00\x8c",2); + i2c_master_send(c,"\x00\x00\x00\x00",4); // another reset here dev->em28xx_write_regs(dev, 0x08, "\x6d", 1); mdelay(100); dev->em28xx_write_regs(dev, 0x08, "\x7d", 1); mdelay(100); - - } + + } linebuffer[0]=0x2a; d=1; } @@ -149,30 +149,30 @@ int xc3028_init(struct i2c_client *c) firmware[firmware_size-1]=0; release_firmware(fw); - + /* MAGIC VALUES */ - i2c_master_send(c,"\x13\x39",2); - i2c_master_send(c,"\x0c\x80\xf0\xf7\x3e\x75\xc1\x8a\xe4\x02\x00",11); - i2c_master_send(c,"\x05\x0f\xee\xaa\x5f\xea\x90",7); - i2c_master_send(c,"\x06\x00\x0a\x4d\x8c\xf2\xd8\xcf\x30\x79\x9f",11); - i2c_master_send(c,"\x0b\x0d\xa4\x6c",4); - i2c_master_send(c,"\x0a\x01\x67\x24\x40\x08\xc3\x20\x10\x64\x3c\xfa\xf7\xe1\x0c\x2c",0x10); - i2c_master_send(c,"\x09\x0b",0x2); - i2c_master_send(c,"\x10\x13",0x2); - i2c_master_send(c,"\x16\x12",0x2); - i2c_master_send(c,"\x1f\x02",0x2); - i2c_master_send(c,"\x21\x02",0x2); - i2c_master_send(c,"\x01\x02",0x2); - i2c_master_send(c,"\x2b\x10",0x2); - i2c_master_send(c,"\x02\x02",0x2); - i2c_master_send(c,"\x02\x03",0x2); - i2c_master_send(c,"\x00\x8c",0x2); + i2c_master_send(c,"\x13\x39",2); + i2c_master_send(c,"\x0c\x80\xf0\xf7\x3e\x75\xc1\x8a\xe4\x02\x00",11); + i2c_master_send(c,"\x05\x0f\xee\xaa\x5f\xea\x90",7); + i2c_master_send(c,"\x06\x00\x0a\x4d\x8c\xf2\xd8\xcf\x30\x79\x9f",11); + i2c_master_send(c,"\x0b\x0d\xa4\x6c",4); + i2c_master_send(c,"\x0a\x01\x67\x24\x40\x08\xc3\x20\x10\x64\x3c\xfa\xf7\xe1\x0c\x2c",0x10); + i2c_master_send(c,"\x09\x0b",0x2); + i2c_master_send(c,"\x10\x13",0x2); + i2c_master_send(c,"\x16\x12",0x2); + i2c_master_send(c,"\x1f\x02",0x2); + i2c_master_send(c,"\x21\x02",0x2); + i2c_master_send(c,"\x01\x02",0x2); + i2c_master_send(c,"\x2b\x10",0x2); + i2c_master_send(c,"\x02\x02",0x2); + i2c_master_send(c,"\x02\x03",0x2); + i2c_master_send(c,"\x00\x8c",0x2); #if 0 // if set video will mostly be black/white - if set_color is called instead the video will have color - i2c_master_send(c,"\x80\x01\x00\x00",0x4); - i2c_master_send(c,"\x00\x5e\x00\x29",0x4); - i2c_master_send(c,"\x2b\x1a",0x2); + i2c_master_send(c,"\x80\x01\x00\x00",0x4); + i2c_master_send(c,"\x00\x5e\x00\x29",0x4); + i2c_master_send(c,"\x2b\x1a",0x2); #endif xceive_set_color(c); t->set_tv_freq = xc3028_set_tv_freq; |