From 8c995fe9b63c4e6b6c8d95a6ad3457c2e6751b20 Mon Sep 17 00:00:00 2001 From: Markus Rechberger Date: Wed, 25 Jan 2006 09:48:37 +0000 Subject: Hauppauge HVR 900 driver support From: Markus Rechberger Signed-off-by: Markus Rechberger --- v4l_experimental/xc3028/convert.c | 84 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 v4l_experimental/xc3028/convert.c (limited to 'v4l_experimental/xc3028/convert.c') diff --git a/v4l_experimental/xc3028/convert.c b/v4l_experimental/xc3028/convert.c new file mode 100644 index 000000000..00b1f7d9d --- /dev/null +++ b/v4l_experimental/xc3028/convert.c @@ -0,0 +1,84 @@ +#include +#include +#include + +#define ARRAY_SIZE(fw) sizeof(fw)/sizeof(fw[0]) +struct{ + char *fwname; + char *fwstart; + char *fwstart2; + int length1; + int length2; +} xc_firmware[]={{"Terratec","\x2a\x03\xe5\xe0\x00\x07\xf4\xd0\x01\xc0\x70\xe0\x00\x07","\x2a\x00\xc3\xe0\x00\x07\xb9\xf1\x05\x01\x6e\x82\x02\x82",2480,3876}, + {"Hauppauge","\x2a\x03\xcc\xe0\x00\x07\xf4\xd0\x01\xc0\x70\xe0\x00\x07","\x2a\x00\xbe\xe0\x00\x07\xb9\xf1\x05\x01\x69\x82\x02\x82",2532,3886}}; + +int main(int argc, char **argv){ + FILE *file; + char buffer[1024]; + char *fwmem=0; + int len; + long fleng=0; + int i; + int n=0; + int x; + int done=0; + int d=0; + int e=0; + if(argc!=2){ + printf("./convert \n"); + exit(1); + } + file=fopen(argv[1],"r"); + fprintf(stderr,"Firmware extractor 0.1\n"); + while((len=fread(buffer,1,1024,file))){ + fleng+=len; + fwmem=realloc(fwmem,fleng); + memcpy(&fwmem[fleng-len],buffer,len); + } + fprintf(stderr,"Stored in memory: %ld\n",fleng); + for(n=0;n