diff options
author | James Meyer <james.meyer@operamail.com> | 2009-03-09 14:15:17 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2009-03-09 14:15:17 (GMT) |
commit | 9a44255ba27e549106e4199cda5d30e1a5035f76 (patch) | |
tree | 8b47cffe9e36e733d3d52ff9b61a9d16f1f78b4d /abs | |
parent | dbfd9598e7acac8ad2ad8b9501859d07a51ae4e6 (diff) | |
parent | 1d197919d5899c4a133e609116fec381157bc870 (diff) | |
download | linhes_pkgbuild-9a44255ba27e549106e4199cda5d30e1a5035f76.zip linhes_pkgbuild-9a44255ba27e549106e4199cda5d30e1a5035f76.tar.gz linhes_pkgbuild-9a44255ba27e549106e4199cda5d30e1a5035f76.tar.bz2 |
Merge branch 'HEAD' of ssh://jams@knoppmyth.net/mount/repository/LinHES-PKGBUILD.git
Diffstat (limited to 'abs')
16 files changed, 1936 insertions, 0 deletions
diff --git a/abs/extra-testing/community/cdparanoia/ChangeLog b/abs/extra-testing/community/cdparanoia/ChangeLog new file mode 100644 index 0000000..a1a1d4d --- /dev/null +++ b/abs/extra-testing/community/cdparanoia/ChangeLog @@ -0,0 +1,23 @@ +2008-09-15 Alexander Fehr <pizzapunk gmail com> + + * cdparanoia-10.2-1: + New upstream release. + +2008-08-07 Alexander Fehr <pizzapunk gmail com> + + * cdparanoia-10.1-1: + New upstream release. + Changed license to GPL. + Added !makeflags option. + +2008-07-07 Alexander Fehr <pizzapunk gmail com> + + * cdparanoia-10.0-1: + New upstream release. + New maintainer. + Added arch variable. + Changed license to GPL3. + Fixed man page location. + Removed cdparanoia.patch. + Removed gcc34.patch. + Added ChangeLog. diff --git a/abs/extra-testing/community/cdparanoia/PKGBUILD b/abs/extra-testing/community/cdparanoia/PKGBUILD new file mode 100644 index 0000000..0e60bd4 --- /dev/null +++ b/abs/extra-testing/community/cdparanoia/PKGBUILD @@ -0,0 +1,21 @@ +# $Id: PKGBUILD 13080 2008-09-25 21:49:25Z pierre $ +# Maintainer: Alexander Fehr <pizzapunk gmail com> + +pkgname=cdparanoia +pkgver=10.2 +pkgrel=2 +pkgdesc="Compact Disc Digital Audio extraction tool" +arch=('i686' 'x86_64') +url="http://www.xiph.org/paranoia/" +license=('GPL') +depends=('glibc') +options=('!makeflags') +source=(http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-$pkgver.src.tgz gcc.patch) + +build() { + cd "$srcdir/cdparanoia-III-$pkgver" + patch -p0 -i ${srcdir}/gcc.patch || return 1 + ./configure --prefix=/usr --mandir=/usr/share/man || return 1 + make || return 1 + make prefix="$pkgdir/usr" MANDIR="$pkgdir/usr/share/man" install || return 1 +} diff --git a/abs/extra-testing/community/cdparanoia/gcc.patch b/abs/extra-testing/community/cdparanoia/gcc.patch new file mode 100644 index 0000000..b157353 --- /dev/null +++ b/abs/extra-testing/community/cdparanoia/gcc.patch @@ -0,0 +1,582 @@ +Index: interface/test_interface.c +=================================================================== +--- interface/test_interface.c (Revision 15337) ++++ interface/test_interface.c (Revision 15340) +@@ -66,9 +66,9 @@ + if(!fd)fd=fdopen(d->cdda_fd,"r"); + + if(begin<lastread) +- d->private->last_milliseconds=20; ++ d->private_data->last_milliseconds=20; + else +- d->private->last_milliseconds=sectors; ++ d->private_data->last_milliseconds=sectors; + + #ifdef CDDA_TEST_UNDERRUN + sectors-=1; +Index: interface/cdda_interface.h +=================================================================== +--- interface/cdda_interface.h (Revision 15337) ++++ interface/cdda_interface.h (Revision 15340) +@@ -84,7 +84,7 @@ + int is_atapi; + int is_mmc; + +- cdda_private_data_t *private; ++ cdda_private_data_t *private_data; + void *reserved; + unsigned char inqbytes[4]; + +Index: interface/interface.c +=================================================================== +--- interface/interface.c (Revision 15337) ++++ interface/interface.c (Revision 15340) +@@ -39,9 +39,9 @@ + if(d->drive_model)free(d->drive_model); + if(d->cdda_fd!=-1)close(d->cdda_fd); + if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd); +- if(d->private){ +- if(d->private->sg_hd)free(d->private->sg_hd); +- free(d->private); ++ if(d->private_data){ ++ if(d->private_data->sg_hd)free(d->private_data->sg_hd); ++ free(d->private_data); + } + + free(d); +@@ -127,7 +127,7 @@ + } + } + } +- if(ms)*ms=d->private->last_milliseconds; ++ if(ms)*ms=d->private_data->last_milliseconds; + return(sectors); + } + +Index: interface/scsi_interface.c +=================================================================== +--- interface/scsi_interface.c (Revision 15337) ++++ interface/scsi_interface.c (Revision 15340) +@@ -15,13 +15,13 @@ + static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){ + struct timespec tv1; + struct timespec tv2; +- int ret1=clock_gettime(d->private->clock,&tv1); ++ int ret1=clock_gettime(d->private_data->clock,&tv1); + int ret2=ioctl(fd, command,arg); +- int ret3=clock_gettime(d->private->clock,&tv2); ++ int ret3=clock_gettime(d->private_data->clock,&tv2); + if(ret1<0 || ret3<0){ +- d->private->last_milliseconds=-1; ++ d->private_data->last_milliseconds=-1; + }else{ +- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; ++ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; + } + return ret2; + } +@@ -96,7 +96,7 @@ + static void clear_garbage(cdrom_drive *d){ + fd_set fdset; + struct timeval tv; +- struct sg_header *sg_hd=d->private->sg_hd; ++ struct sg_header *sg_hd=d->private_data->sg_hd; + int flag=0; + + /* clear out any possibly preexisting garbage */ +@@ -185,7 +185,7 @@ + struct timespec tv2; + int tret1,tret2; + int status = 0; +- struct sg_header *sg_hd=d->private->sg_hd; ++ struct sg_header *sg_hd=d->private_data->sg_hd; + long writebytes=SG_OFF+cmd_len+in_size; + + /* generic scsi device services */ +@@ -195,7 +195,7 @@ + + memset(sg_hd,0,sizeof(sg_hd)); + memset(sense_buffer,0,SG_MAX_SENSE); +- memcpy(d->private->sg_buffer,cmd,cmd_len+in_size); ++ memcpy(d->private_data->sg_buffer,cmd,cmd_len+in_size); + sg_hd->twelve_byte = cmd_len == 12; + sg_hd->result = 0; + sg_hd->reply_len = SG_OFF + out_size; +@@ -209,7 +209,7 @@ + tell if the command failed. Scared yet? */ + + if(bytecheck && out_size>in_size){ +- memset(d->private->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); ++ memset(d->private_data->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); + /* the size does not remove cmd_len due to the way the kernel + driver copies buffers */ + writebytes+=(out_size-in_size); +@@ -243,7 +243,7 @@ + } + + sigprocmask (SIG_BLOCK, &(d->sigset), NULL ); +- tret1=clock_gettime(d->private->clock,&tv1); ++ tret1=clock_gettime(d->private_data->clock,&tv1); + errno=0; + status = write(d->cdda_fd, sg_hd, writebytes ); + +@@ -289,7 +289,7 @@ + } + } + +- tret2=clock_gettime(d->private->clock,&tv2); ++ tret2=clock_gettime(d->private_data->clock,&tv2); + errno=0; + status = read(d->cdda_fd, sg_hd, SG_OFF + out_size); + sigprocmask ( SIG_UNBLOCK, &(d->sigset), NULL ); +@@ -313,7 +313,7 @@ + if(bytecheck && in_size+cmd_len<out_size){ + long i,flag=0; + for(i=in_size;i<out_size;i++) +- if(d->private->sg_buffer[i]!=bytefill){ ++ if(d->private_data->sg_buffer[i]!=bytefill){ + flag=1; + break; + } +@@ -326,9 +326,9 @@ + + errno=0; + if(tret1<0 || tret2<0){ +- d->private->last_milliseconds=-1; ++ d->private_data->last_milliseconds=-1; + }else{ +- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000; ++ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000; + } + return(0); + } +@@ -347,7 +347,7 @@ + + memset(&hdr,0,sizeof(hdr)); + memset(sense,0,sizeof(sense)); +- memcpy(d->private->sg_buffer,cmd+cmd_len,in_size); ++ memcpy(d->private_data->sg_buffer,cmd+cmd_len,in_size); + + hdr.cmdp = cmd; + hdr.cmd_len = cmd_len; +@@ -355,7 +355,7 @@ + hdr.mx_sb_len = SG_MAX_SENSE; + hdr.timeout = 50000; + hdr.interface_id = 'S'; +- hdr.dxferp = d->private->sg_buffer; ++ hdr.dxferp = d->private_data->sg_buffer; + hdr.flags = SG_FLAG_DIRECT_IO; /* direct IO if we can get it */ + + /* scary buffer fill hack */ +@@ -400,7 +400,7 @@ + if(bytecheck && in_size<out_size){ + long i,flag=0; + for(i=in_size;i<out_size;i++) +- if(d->private->sg_buffer[i]!=bytefill){ ++ if(d->private_data->sg_buffer[i]!=bytefill){ + flag=1; + break; + } +@@ -412,7 +412,7 @@ + } + + /* Can't rely on .duration because we can't be certain kernel has HZ set to something useful */ +- /* d->private->last_milliseconds = hdr.duration; */ ++ /* d->private_data->last_milliseconds = hdr.duration; */ + + errno = 0; + return 0; +@@ -445,9 +445,9 @@ + + handle_scsi_cmd(d, cmd, 6, 0, 56, 0,0, sense); + +- key = d->private->sg_buffer[2] & 0xf; +- ASC = d->private->sg_buffer[12]; +- ASCQ = d->private->sg_buffer[13]; ++ key = d->private_data->sg_buffer[2] & 0xf; ++ ASC = d->private_data->sg_buffer[12]; ++ ASCQ = d->private_data->sg_buffer[13]; + + if(key == 2 && ASC == 4 && ASCQ == 1) return 0; + return 1; +@@ -492,7 +492,7 @@ + if (handle_scsi_cmd (d, cmd, 10, 0, size+4,'\377',1,sense)) return(1); + + { +- unsigned char *b=d->private->sg_buffer; ++ unsigned char *b=d->private_data->sg_buffer; + if(b[0])return(1); /* Handles only up to 256 bytes */ + if(b[6])return(1); /* Handles only up to 256 bytes */ + +@@ -604,8 +604,8 @@ + static unsigned int get_orig_sectorsize(cdrom_drive *d){ + if(mode_sense(d,12,0x01))return(-1); + +- d->orgdens = d->private->sg_buffer[4]; +- return(d->orgsize = ((int)(d->private->sg_buffer[10])<<8)+d->private->sg_buffer[11]); ++ d->orgdens = d->private_data->sg_buffer[4]; ++ return(d->orgsize = ((int)(d->private_data->sg_buffer[10])<<8)+d->private_data->sg_buffer[11]); + } + + /* switch CDROM scsi drives to given sector size */ +@@ -664,8 +664,8 @@ + return(-4); + } + +- first=d->private->sg_buffer[2]; +- last=d->private->sg_buffer[3]; ++ first=d->private_data->sg_buffer[2]; ++ last=d->private_data->sg_buffer[3]; + tracks=last-first+1; + + if (last > MAXTRK || first > MAXTRK || last<0 || first<0) { +@@ -683,7 +683,7 @@ + return(-5); + } + { +- scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4); ++ scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4); + + d->disc_toc[i-first].bFlags=toc->bFlags; + d->disc_toc[i-first].bTrack=i; +@@ -704,7 +704,7 @@ + return(-2); + } + { +- scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4); ++ scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4); + + d->disc_toc[i-first].bFlags=toc->bFlags; + d->disc_toc[i-first].bTrack=0xAA; +@@ -738,7 +738,7 @@ + } + + /* copy to our structure and convert start sector */ +- tracks = d->private->sg_buffer[1]; ++ tracks = d->private_data->sg_buffer[1]; + if (tracks > MAXTRK) { + cderror(d,"003: CDROM reporting illegal number of tracks\n"); + return(-3); +@@ -754,33 +754,33 @@ + return(-5); + } + +- d->disc_toc[i].bFlags = d->private->sg_buffer[10]; ++ d->disc_toc[i].bFlags = d->private_data->sg_buffer[10]; + d->disc_toc[i].bTrack = i + 1; + + d->disc_toc[i].dwStartSector= d->adjust_ssize * +- (((signed char)(d->private->sg_buffer[2])<<24) | +- (d->private->sg_buffer[3]<<16)| +- (d->private->sg_buffer[4]<<8)| +- (d->private->sg_buffer[5])); ++ (((signed char)(d->private_data->sg_buffer[2])<<24) | ++ (d->private_data->sg_buffer[3]<<16)| ++ (d->private_data->sg_buffer[4]<<8)| ++ (d->private_data->sg_buffer[5])); + } + + d->disc_toc[i].bFlags = 0; + d->disc_toc[i].bTrack = i + 1; +- memcpy (&foo, d->private->sg_buffer+2, 4); +- memcpy (&bar, d->private->sg_buffer+6, 4); ++ memcpy (&foo, d->private_data->sg_buffer+2, 4); ++ memcpy (&bar, d->private_data->sg_buffer+6, 4); + d->disc_toc[i].dwStartSector = d->adjust_ssize * (be32_to_cpu(foo) + + be32_to_cpu(bar)); + + d->disc_toc[i].dwStartSector= d->adjust_ssize * +- ((((signed char)(d->private->sg_buffer[2])<<24) | +- (d->private->sg_buffer[3]<<16)| +- (d->private->sg_buffer[4]<<8)| +- (d->private->sg_buffer[5]))+ ++ ((((signed char)(d->private_data->sg_buffer[2])<<24) | ++ (d->private_data->sg_buffer[3]<<16)| ++ (d->private_data->sg_buffer[4]<<8)| ++ (d->private_data->sg_buffer[5]))+ + +- ((((signed char)(d->private->sg_buffer[6])<<24) | +- (d->private->sg_buffer[7]<<16)| +- (d->private->sg_buffer[8]<<8)| +- (d->private->sg_buffer[9])))); ++ ((((signed char)(d->private_data->sg_buffer[6])<<24) | ++ (d->private_data->sg_buffer[7]<<16)| ++ (d->private_data->sg_buffer[8]<<8)| ++ (d->private_data->sg_buffer[9])))); + + + d->cd_extra = FixupTOC(d,tracks+1); +@@ -817,7 +817,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -836,7 +836,7 @@ + cmd[9] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -854,7 +854,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -872,7 +872,7 @@ + cmd[9] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -890,7 +890,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -908,7 +908,7 @@ + cmd[9] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -922,7 +922,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -936,7 +936,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -950,7 +950,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -964,7 +964,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -978,7 +978,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -992,7 +992,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -1026,7 +1026,7 @@ + + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -1039,7 +1039,7 @@ + + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -1052,7 +1052,7 @@ + + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -1275,7 +1275,7 @@ + static int count_2352_bytes(cdrom_drive *d){ + long i; + for(i=2351;i>=0;i--) +- if(d->private->sg_buffer[i]!=(unsigned char)'\177') ++ if(d->private_data->sg_buffer[i]!=(unsigned char)'\177') + return(((i+3)>>2)<<2); + + return(0); +@@ -1284,7 +1284,7 @@ + static int verify_nonzero(cdrom_drive *d){ + long i,flag=0; + for(i=0;i<2352;i++) +- if(d->private->sg_buffer[i]!=0){ ++ if(d->private_data->sg_buffer[i]!=0){ + flag=1; + break; + } +@@ -1621,7 +1621,7 @@ + d->is_mmc=0; + if(mode_sense(d,22,0x2A)==0){ + +- b=d->private->sg_buffer; ++ b=d->private_data->sg_buffer; + b+=b[3]+4; + + if((b[0]&0x3F)==0x2A){ +@@ -1669,7 +1669,7 @@ + cderror(d,"008: Unable to identify CDROM model\n"); + return(NULL); + } +- return (d->private->sg_buffer); ++ return (d->private_data->sg_buffer); + } + + int scsi_init_drive(cdrom_drive *d){ +@@ -1725,8 +1725,8 @@ + check_cache(d); + + d->error_retry=1; +- d->private->sg_hd=realloc(d->private->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128); +- d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF; ++ d->private_data->sg_hd=realloc(d->private_data->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128); ++ d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF; + d->report_all=1; + return(0); + } +Index: interface/cooked_interface.c +=================================================================== +--- interface/cooked_interface.c (Revision 15337) ++++ interface/cooked_interface.c (Revision 15340) +@@ -13,13 +13,13 @@ + static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){ + struct timespec tv1; + struct timespec tv2; +- int ret1=clock_gettime(d->private->clock,&tv1); ++ int ret1=clock_gettime(d->private_data->clock,&tv1); + int ret2=ioctl(fd, command,arg); +- int ret3=clock_gettime(d->private->clock,&tv2); ++ int ret3=clock_gettime(d->private_data->clock,&tv2); + if(ret1<0 || ret3<0){ +- d->private->last_milliseconds=-1; ++ d->private_data->last_milliseconds=-1; + }else{ +- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; ++ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; + } + return ret2; + } +Index: interface/scan_devices.c +=================================================================== +--- interface/scan_devices.c (Revision 15337) ++++ interface/scan_devices.c (Revision 15340) +@@ -264,11 +264,11 @@ + d->interface=COOKED_IOCTL; + d->bigendianp=-1; /* We don't know yet... */ + d->nsectors=-1; +- d->private=calloc(1,sizeof(*d->private)); ++ d->private_data=calloc(1,sizeof(*d->private_data)); + { + /* goddamnit */ + struct timespec tv; +- d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); ++ d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); + } + idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description); + return(d); +@@ -674,15 +674,15 @@ + d->bigendianp=-1; /* We don't know yet... */ + d->nsectors=-1; + d->messagedest = messagedest; +- d->private=calloc(1,sizeof(*d->private)); ++ d->private_data=calloc(1,sizeof(*d->private_data)); + { + /* goddamnit */ + struct timespec tv; +- d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); ++ d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); + } + if(use_sgio){ + d->interface=SGIO_SCSI; +- d->private->sg_buffer=(unsigned char *)(d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE)); ++ d->private_data->sg_buffer=(unsigned char *)(d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE)); + g_fd=d->cdda_fd=dup(d->ioctl_fd); + }else{ + version=verify_SG_version(d,messagedest,messages); +@@ -696,8 +696,8 @@ + } + + /* malloc our big buffer for scsi commands */ +- d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE); +- d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF; ++ d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE); ++ d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF; + } + + { +@@ -772,9 +772,9 @@ + if(i_fd!=-1)close(i_fd); + if(g_fd!=-1)close(g_fd); + if(d){ +- if(d->private){ +- if(d->private->sg_hd)free(d->private->sg_hd); +- free(d->private); ++ if(d->private_data){ ++ if(d->private_data->sg_hd)free(d->private_data->sg_hd); ++ free(d->private_data); + } + free(d); + } +@@ -821,7 +821,7 @@ + d->interface=TEST_INTERFACE; + d->bigendianp=-1; /* We don't know yet... */ + d->nsectors=-1; +- d->private=calloc(1,sizeof(*d->private)); ++ d->private_data=calloc(1,sizeof(*d->private_data)); + d->drive_model=copystring("File based test interface"); + idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",d->drive_model); + diff --git a/abs/extra-testing/community/gnash-common/PKGBUILD b/abs/extra-testing/community/gnash-common/PKGBUILD new file mode 100644 index 0000000..107afb8 --- /dev/null +++ b/abs/extra-testing/community/gnash-common/PKGBUILD @@ -0,0 +1,40 @@ +# $Id: PKGBUILD 17544 2008-10-30 22:40:52Z pierre $ + +pkgname=gnash-common +pkgver=0.8.4 +pkgrel=1 +pkgdesc='A GNU Flash movie player' +arch=('i686' 'x86_64') +url='http://www.gnu.org/software/gnash/' +license=('GPL3') +depends=('curl' 'giflib' 'boost' 'libldap' 'gstreamer0.10-base' 'sdl' 'libgl' + 'libjpeg' 'libpng' 'mesa') +makedepends=('pkgconfig') +source=("http://ftp.gnu.org/gnu/gnash/${pkgver}/gnash-${pkgver}.tar.bz2") +options=('!libtool' '!emptydirs' '!docs') +provides=('gnash') +replaces=('gnash') +md5sums=('b47a7ed4b7c66b8c2ebacc2286ef0d4b') + +build() { + cd $srcdir/gnash-$pkgver + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --disable-plugins \ + --disable-menus \ + --enable-gui=sdl \ + --enable-renderer=ogl \ + --enable-z \ + --enable-jpeg \ + --enable-libpng \ + --enable-gif \ + --enable-fontconfig \ + --enable-Xft \ + --enable-expat \ + --enable-gstreamer \ + --enable-media=gst || return 1 + + make || return 1 + make DESTDIR=$pkgdir install || return 1 +} diff --git a/abs/extra-testing/community/gnash-gtk/PKGBUILD b/abs/extra-testing/community/gnash-gtk/PKGBUILD new file mode 100644 index 0000000..45ba804 --- /dev/null +++ b/abs/extra-testing/community/gnash-gtk/PKGBUILD @@ -0,0 +1,40 @@ +# $Id: PKGBUILD 17609 2008-10-31 06:16:21Z pierre $ + +pkgname=gnash-gtk +pkgver=0.8.4 +pkgrel=1 +pkgdesc='A GNU Flash movie player (gtk)' +arch=('i686' 'x86_64') +url='http://www.gnu.org/software/gnash/' +license=("GPL3") +depends=("gnash-common=$pkgver" 'gtk2' 'gtkglext') +makedepends=('pkgconfig') +source=("http://ftp.gnu.org/gnu/gnash/${pkgver}/gnash-${pkgver}.tar.bz2") +options=('!libtool' '!emptydirs' '!docs') +md5sums=('b47a7ed4b7c66b8c2ebacc2286ef0d4b') + +build() { + cd $srcdir/gnash-$pkgver + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --enable-gui=gtk \ + --with-plugins-install=system \ + --with-npapi-plugindir=/usr/lib/mozilla/plugins \ + --enable-renderer=ogl \ + --enable-z \ + --enable-jpeg \ + --enable-libpng \ + --enable-gif \ + --enable-fontconfig \ + --enable-Xft \ + --enable-expat \ + --enable-gstreamer \ + --enable-media=gst || return 1 + + make || return 1 + make DESTDIR=$pkgdir install install-plugin || return 1 + rm -rf $pkgdir/usr/{lib/gnash,share} + rm -f $pkgdir/usr/bin/{gnash,gprocessor,dumpshm,soldumper,flvdumper} + rm -rf $pkgdir/etc +} diff --git a/abs/extra-testing/community/gstreamer0.10-base-plugins/PKGBUILD b/abs/extra-testing/community/gstreamer0.10-base-plugins/PKGBUILD new file mode 100644 index 0000000..5678e9d --- /dev/null +++ b/abs/extra-testing/community/gstreamer0.10-base-plugins/PKGBUILD @@ -0,0 +1,33 @@ +# $Id: PKGBUILD 14436 2008-10-06 17:41:07Z jgc $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=gstreamer0.10-base-plugins +pkgver=0.10.21 +pkgrel=1 +pkgdesc="GStreamer Multimedia Framework Base Plugins (gst-plugins-base)" +arch=(i686 x86_64) +license=('GPL' 'LGPL') +depends=('gstreamer0.10-base>=0.10.21' 'gnome-vfs>=2.24.0' 'alsa-lib>=1.0.17a' 'cdparanoia>=10.2' 'libvisual' 'libvorbis>=1.2.0' 'libtheora') +makedepends=('pkgconfig') +replaces=('gstreamer0.10-alsa' 'gstreamer0.10-theora' 'gstreamer0.10-libvisual' 'gstreamer0.10-pango' 'gstreamer0.10-cdparanoia' 'gstreamer0.10-vorbis' 'gstreamer0.10-gnomevfs' 'gstreamer0.10-ogg') +conflicts=('gstreamer0.10-alsa' 'gstreamer0.10-theora' 'gstreamer0.10-libvisual' 'gstreamer0.10-pango' 'gstreamer0.10-cdparanoia' 'gstreamer0.10-vorbis' 'gstreamer0.10-gnomevfs' 'gstreamer0.10-ogg') +provides=("gstreamer0.10-alsa=${pkgver}" "gstreamer0.10-theora=${pkgver}" "gstreamer0.10-libvisual=${pkgver}" "gstreamer0.10-pango=${pkgver}" "gstreamer0.10-cdparanoia=${pkgver}" "gstreamer0.10-vorbis=${pkgver}" "gstreamer0.10-gnomevfs=${pkgver}" "gstreamer0.10-ogg=${pkgver}" "gst-plugins-base=${pkgver}") +options=(!libtool) +url="http://gstreamer.freedesktop.org/" +groups=('gstreamer0.10-plugins') +_relname=gst-plugins-base +source=(${url}/src/${_relname}/${_relname}-${pkgver}.tar.bz2) +md5sums=('0e0cd485311502ad1c0c028148e3186a') + +build() { + cd "${srcdir}/${_relname}-${pkgver}" + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-static --enable-experimental \ + --disable-docs-build --disable-plugin-docs \ + --with-package-name="GStreamer Base Plugins (Archlinux)" \ + --with-package-origin="http://www.archlinux.org/" || return 1 + + make || return 1 + cd ext || return 1 + make DESTDIR="${pkgdir}" install || return 1 +} diff --git a/abs/extra-testing/community/gstreamer0.10-base/PKGBUILD b/abs/extra-testing/community/gstreamer0.10-base/PKGBUILD new file mode 100644 index 0000000..b1b065d --- /dev/null +++ b/abs/extra-testing/community/gstreamer0.10-base/PKGBUILD @@ -0,0 +1,28 @@ +# $Id: PKGBUILD 14433 2008-10-06 17:33:22Z jgc $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=gstreamer0.10-base +pkgver=0.10.21 +pkgrel=1 +pkgdesc="GStreamer Multimedia Framework Base plugin libraries" +arch=(i686 x86_64) +license=('GPL' 'LGPL') +depends=('gstreamer0.10>=0.10.21' 'liboil>=0.3.15' 'libsm' 'libxv') +makedepends=('pkgconfig') +options=(!libtool) +url="http://gstreamer.freedesktop.org/" +_relname=gst-plugins-base +source=(${url}/src/${_relname}/${_relname}-${pkgver}.tar.bz2) +md5sums=('0e0cd485311502ad1c0c028148e3186a') + +build() { + cd ${startdir}/src/${_relname}-${pkgver} + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-static --enable-experimental --disable-external \ + --disable-docs-build --disable-plugin-docs \ + --with-package-name="GStreamer Base Plugins (Archlinux)" \ + --with-package-origin="http://www.archlinux.org/" || return 1 + + make || return 1 + make DESTDIR=${startdir}/pkg install || return 1 +} diff --git a/abs/extra-testing/community/gstreamer0.10/PKGBUILD b/abs/extra-testing/community/gstreamer0.10/PKGBUILD new file mode 100644 index 0000000..52934e2 --- /dev/null +++ b/abs/extra-testing/community/gstreamer0.10/PKGBUILD @@ -0,0 +1,33 @@ +# $Id: PKGBUILD 18833 2008-11-09 14:51:01Z jgc $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=gstreamer0.10 +pkgver=0.10.21 +pkgrel=2 +pkgdesc="GStreamer Multimedia Framework" +arch=(i686 x86_64) +license=('LGPL') +url="http://gstreamer.freedesktop.org/" +depends=('libxml2>=2.6.32' 'glib2>=2.18.1') +makedepends=('perlxml' 'pkgconfig' 'gtk-doc') +options=('!libtool') +source=(${url}/src/gstreamer/gstreamer-${pkgver}.tar.bz2 + bgo555631.patch) +md5sums=('7bad90af3fd81a1535363cf85359125c' + '71eb301845184638e6556dacd1ca7d55') + +build() { + cd "${srcdir}/gstreamer-${pkgver}" + patch -Np0 -i "${srcdir}/bgo555631.patch" || return 1 + ./configure --prefix=/usr \ + --sysconfdir=/etc --localstatedir=/var \ + --disable-docs-build || return 1 + make || return 1 + make DESTDIR="${pkgdir}" install || return 1 + cd "${pkgdir}/usr/bin" + + #Remove unversioned gst-* binaries to get rid of conflicts + for bins in `ls *-0.10`; do + rm -f ${bins/-0.10/} + done +} diff --git a/abs/extra-testing/community/gstreamer0.10/bgo555631.patch b/abs/extra-testing/community/gstreamer0.10/bgo555631.patch new file mode 100644 index 0000000..b9a18f4 --- /dev/null +++ b/abs/extra-testing/community/gstreamer0.10/bgo555631.patch @@ -0,0 +1,88 @@ +--- libs/gst/base/gstbasetransform.c 2008/10/20 13:29:06 1.126 ++++ libs/gst/base/gstbasetransform.c 2008/10/21 16:30:41 1.127 +@@ -251,7 +251,7 @@ + /* upstream caps and size suggestions */ + GstCaps *sink_suggest; + guint size_suggest; +- gint suggest_pending; ++ gboolean suggest_pending; + + gboolean reconfigure; + }; +@@ -1224,7 +1224,7 @@ + gst_caps_unref (priv->sink_suggest); + priv->sink_suggest = gst_caps_ref (othercaps); + priv->size_suggest = size_suggest; +- g_atomic_int_set (&trans->priv->suggest_pending, 1); ++ trans->priv->suggest_pending = TRUE; + GST_OBJECT_UNLOCK (trans->sinkpad); + } + gst_caps_unref (othercaps); +@@ -1366,7 +1366,7 @@ + GstBaseTransform *trans; + GstBaseTransformPrivate *priv; + GstFlowReturn res; +- gboolean proxy, suggest; ++ gboolean proxy, suggest, same_caps; + GstCaps *sink_suggest; + guint size_suggest; + +@@ -1384,8 +1384,12 @@ + + /* we remember our previous alloc request to quickly see if we can proxy or + * not. We skip this check if we have a pending suggestion. */ +- if (g_atomic_int_get (&priv->suggest_pending) == 0 && caps && +- gst_caps_is_equal (priv->sink_alloc, caps)) { ++ GST_OBJECT_LOCK (pad); ++ same_caps = !priv->suggest_pending && caps && ++ gst_caps_is_equal (priv->sink_alloc, caps); ++ GST_OBJECT_UNLOCK (pad); ++ ++ if (same_caps) { + /* we have seen this before, see below if we need to proxy */ + GST_DEBUG_OBJECT (trans, "have old caps"); + sink_suggest = caps; +@@ -1414,7 +1418,7 @@ + size_suggest = size; + suggest = FALSE; + } +- g_atomic_int_set (&priv->suggest_pending, 0); ++ priv->suggest_pending = FALSE; + GST_OBJECT_UNLOCK (pad); + + /* check if we actually handle this format on the sinkpad */ +@@ -1462,7 +1466,10 @@ + } + } + /* remember the new caps */ ++ GST_OBJECT_LOCK (pad); + gst_caps_replace (&priv->sink_alloc, sink_suggest); ++ GST_OBJECT_UNLOCK (pad); ++ + proxy = priv->proxy_alloc; + GST_DEBUG_OBJECT (trans, "doing default alloc, proxy %d", proxy); + +@@ -1487,11 +1494,13 @@ + if (!gst_caps_is_equal (newcaps, caps)) { + GST_DEBUG_OBJECT (trans, "caps are new"); + /* we have new caps, see if we can proxy downstream */ +- if (gst_pad_peer_accept_caps (trans->sinkpad, newcaps)) { ++ if (gst_pad_peer_accept_caps (pad, newcaps)) { + /* peer accepts the caps, return a buffer in this format */ + GST_DEBUG_OBJECT (trans, "peer accepted new caps"); + /* remember the format */ ++ GST_OBJECT_LOCK (pad); + gst_caps_replace (&priv->sink_alloc, newcaps); ++ GST_OBJECT_UNLOCK (pad); + } else { + GST_DEBUG_OBJECT (trans, "peer did not accept new caps"); + /* peer does not accept the caps, free the buffer we received and +@@ -2306,7 +2315,7 @@ + caps = gst_caps_copy (caps); + trans->priv->sink_suggest = caps; + trans->priv->size_suggest = size; +- g_atomic_int_set (&trans->priv->suggest_pending, 1); ++ trans->priv->suggest_pending = TRUE; + GST_DEBUG_OBJECT (trans, "new suggest %" GST_PTR_FORMAT, caps); + GST_OBJECT_UNLOCK (trans->sinkpad); + } diff --git a/abs/extra-testing/community/gtkglext/PKGBUILD b/abs/extra-testing/community/gtkglext/PKGBUILD new file mode 100644 index 0000000..a310af6 --- /dev/null +++ b/abs/extra-testing/community/gtkglext/PKGBUILD @@ -0,0 +1,25 @@ +# $Id: PKGBUILD 9958 2008-08-21 02:56:50Z eric $ +# Maintainer: damir <damir@archlinux.org> +# Contributor: Ben <ben@benmazer.net> + +pkgname=gtkglext +pkgver=1.2.0 +pkgrel=1 +pkgdesc="opengl extensions for gtk2" +arch=('i686' 'x86_64') +url="http://gtkglext.sourceforge.net/" +depends=('gtk2' 'pango') +makedepends=('gcc>=4.0.3') +options=('!libtool') +source=("http://downloads.sourceforge.net/sourceforge/gtkglext/$pkgname-$pkgver.tar.bz2") # $pkgname-$pkgver-pangox.patch) +md5sums=('ed7ba24ce06a8630c07f2d0ee5f04ab4') + +build() { + cd $startdir/src/$pkgname-$pkgver + # fix "undefined reference to `pango_x_font*" trouble + #cat $startdir/src/$pkgname-$pkgver-pangox.patch | patch -p1 || return 1 + autoconf --force + ./configure --prefix=/usr + make || return 1 + make prefix=$startdir/pkg/usr install +} diff --git a/abs/extra-testing/community/gtkglext/gtkglext-1.0.6-pangox.patch b/abs/extra-testing/community/gtkglext/gtkglext-1.0.6-pangox.patch new file mode 100644 index 0000000..8cd589e --- /dev/null +++ b/abs/extra-testing/community/gtkglext/gtkglext-1.0.6-pangox.patch @@ -0,0 +1,30 @@ +--- gtkglext-1.0.6/configure.in 2005-09-10 16:45:06.000000000 +0200 ++++ gtkglext-1.0.6.az/configure.in 2005-09-10 16:46:01.000000000 +0200 +@@ -59,6 +59,10 @@ + m4_define([pango_pkg], [pango]) + m4_define([pango_required_version], [1.0.0]) + ++# Pangox ++m4_define([pangox_pkg], [pangox]) ++m4_define([pangox_required_version], [1.0.0]) ++ + # PangoFT2 + m4_define([pangoft2_pkg], [pangoft2]) + m4_define([pangoft2_required_version], [1.0.0]) +@@ -345,6 +349,7 @@ + gtk_pkg >= gtk_required_version \ + gdk_pkg >= gdk_required_version \ + pango_pkg >= pango_required_version \ ++pangox_pkg >= pango_required_version \ + gmodule_pkg >= gmodule_required_version \ + ]) + +@@ -789,7 +794,7 @@ + # CFLAGS and LIBS + ################################################## + +-GDKGLEXT_PACKAGES="gdk_pkg pango_pkg gmodule_pkg" ++GDKGLEXT_PACKAGES="gdk_pkg pango_pkg pangox_pkg gmodule_pkg" + GDKGLEXT_EXTRA_CFLAGS="$GL_CFLAGS $GDKGLEXT_WIN_CFLAGS" + GDKGLEXT_EXTRA_LIBS="$GL_LIBS $GDKGLEXT_WIN_LIBS" + GDKGLEXT_DEP_CFLAGS="$GDKGLEXT_EXTRA_CFLAGS `$PKG_CONFIG --cflags $GDKGLEXT_PACKAGES`" diff --git a/abs/extra-testing/community/liboil/PKGBUILD b/abs/extra-testing/community/liboil/PKGBUILD new file mode 100644 index 0000000..23230f5 --- /dev/null +++ b/abs/extra-testing/community/liboil/PKGBUILD @@ -0,0 +1,25 @@ +# $Id: PKGBUILD 14430 2008-10-06 17:28:40Z jgc $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=liboil +pkgver=0.3.15 +pkgrel=1 +pkgdesc="Library of simple functions that are optimized for various CPUs." +arch=('i686' 'x86_64') +license=('custom') +url="http://liboil.freedesktop.org/" +depends=('glibc') +makedepends=('glib2' 'pkgconfig' 'docbook-xsl') +options=('!libtool' '!makeflags') +source=(${url}/download/${pkgname}-${pkgver}.tar.gz) +md5sums=('11dd39b1ca13ce2e0618d4df8303f137') + +build() { + unset CFLAGS + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr || return 1 + make || return 1 + make DESTDIR="${pkgdir}" install || return 1 + install -m755 -d "${pkgdir}/usr/share/licenses/liboil" + install -m644 COPYING "${pkgdir}/usr/share/licenses/liboil/" +} diff --git a/abs/extra-testing/v4l-dvb-dvico2/PKGBUILD b/abs/extra-testing/v4l-dvb-dvico2/PKGBUILD new file mode 100644 index 0000000..4886027 --- /dev/null +++ b/abs/extra-testing/v4l-dvb-dvico2/PKGBUILD @@ -0,0 +1,24 @@ +# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $ +# Maintainer: Cecil Watson<knoppmyth@gmail.com> + +pkgname=v4l-dvb-dvico2 +_kernver=2.6.28-ARCH +pkgver=1 +pkgrel=1 +pkgdesc="V4L-DVB drivers from mercurial for some dvico cards." +arch=('i686' 'x86_64') +license=('GPL2') +url="http://linuxtv.org/" +depends=('kernel26') +makedepends=(kernel-headers) +install=v4l-dvb.install +source=(http://linuxtv.org/hg/v4l-dvb/archive/401393656ebc.tar.bz2) + +build() { + cd $startdir/src/v4l* + make KERNDIR=/lib/modules/$_kernver/build \ + DESTDIR=$startdir/pkg KERNELRELEASE=$_kernver all || return 1 + make KERNDIR=/lib/modules/$_kernver/build \ + DESTDIR=$startdir/pkg KERNELRELEASE=$_kernver install || return 1 + rm -fr $startdir/pkg/lib/modules/$_kernver/modules* +} diff --git a/abs/extra-testing/v4l-dvb-dvico2/fix-jdelvare-i2c-i2c-constify-client-address-data.patch b/abs/extra-testing/v4l-dvb-dvico2/fix-jdelvare-i2c-i2c-constify-client-address-data.patch new file mode 100644 index 0000000..8c603f6 --- /dev/null +++ b/abs/extra-testing/v4l-dvb-dvico2/fix-jdelvare-i2c-i2c-constify-client-address-data.patch @@ -0,0 +1,25 @@ +From: Andrew Morton <akpm@linux-foundation.org> + +drivers/media/video/tvaudio.c:147: error: conflicting type qualifiers for 'addr_data' +include/media/v4l2-i2c-drv-legacy.h:37: error: previous declaration of 'addr_data' was here + +Cc: Jean Delvare <khali@linux-fr.org> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +--- + + include/media/v4l2-i2c-drv-legacy.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff -puN include/media/v4l2-i2c-drv-legacy.h~fix-jdelvare-i2c-i2c-constify-client-address-data include/media/v4l2-i2c-drv-legacy.h +--- a/include/media/v4l2-i2c-drv-legacy.h~fix-jdelvare-i2c-i2c-constify-client-address-data ++++ a/include/media/v4l2-i2c-drv-legacy.h +@@ -34,7 +34,7 @@ struct v4l2_i2c_driver_data { + }; + + static struct v4l2_i2c_driver_data v4l2_i2c_data; +-static struct i2c_client_address_data addr_data; ++static const struct i2c_client_address_data addr_data; + static struct i2c_driver v4l2_i2c_driver_legacy; + static char v4l2_i2c_drv_name_legacy[32]; + +_ diff --git a/abs/extra-testing/v4l-dvb-dvico2/v4l-dvb.install b/abs/extra-testing/v4l-dvb-dvico2/v4l-dvb.install new file mode 100644 index 0000000..c87bb82 --- /dev/null +++ b/abs/extra-testing/v4l-dvb-dvico2/v4l-dvb.install @@ -0,0 +1,23 @@ +# arg 1: the new package version +post_install() { + KERNEL_VERSION='2.6.26-ARCH' + depmod -ae -v $KERNEL_VERSION > /dev/null 2>&1 +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + KERNEL_VERSION='2.6.26-ARCH' + depmod -ae -v $KERNEL_VERSION > /dev/null 2>&1 + +} + +# arg 1: the old package version +post_remove() { + KERNEL_VERSION='2.6.26-ARCH' + depmod -ae -v $KERNEL_VERSION > /dev/null 2>&1 +} + +op=$1 +shift +$op $* diff --git a/abs/extra-testing/v4l-dvb-dvico2/xc-bluebird.patch b/abs/extra-testing/v4l-dvb-dvico2/xc-bluebird.patch new file mode 100644 index 0000000..c54594d --- /dev/null +++ b/abs/extra-testing/v4l-dvb-dvico2/xc-bluebird.patch @@ -0,0 +1,896 @@ +[PATCH] Add support for FusionHDTV DVB-T NANO 2 / Dual Digital 4 + +Firmware required: + +Mirror 1: http://konstantin.filtschew.de/v4l-firmware/ + +Mirror 2: http://www.tuxamito.com.es/em2880/ + +This patch is for users, and NOT meant to be merged into the kernel. + +For AU support, apply Rogers patch afterwards: +http://linuxtv.org/~mkrufky/pending/xc/dd4.au.patch + +From: Michael Krufky <mkrufky@linuxtv.org> +--- + linux/drivers/media/dvb/dvb-usb/cxusb.c | 157 +++++++ + linux/drivers/media/dvb/dvb-usb/cxusb.h | 2 + linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 2 + linux/drivers/media/dvb/frontends/Kconfig | 7 + linux/drivers/media/dvb/frontends/Makefile | 1 + linux/drivers/media/dvb/frontends/xc3028-fe.c | 532 ++++++++++++++++++++++++++ + linux/drivers/media/dvb/frontends/xc3028.h | 56 ++ + v4l/versions.txt | 1 + 8 files changed, 757 insertions(+), 1 deletion(-) + +--- v4l-dvb.orig/linux/drivers/media/dvb/dvb-usb/cxusb.c ++++ v4l-dvb/linux/drivers/media/dvb/dvb-usb/cxusb.c +@@ -30,6 +30,7 @@ + #include "mt352.h" + #include "mt352_priv.h" + #include "zl10353.h" ++#include "xc3028.h" + + /* debug */ + int dvb_usb_cxusb_debug; +@@ -72,6 +73,28 @@ + st->gpio_write_state[GPIO_TUNER] = onoff; + } + ++static void cxusb_bluebird_gpio(struct dvb_usb_device *d, u8 pin) ++{ ++ u8 o[2],i; ++ ++ o[0] = 0xff & ~pin; ++ o[1] = 0x00; ++ ++ cxusb_ctrl_msg(d, CMD_BLUEBIRD_GPIO_WRITE, o, 2, &i, 1); ++ msleep(140); ++ ++ if ((i & pin) != 0x00) ++ deb_info("gpio_write failed.\n"); ++ ++ o[1] = pin; ++ ++ cxusb_ctrl_msg(d, CMD_BLUEBIRD_GPIO_WRITE, o, 2, &i, 1); ++ msleep(140); ++ ++ if ((i & pin) != pin) ++ deb_info("gpio_write failed.\n"); ++} ++ + /* I2C */ + static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], + int num) +@@ -351,6 +374,64 @@ + .demod_init = cxusb_mt352_demod_init, + }; + ++static struct zl10353_config cxusb_zl10353_dualdig4_config = { ++ .demod_address = 0x0f, ++ .no_tuner = 1, ++ .parallel_ts = 1, ++}; ++ ++struct bcode { ++ int reg; ++ char *txt; ++ int len; ++ int delay; ++}; ++ ++static int cxusb_xc3028_zl353_gpio_reset(struct dvb_frontend* fe, int ptr) ++{ ++ struct dvb_usb_adapter *adap = fe->dvb->priv; ++ struct dvb_usb_device *d = adap->dev; ++ int j; ++ struct bcode zlconf[] = { ++ /* borrowed from em2880-dvb ++ * this should be fixed in zl10353.c instead */ ++ {0x1e,"\x60\x00",2,0}, ++ {0x1e,"\x61\x4d",2,0}, ++ ++ {0x1e,"\x50\x0b",2,0}, ++ {0x1e,"\x51\x44",2,0}, ++ {0x1e,"\x52\x46",2,0}, ++ {0x1e,"\x53\x15",2,0}, ++ {0x1e,"\x54\x0f",2,0}, ++ {0x1e,"\x5e\x00",2,0}, ++ {0x1e,"\x5f\x12",2,0}, ++ ++ ++ {0x1e,"\x55\x80",2,0}, /* reset */ ++ {0x1e,"\xea\x01",2,0}, ++ {0x1e,"\xea\x00",2,0}, ++ {0x1e,"\x5a\xcd",2,0}, ++ ++ ++ {0x1e,"\x6c\xe6",2,0}, // set input frequency ++ {0x1e,"\x6d\x09",2,0}, ++ {} ++ }; ++ ++ if (ptr == 0 || ptr == 1) ++ /* pulse the GPIO tuner reset pin */ ++ cxusb_bluebird_gpio(d,0x01); ++ else if (ptr == 2) ++ for(j = 0; zlconf[j].txt; j++) ++ d->adapter[0].fe->ops.write(d->adapter[0].fe, zlconf[j].txt,zlconf[j].len); ++ ++ return 0; ++} ++ ++static struct xc3028_config cxusb_xc3028_config = { ++ .gpio_reset = cxusb_xc3028_zl353_gpio_reset, ++}; ++ + /* Callbacks for DVB USB */ + static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap) + { +@@ -386,6 +467,12 @@ + return 0; + } + ++static int cxusb_xc3028_tuner_attach(struct dvb_usb_adapter *adap) ++{ ++ dvb_attach(xc3028_attach,adap->fe, &adap->dev->i2c_adap, &cxusb_xc3028_config); ++ return 0; ++} ++ + static int cxusb_cx22702_frontend_attach(struct dvb_usb_adapter *adap) + { + u8 b; +@@ -401,6 +488,24 @@ + return -EIO; + } + ++static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap) ++{ ++ if (usb_set_interface(adap->dev->udev, 0, 1) < 0) ++ err("set interface failed"); ++ ++ cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); ++ ++ /* pulse the GPIO demod reset pin */ ++ cxusb_bluebird_gpio(adap->dev,0x02); ++ ++ if ((adap->fe = dvb_attach(zl10353_attach, ++ &cxusb_zl10353_dualdig4_config, ++ &adap->dev->i2c_adap)) != NULL) ++ return 0; ++ ++ return -EIO; ++} ++ + static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap) + { + if (usb_set_interface(adap->dev->udev, 0, 7) < 0) +@@ -479,6 +584,7 @@ + static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties; + static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties; + static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties; ++static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties; + + static int cxusb_probe(struct usb_interface *intf, + const struct usb_device_id *id) +@@ -487,7 +593,8 @@ + dvb_usb_device_init(intf,&cxusb_bluebird_lgh064f_properties,THIS_MODULE,NULL) == 0 || + dvb_usb_device_init(intf,&cxusb_bluebird_dee1601_properties,THIS_MODULE,NULL) == 0 || + dvb_usb_device_init(intf,&cxusb_bluebird_lgz201_properties,THIS_MODULE,NULL) == 0 || +- dvb_usb_device_init(intf,&cxusb_bluebird_dtt7579_properties,THIS_MODULE,NULL) == 0) { ++ dvb_usb_device_init(intf,&cxusb_bluebird_dtt7579_properties,THIS_MODULE,NULL) == 0 || ++ dvb_usb_device_init(intf,&cxusb_bluebird_dualdig4_properties,THIS_MODULE,NULL) == 0) { + return 0; + } + +@@ -508,6 +615,8 @@ + { USB_DEVICE(USB_VID_DVICO, USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_WARM) }, + { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_2_COLD) }, + { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_2_WARM) }, ++ { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_4) }, ++ { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DVBT_NANO_2) }, + {} /* Terminating entry */ + }; + MODULE_DEVICE_TABLE (usb, cxusb_table); +@@ -766,6 +875,52 @@ + } + }; + ++static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties = { ++ .caps = DVB_USB_IS_AN_I2C_ADAPTER, ++ ++ .usb_ctrl = CYPRESS_FX2, ++ ++ .size_of_priv = sizeof(struct cxusb_state), ++ ++ .num_adapters = 1, ++ .adapter = { ++ { ++ .streaming_ctrl = cxusb_streaming_ctrl, ++ .frontend_attach = cxusb_dualdig4_frontend_attach, ++ .tuner_attach = cxusb_xc3028_tuner_attach, ++ /* parameter for the MPEG2-data transfer */ ++ .stream = { ++ .type = USB_BULK, ++ .count = 5, ++ .endpoint = 0x02, ++ .u = { ++ .bulk = { ++ .buffersize = 8192, ++ } ++ } ++ }, ++ }, ++ }, ++ ++ .power_ctrl = cxusb_bluebird_power_ctrl, ++ ++ .i2c_algo = &cxusb_i2c_algo, ++ ++ .generic_bulk_ctrl_endpoint = 0x01, ++ ++ .num_device_descs = 2, ++ .devices = { ++ { "DViCO FusionHDTV DVB-T Dual Digital 4", ++ { NULL }, ++ { &cxusb_table[13], NULL }, ++ }, ++ { "DViCO FusionHDTV DVB-T NANO2", ++ { NULL }, ++ { &cxusb_table[14], NULL }, ++ }, ++ } ++}; ++ + static struct usb_driver cxusb_driver = { + #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) + .owner = THIS_MODULE, +--- v4l-dvb.orig/linux/drivers/media/dvb/dvb-usb/cxusb.h ++++ v4l-dvb/linux/drivers/media/dvb/dvb-usb/cxusb.h +@@ -28,6 +28,8 @@ + #define CMD_ANALOG 0x50 + #define CMD_DIGITAL 0x51 + ++#define CMD_BLUEBIRD_GPIO_WRITE 0x05 ++ + struct cxusb_state { + u8 gpio_write_state[3]; + }; +--- v4l-dvb.orig/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h ++++ v4l-dvb/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h +@@ -142,6 +142,8 @@ + #define USB_PID_DVICO_BLUEBIRD_DUAL_1_WARM 0xdb51 + #define USB_PID_DVICO_BLUEBIRD_DUAL_2_COLD 0xdb58 + #define USB_PID_DVICO_BLUEBIRD_DUAL_2_WARM 0xdb59 ++#define USB_PID_DVICO_BLUEBIRD_DUAL_4 0xdb78 ++#define USB_PID_DVICO_BLUEBIRD_DVBT_NANO_2 0xdb70 + #define USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_COLD 0xdb54 + #define USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_WARM 0xdb55 + #define USB_PID_MEDION_MD95700 0x0932 +--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/Kconfig ++++ v4l-dvb/linux/drivers/media/dvb/frontends/Kconfig +@@ -353,6 +353,13 @@ + This device is only used inside a SiP called togther with a + demodulator for now. + ++config DVB_XC3028 ++ tristate "Xceive XC3028 silicon tuner" ++ depends on I2C ++ default m if DVB_FE_CUSTOMISE ++ help ++ A driver for the silicon tuner XC3028 from Xceive. ++ + comment "Miscellaneous devices" + depends on DVB_CORE + +--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/Makefile ++++ v4l-dvb/linux/drivers/media/dvb/frontends/Makefile +@@ -4,6 +4,7 @@ + + EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ + ++obj-$(CONFIG_DVB_XC3028) += xc3028-fe.o + obj-$(CONFIG_DVB_PLL) += dvb-pll.o + obj-$(CONFIG_DVB_STV0299) += stv0299.o + obj-$(CONFIG_DVB_SP8870) += sp8870.o +--- /dev/null ++++ v4l-dvb/linux/drivers/media/dvb/frontends/xc3028-fe.c +@@ -0,0 +1,532 @@ ++/* ++ ++ Xceive - xc3028 tuner interface (Firmware 2.7) ++ ++ Copyright (c) 2007 Michael Krufky <mkrufky@linuxtv.org> ++ Copyright (c) 2006 Markus Rechberger <mrechberger@gmail.com> ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++*/ ++ ++#include <linux/i2c.h> ++#include "compat.h" ++#include <linux/firmware.h> ++#include <linux/delay.h> ++#include <media/tuner.h> ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) ++#include "i2c-compat.h" ++#endif ++#include "dvb_frontend.h" ++#include "xc3028.h" ++ ++ ++struct xc3028_priv { ++ u8 tuning_code[12]; ++ enum v4l2_tuner_type type; ++ v4l2_std_id std; ++ // unsigned int mode; ++ ++ struct xc3028_config *cfg; ++ ++ struct i2c_adapter *i2c_adap; ++ u32 frequency; ++ int bandwidth; ++}; ++ ++MODULE_DESCRIPTION("Xceive xc3028 dvb frontend driver"); ++MODULE_AUTHOR("Michael Krufky <mkrufky@linuxtv.org>"); ++MODULE_AUTHOR("Markus Rechberger <mrechberger@gmail.com>"); ++MODULE_LICENSE("GPL"); ++ ++ ++/* hack */ ++#define V4L2_TUNER_DVBT_TV 19 ++#define V4L2_TUNER_DVBC_TV 29 ++#define V4L2_TUNER_ATSC_TV 39 ++ ++/* firmware functions */ ++#define XC3028_BYTECODE 0 ++#define XC3028_RESET 1 ++#define XC3028_SLEEP 2 ++ ++#define XC3028_BW8MHZ 0 ++#define XC3028_BW7MHZ 1 ++#define XC3028_BW6MHZ 2 ++#define XC3028_ATSC_BW6MHZ 3 ++#define XC3028_RADIO 4 ++ ++ ++#define XC3028_ANALOGUE_FW "xc3028_init0.i2c.fw" ++#define XC3028_DIGITAL_FW "xc3028_8MHz_init0.i2c.fw" ++#define XC3028_RADIO_FW "xc3028_FM_init0.i2c.fw" ++#define XC3028_SPECIFIC_RADIO_FW "xc3028_specific_radio.fw" ++ ++#define TUNING_GRANULARITY 15625 ++ ++static int firmware_loader(struct dvb_frontend *fe, const struct firmware *fw); ++static int upload_firmware(struct dvb_frontend *fe); ++static int xc3028_set_mode(struct dvb_frontend *fe, enum v4l2_tuner_type type); ++ ++static struct _analogue_standards{ ++ v4l2_std_id standard; ++ u8 filename[50]; ++} xc3028_standards[]={ ++ {V4L2_STD_PAL_BG,"xc3028_BG_PAL_A2_A.i2c.fw"}, ++ {V4L2_STD_PAL_I,"xc3028_I_PAL_NICAM.i2c.fw"}, ++ {V4L2_STD_PAL_DK,"xc3028_DK_PAL_A2.i2c.fw"}, ++ {V4L2_STD_MN,"xc3028_MN_NTSCPAL_A2.i2c.fw"}, ++ {V4L2_STD_PAL, "xc3028_BG_PAL_A2_A.i2c.fw"}, ++ ++ {V4L2_STD_SECAM_DK,"xc3028_DK_SECAM_A2_DK1.i2c.fw"}, ++ {V4L2_STD_SECAM_L,"xc3028_L_SECAM_NICAM.i2c.fw"}, ++ {V4L2_STD_SECAM_LC,"xc3028_L'_SECAM_NICAM.i2c.fw"}, ++ {V4L2_STD_SECAM_K1,"xc3028_DK_SECAM_A2_DK1.i2c.fw"}, ++}; ++ ++/* TODO: add the other standards here ++ The linux DVB framework sends us following values ++ from 0..2 to set up the correct channel bandwidth ++ ++ 0 ... 8 mhz ++ 1 ... 7 mhz ++ 2 ... 6 mhz ++ ++ we do not have any settings for 6MHz at least I haven't found one, ++ feel free to complete this list ++ ++ */ ++ ++static struct _digital_standards{ ++ unsigned int dvb:1; ++ unsigned int atsc:1; ++ int bandwidth; ++ char filename[50]; ++} xc3028_dtv_standards[]={ ++ {1, 0, XC3028_BW8MHZ /* 8mhz */, "xc3028_DTV8_2633.i2c.fw" }, ++ {1, 0, XC3028_BW7MHZ /* 7mhz */, "xc3028_DTV7_2633.i2c.fw" }, ++ /* 2 6mhz */ ++ {0, 1, 0 /* ???? */, "xc3028_DTV6_ATSC_2620.i2c.fw"}, ++ {0, 1, 1 /* ???? */, "xc3028_DTV6_ATSC_2620.i2c.fw"}, ++ {0, 1, XC3028_ATSC_BW6MHZ, "xc3028_DTV6_ATSC_2620.i2c.fw"}, ++}; ++ ++/* ---------------------------------------------------------------------- */ ++#define XC3028_I2C_ADDR 0x61 ++ ++static int xc3028_i2c_xfer(struct i2c_adapter* adap, char *buf, int len) ++{ ++ int ret; ++ struct i2c_msg msg = { .addr = XC3028_I2C_ADDR, .flags = 0, ++ .buf = buf, .len = len }; ++ ++ ret = i2c_transfer(adap, &msg, 1); ++ ++ /* If everything went ok (i.e. 1 msg transmitted), return #bytes ++ transmitted, else error code. */ ++ return (ret == 1) ? len : ret; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++static int xc3028_set_params(struct dvb_frontend *fe, ++ struct dvb_frontend_parameters *params) ++{ ++ struct xc3028_priv *priv = fe->tuner_priv; ++ const struct firmware *fw = NULL; ++ unsigned char chanbuf[4]; ++ unsigned long frequency=0; ++ unsigned long value; ++ int bandwidth; ++ int i; ++ enum v4l2_tuner_type type; ++ ++ if (fe->ops.info.type == FE_ATSC) { ++ type = V4L2_TUNER_ATSC_TV; ++ } else { // if (fe->ops.info.type == FE_OFDM) ++ type = V4L2_TUNER_DVBT_TV; ++ } ++ ++ xc3028_set_mode(fe, type); ++ ++ if (priv->type == V4L2_TUNER_ATSC_TV) { ++ bandwidth = XC3028_ATSC_BW6MHZ; ++ } else { ++ bandwidth = params->u.ofdm.bandwidth; ++ } ++ ++ if (priv->bandwidth != bandwidth) { ++ switch(bandwidth) { ++ case -1: ++ /* analogue */ ++ priv->bandwidth = bandwidth; ++ break; ++ case XC3028_ATSC_BW6MHZ: ++ for (i = 0; i < ARRAY_SIZE(xc3028_dtv_standards); i++) { ++ if (xc3028_dtv_standards[i].bandwidth == XC3028_ATSC_BW6MHZ) { ++ printk("Loading 6MHz Bandwidth settings: %s\n",xc3028_dtv_standards[i].filename); ++ if (request_firmware(&fw, xc3028_dtv_standards[i].filename, &priv->i2c_adap->dev) == 0) { ++ if (firmware_loader(fe,fw) != 0) { ++ release_firmware(fw); ++ printk("xc3028-tuner.c: error uploading firmware!\n"); ++ return -EINVAL; ++ } ++ release_firmware(fw); ++ break; ++ } else ++ printk("Loading firmware from file failed!\n"); ++ } ++ } ++ priv->bandwidth = bandwidth; ++ break; ++ case XC3028_BW8MHZ: /* 8 MHz */ ++ for (i = 0; i < ARRAY_SIZE(xc3028_dtv_standards); i++) { ++ if (xc3028_dtv_standards[i].bandwidth == XC3028_BW8MHZ) { ++ printk("Loading 8MHz Bandwidth settings: %s\n",xc3028_dtv_standards[i].filename); ++ if (request_firmware(&fw, xc3028_dtv_standards[i].filename, &priv->i2c_adap->dev) == 0) { ++ if (firmware_loader(fe,fw) != 0) { ++ release_firmware(fw); ++ printk("xc3028-tuner.c: error uploading firmware!\n"); ++ return -EINVAL; ++ } ++ release_firmware(fw); ++ break; ++ } else ++ printk("Loading firmware from file failed!\n"); ++ } ++ } ++ priv->bandwidth = bandwidth; ++ break; ++ case XC3028_BW7MHZ: /* 7 MHz */ ++ for (i = 0; i < ARRAY_SIZE(xc3028_dtv_standards); i++) { ++ if (xc3028_dtv_standards[i].bandwidth == XC3028_BW7MHZ) { ++ printk("Loading 7MHz Bandwidth settings: %s\n",xc3028_dtv_standards[i].filename); ++ if (request_firmware(&fw, xc3028_dtv_standards[i].filename, &priv->i2c_adap->dev) == 0) { ++ if (firmware_loader(fe,fw) != 0) { ++ release_firmware(fw); ++ printk("xc3028-tuner.c: error uploading firmware!\n"); ++ return -EINVAL; ++ } ++ release_firmware(fw); ++ break; ++ } else ++ printk("Loading firmware from file failed!\n"); ++ } ++ } ++ priv->bandwidth = bandwidth; ++ break; ++ default: ++ printk("xc3028-tuner.c: sorry [%d] bandwidth isn't supported (please report)\n",bandwidth); ++ } ++ } ++ /* TODO: 7 MHz (1) has the same offset as 8 MHz -- this depends on the used firmware */ ++#if 0 ++ if(t->mode == V4L2_TUNER_RADIO){ ++ frequency=(unsigned long long)f->frequency*1000/16; ++ } else { } ++#endif ++ switch(bandwidth) { ++ case XC3028_BW8MHZ: ++ case XC3028_BW7MHZ: ++ frequency=(unsigned long long)params->frequency-2750000; ++ break; ++ case XC3028_BW6MHZ: ++ case XC3028_ATSC_BW6MHZ: ++ frequency=(unsigned long long)params->frequency-1750000; ++ break; ++ default: ++ frequency=(unsigned long long)params->frequency; ++ } ++ ++ value=(frequency+(TUNING_GRANULARITY/2))/TUNING_GRANULARITY; ++ chanbuf[0]=0; ++ chanbuf[1]=0; ++ chanbuf[2]=(value&0xff00)>>8; ++ chanbuf[3]=value&0x00ff; ++ ++#if 0 ++ /* seems like it's not needed! */ ++ rc=i2c_master_send(c,"\xa0\x00\x00\x00",4); ++ if(priv && priv->tuning_code) ++ i2c_master_send(c,priv->tuning_code,12); ++ else ++ printk("ERROR: *** NO TUNING CODE SET **\n"); ++ i2c_master_send(c,"\x00\x8c",2); ++#endif ++ xc3028_i2c_xfer(priv->i2c_adap,"\x80\x02\x00\x00",4); ++ xc3028_i2c_xfer(priv->i2c_adap,chanbuf,4); ++ return 0; ++} ++ ++static int firmware_loader(struct dvb_frontend *fe, const struct firmware *fw) ++{ ++ int txtlen=0; ++ int current_ptr=0; ++ int version; ++ int function; ++ int x; ++ struct xc3028_priv *priv = fe->tuner_priv; ++ ++ if (fw->size == 0) ++ return -EINVAL; ++ ++ version = fw->data[current_ptr++]; ++ ++ switch (version) { ++ case 1: ++ while (current_ptr < fw->size) { ++ function = fw->data[current_ptr++]; ++ switch (function) { ++ case XC3028_BYTECODE: ++ txtlen = fw->data[current_ptr++]; ++ if ((current_ptr + txtlen) > fw->size) ++ return -EINVAL; ++ if (fw->data[current_ptr]==0x1e && txtlen == 12){ ++ memcpy(priv->tuning_code, &fw->data[current_ptr], 12); ++ } ++ if (txtlen != xc3028_i2c_xfer(priv->i2c_adap,&fw->data[current_ptr],txtlen)) { ++ printk("failed: %02x| ",txtlen); ++ for(x=0; x < txtlen; x++) { ++ printk("%02x ",(unsigned char)fw->data[current_ptr+x]); ++ } ++ printk("\n"); ++ } ++ ++ current_ptr += txtlen; ++ break; ++ case XC3028_RESET: ++ x = fw->data[current_ptr++]; ++ ++ if ((priv->cfg) && (priv->cfg->gpio_reset)) ++ priv->cfg->gpio_reset(fe,x); ++ else ++ printk("XC3028: NO GPIO CALLBACK FUNCTION PROVIDED - SWITCHING MODES WON'T WORK (GPIO FW ARG: %d)!\n",x); ++ break; ++ case XC3028_SLEEP: ++ msleep(fw->data[current_ptr++]); ++ break; ++ default: ++ printk("xc3028-tuner.c: error while loading firmware!\n"); ++ return -EINVAL; ++ } ++ } ++ break; ++ default: ++ printk("xc3028-tuner.c: Firmware Loader: Unknown firmware version (%d)\n",version); ++ return -EINVAL; ++ } ++ return 0; ++} ++ ++static int upload_firmware(struct dvb_frontend *fe) { ++ struct xc3028_priv *priv = fe->tuner_priv; ++ const struct firmware *fw = NULL; ++ int i; ++ ++ switch (priv->type) { ++ case V4L2_TUNER_ANALOG_TV: ++ printk("Loading base firmware: %s\n", XC3028_ANALOGUE_FW); ++ if (request_firmware(&fw, XC3028_ANALOGUE_FW, &priv->i2c_adap->dev) == 0) { ++ firmware_loader(fe,fw); ++ release_firmware(fw); ++ } else { ++ printk("xc3028-tuner.c: Unable to load firmware\n"); ++ printk("xc3028-tuner.c: ** PLEASE HAVE A LOOK AT **\n"); ++ printk("xc3028-tuner.c: http://linuxtv.org/v4lwiki/index.php/Talk:Em2880#Firmware\n"); ++ return -EINVAL; ++ } ++ for (i = 0; i < ARRAY_SIZE(xc3028_standards); i++) { ++ if (xc3028_standards[i].standard & priv->std) { ++ printk("%s, Loading specific analogue TV settings: %s\n",__FUNCTION__, xc3028_standards[i].filename); ++ if (request_firmware(&fw, xc3028_standards[i].filename, &priv->i2c_adap->dev) == 0){ ++ if(firmware_loader(fe,fw)==0){ ++ release_firmware(fw); ++ return 0; ++ } ++ release_firmware(fw); ++ } else { ++ printk("Loading configuration from file failed!\n"); ++ } ++ break; ++ } ++ } ++ printk("Loading default analogue TV settings: %s\n",xc3028_standards[0].filename); ++ priv->std=xc3028_standards[0].standard; ++ if (request_firmware(&fw, xc3028_standards[0].filename, &priv->i2c_adap->dev) == 0) { ++ if (firmware_loader(fe,fw) == 0) { ++ release_firmware(fw); ++ return 0; ++ } ++ release_firmware(fw); ++ } ++ printk("xc3028-tuner.c: error loading firmware (analogue TV)! (please report -> mrechberger@gmail.com)\n"); ++ break; ++ case V4L2_TUNER_DVBT_TV: ++ case V4L2_TUNER_DVBC_TV: ++ case V4L2_TUNER_ATSC_TV: ++ printk("Loading base firmware: %s\n", XC3028_DIGITAL_FW); ++ /* reset analog standard */ ++ priv->std = 0; ++ if (request_firmware(&fw, XC3028_DIGITAL_FW, &priv->i2c_adap->dev) == 0) { ++ firmware_loader(fe,fw); ++ release_firmware(fw); ++ } else { ++ printk("xc3028-tuner.c: Unable to load firmware\n"); ++ printk("xc3028-tuner.c: ** PLEASE HAVE A LOOK AT **\n"); ++ printk("xc3028-tuner.c: http://linuxtv.org/v4lwiki/index.php/Talk:Em2880#Firmware\n"); ++ return -EINVAL; ++ } ++ for( i = 0; i < ARRAY_SIZE(xc3028_dtv_standards); i++) { ++ if ((xc3028_dtv_standards[i].dvb==1 && ++ xc3028_dtv_standards[i].bandwidth == priv->bandwidth) || ++ (priv->type == V4L2_TUNER_ATSC_TV && ++ xc3028_dtv_standards[i].atsc == 1)) { ++ printk("Loading specific dtv settings: %s\n",xc3028_dtv_standards[i].filename); ++ if (request_firmware(&fw, xc3028_dtv_standards[i].filename, &priv->i2c_adap->dev) == 0) { ++ if (firmware_loader(fe,fw) == 0) { ++ release_firmware(fw); ++ return 0; ++ } ++ release_firmware(fw); ++ } ++ } ++ i++; ++ } ++ ++ /* this gets accessed if a switchover occures, t->bandwidth will be set to -1 */ ++ printk("Loading default dtv settings: %s\n",xc3028_dtv_standards[0].filename); ++ priv->bandwidth = xc3028_dtv_standards[0].bandwidth; ++ if (request_firmware(&fw, xc3028_dtv_standards[0].filename, &priv->i2c_adap->dev) == 0) { ++ if (firmware_loader(fe,fw) == 0) { ++ release_firmware(fw); ++ return 0; ++ } ++ release_firmware(fw); ++ } ++ printk("xc3028-tuner.c: error loading firmware (analogue TV)! (please report -> mrechberger@gmail.com)\n"); ++ break; ++ case V4L2_TUNER_RADIO: ++ printk("Loading base firmware: %s\n", XC3028_RADIO_FW); ++ if (request_firmware(&fw, XC3028_RADIO_FW, &priv->i2c_adap->dev) == 0) { ++ firmware_loader(fe,fw); ++ release_firmware(fw); ++ } else { ++ printk("xc3028-tuner.c: Unable to load (radio) firmware\n"); ++ printk("xc3028-tuner.c: ** PLEASE HAVE A LOOK AT **\n"); ++ printk("xc3028-tuner.c: http://linuxtv.org/v4lwiki/index.php/Talk:Em2880#Firmware\n"); ++ return -EINVAL; ++ } ++ printk("%s, Loading specific radio firmware: %s\n",__FUNCTION__, XC3028_SPECIFIC_RADIO_FW); ++ if (request_firmware(&fw, XC3028_SPECIFIC_RADIO_FW, &priv->i2c_adap->dev) == 0) { ++ if (firmware_loader(fe,fw) == 0) { ++ release_firmware(fw); ++ return 0; ++ } ++ release_firmware(fw); ++ } else { ++ printk("Loading configuration from file failed!\n"); ++ } ++ return 0; ++ default: ++ printk("ERROR TUNER TYPE NOT SUPPORTED (%d)\n",priv->type); ++ return -EINVAL; ++ } ++ ++ printk("xc3028-tuner.c: *********************************************************\n"); ++ printk("xc3028-tuner.c: no firmware uploaded\n" ); ++ printk("xc3028-tuner.c: ** please have a look at: **\n"); ++ printk("xc3028-tuner.c: http://linuxtv.org/v4lwiki/index.php/Talk:Em2880#Firmware\n"); ++ printk("xc3028-tuner.c: *********************************************************\n"); ++ ++ return -EINVAL; ++} ++ ++static int xc3028_set_mode(struct dvb_frontend *fe, enum v4l2_tuner_type type) ++{ ++ struct xc3028_priv *priv = fe->tuner_priv; ++ ++ priv->type = type; ++ ++ upload_firmware(fe); ++ ++ if (priv->cfg && priv->cfg->gpio_reset && (priv->type == V4L2_TUNER_DVBT_TV || ++ priv->type == V4L2_TUNER_DVBC_TV || ++ priv->type == V4L2_TUNER_ATSC_TV )) { ++ printk("xc3028-tuner.c: sending extra call for DVB-T\n"); ++ priv->cfg->gpio_reset(fe,2); ++ } ++ ++ return 0; ++} ++ ++/* dvb tuner api */ ++static int xc3028_release(struct dvb_frontend *fe) ++{ ++ kfree(fe->tuner_priv); ++ fe->tuner_priv = NULL; ++ return 0; ++} ++ ++static int xc3028_get_frequency(struct dvb_frontend *fe, u32 *frequency) ++{ ++ struct xc3028_priv *priv = fe->tuner_priv; ++ ++ *frequency = priv->frequency*1000/16*1000; ++ return 0; ++} ++ ++static int xc3028_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) ++{ ++ struct xc3028_priv *priv = fe->tuner_priv; ++ ++ *bandwidth = priv->bandwidth; ++ return 0; ++} ++ ++static const struct dvb_tuner_ops xc3028_tuner_ops = { ++ .info = { ++ .name = "Xceive XC3028", ++#if 0 ++ .frequency_min = , ++ .frequency_max = ++#endif ++ }, ++ .release = xc3028_release, ++ .set_params = xc3028_set_params, ++ .get_frequency = xc3028_get_frequency, ++ .get_bandwidth = xc3028_get_bandwidth, ++}; ++ ++struct dvb_frontend *xc3028_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct xc3028_config *cfg) ++{ ++ struct xc3028_priv *priv = kzalloc(sizeof(struct xc3028_priv),GFP_KERNEL); ++ ++ priv->i2c_adap = i2c; ++ priv->bandwidth=XC3028_BW8MHZ; ++ priv->cfg = cfg; ++ ++ memcpy(&fe->ops.tuner_ops, &xc3028_tuner_ops, sizeof(struct dvb_tuner_ops)); ++ fe->tuner_priv = priv; ++ return fe; ++} ++EXPORT_SYMBOL(xc3028_attach); ++ ++/* ++ * Overrides for Emacs so that we follow Linus's tabbing style. ++ * --------------------------------------------------------------------------- ++ * Local variables: ++ * c-basic-offset: 8 ++ * End: ++ */ +--- /dev/null ++++ v4l-dvb/linux/drivers/media/dvb/frontends/xc3028.h +@@ -0,0 +1,56 @@ ++ /* ++ Header for Xceive Silicon tuners ++ ++ (c) 2007 Michael Krufky ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++ */ ++ ++#ifndef __DVB_XC3028_H__ ++#define __DVB_XC3028_H__ ++ ++#include <linux/i2c.h> ++#include "dvb_frontend.h" ++ ++/** ++ * Attach a xc3028 tuner to the supplied frontend structure. ++ * ++ * @param fe Frontend to attach to. ++ * @param i2c i2c adapter to use. ++ * @param cfg config struct with gpio reset callback. ++ * @return FE pointer on success, NULL on failure. ++ */ ++ ++struct xc3028_config { ++ int (*gpio_reset) (struct dvb_frontend *fe, int ptr); ++}; ++ ++#if defined(CONFIG_DVB_XC3028) || (defined(CONFIG_DVB_XC3028_MODULE) && defined(MODULE)) ++extern struct dvb_frontend* xc3028_attach(struct dvb_frontend *fe, ++ struct i2c_adapter *i2c, ++ struct xc3028_config *cfg); ++#else ++static inline struct dvb_frontend* xc3028_attach(struct dvb_frontend *fe, ++ struct i2c_adapter *i2c, ++ struct xc3028_config *cfg) ++{ ++ printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__); ++ return NULL; ++} ++#endif // CONFIG_DVB_XC3028 ++ ++#endif // __DVB_XC3028_H__ +--- v4l-dvb.orig/v4l/versions.txt ++++ v4l-dvb/v4l/versions.txt +@@ -228,3 +228,4 @@ + USB_ZC0301 + USB_ET61X251 + USB_ZR364XX ++DVB_XC3028 |