gatos-cvs Mailing List for GATOS
Status: Beta
Brought to you by:
volodya
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(35) |
Feb
(67) |
Mar
(41) |
Apr
(4) |
May
(7) |
Jun
(9) |
Jul
(7) |
Aug
(2) |
Sep
(9) |
Oct
(3) |
Nov
(5) |
Dec
(30) |
2004 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
(6) |
Jul
(8) |
Aug
(3) |
Sep
(5) |
Oct
(15) |
Nov
(25) |
Dec
(14) |
2005 |
Jan
(11) |
Feb
(5) |
Mar
(8) |
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
(3) |
Dec
|
2006 |
Jan
(2) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(2) |
2007 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Receive n. of C. c. <gat...@li...> - 2008-12-21 22:16:37
|
Update of /cvsroot/gatos/v4l2 In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14218 Modified Files: Makefile generic.c generic.h Log Message: Should compile on 2.6.27 now Index: generic.h =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- generic.h 30 Mar 2008 13:21:01 -0000 1.12 +++ generic.h 21 Dec 2008 21:35:13 -0000 1.13 @@ -43,6 +43,9 @@ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) #include <media/v4l2-common.h> #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) +#include <media/v4l2-ioctl.h> +#endif #define GENERIC_VERSION_CODE KERNEL_VERSION(0,0,1) #define MAX_CARDS 10 #ifdef dprintk Index: generic.c =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- generic.c 30 Mar 2008 13:21:00 -0000 1.22 +++ generic.c 21 Dec 2008 21:35:13 -0000 1.23 @@ -262,7 +262,6 @@ /* for each file operation assign a function to handle them */ static struct file_operations generic_fops = { - owner: THIS_MODULE, llseek: no_llseek, /* cant seek on a capture card */ read: generic_read, write: generic_write, @@ -271,27 +270,34 @@ open: generic_open, release: generic_release, poll: generic_poll, +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) + owner: THIS_MODULE, +#endif }; /* defaults for setting up a cards video4linux capture device */ static struct video_device generic_video_template = { - owner: THIS_MODULE, name: "UNSET", - type: VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY| - VID_TYPE_CLIPPING|VID_TYPE_SCALES, fops: &generic_fops, /* file operations table above */ release: video_device_release, minor: -1, +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) + owner: THIS_MODULE, + type: VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY| + VID_TYPE_CLIPPING|VID_TYPE_SCALES, +#endif }; /* defaults for boards that support closed captioning interface */ static struct video_device generic_vbi_template = { name: "generic vbi", - type: VID_TYPE_TUNER|VID_TYPE_TELETEXT, fops: &generic_fops, /* file operations table above */ minor: -1, +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) + type: VID_TYPE_TUNER|VID_TYPE_TELETEXT, +#endif }; /* list properties of different card models here @@ -2842,7 +2848,7 @@ return NULL; *vfd = *template; vfd->minor = -1; - vfd->dev = &card->dev->dev; + //vfd->dev = &card->dev->dev; vfd->release = video_device_release; snprintf (vfd->name, sizeof(vfd->name), "genericv4l rev %d",card->revision); Index: Makefile =================================================================== RCS file: /cvsroot/gatos/v4l2/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- Makefile 11 Jan 2005 21:11:05 -0000 1.1.1.1 +++ Makefile 21 Dec 2008 21:35:13 -0000 1.2 @@ -1,3 +1,3 @@ -KERNEL := $(shell uname -r | cut -c0-3) +KERNEL := $(shell uname -r | cut -c1-3) include $(PWD)/Makefile_$(KERNEL) |
From: Receive n. of C. c. <gat...@li...> - 2008-03-30 13:21:10
|
Update of /cvsroot/gatos/v4l2 In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv6157 Modified Files: board.c generic.c generic.h Log Message: should compile on newer kernels Index: generic.c =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- generic.c 9 Jun 2007 12:08:24 -0000 1.21 +++ generic.c 30 Mar 2008 13:21:00 -0000 1.22 @@ -280,7 +280,6 @@ name: "UNSET", type: VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY| VID_TYPE_CLIPPING|VID_TYPE_SCALES, - hardware: VID_HARDWARE_BT848, /* look in videodev.h for a list NONE IN THERE FOR bt829 */ fops: &generic_fops, /* file operations table above */ release: video_device_release, minor: -1, @@ -291,7 +290,6 @@ { name: "generic vbi", type: VID_TYPE_TUNER|VID_TYPE_TELETEXT, - hardware: VID_HARDWARE_BT848, /* look in videodev.h for a list */ fops: &generic_fops, /* file operations table above */ minor: -1, }; @@ -1351,7 +1349,7 @@ void grab_frame(GENERIC_CARD *card) { DMA_BM_TABLE *ptr = NULL; - int stall = 0; + int ret; /* lock the capture semaphore *use this to make sure everything is finished before disabling interrupts when disable_capture is called */ @@ -1364,12 +1362,11 @@ } // now wait for the video data (one of the frames) - wait_event_interruptible(generic_wait, (card->status & STATUS_BUF0_READY) || (card->status & STATUS_BUF1_READY) || (stall++ > 10)); - if (stall > 10){ - printk (KERN_INFO "STALLED!!!!! aborting framegrab\n"); - up(&card->lockcap); - return; - } + ret = wait_event_interruptible_timeout (generic_wait, (card->status & STATUS_BUF0_READY) || (card->status & STATUS_BUF1_READY), HZ * 1000); + + if (ret == 0) { + printk ("Timed out waiting for frame\n"); + } // there are two dma tables, one for buf0 one for buf1 // they are rebuilt when the capture size changes @@ -1402,9 +1399,10 @@ //wait for dma to finish /* this should transfer the vbi information as well */ - stall=0; - wait_event_interruptible(generic_wait, (card->status & STATUS_DMABUF_READY) - || (stall++ > 10)); + ret = wait_event_interruptible_timeout(generic_wait, (card->status & STATUS_DMABUF_READY), HZ * 1000); + if (ret == 0) { + printk ("Timed out sending frame\n"); + } card->status &= ~STATUS_DMABUF_READY; // release the lock so we can transfer data again @@ -1419,6 +1417,7 @@ int grab_vbi(GENERIC_CARD *card) { int whichfield; + int ret; /* lockvbi is used to track when vbi capture is in use so we can wait till its done before disabling capture */ down_interruptible(&card->lockvbi); @@ -1429,7 +1428,10 @@ return -1; } - wait_event_interruptible(generic_wait, (card->status & STATUS_VBI_READY)); + ret = wait_event_interruptible_timeout(generic_wait, (card->status & STATUS_VBI_READY), HZ * 1000); + if (ret == 0) { + printk ("Timed out waiting for vbi\n"); + } card->status &= ~STATUS_VBI_READY; down_interruptible(&card->lock); @@ -1444,7 +1446,10 @@ FRAME_BUFFER_TO_SYSTEM; } - wait_event_interruptible(generic_wait, (card->status & STATUS_DMABUF_READY)); + ret = wait_event_interruptible_timeout(generic_wait, (card->status & STATUS_DMABUF_READY), HZ * 1000); + if (ret == 0) { + printk ("Timed out waiting for vbi\n"); + } card->status &= ~STATUS_DMABUF_READY; } up(&card->lock); @@ -3011,7 +3016,7 @@ /* send all irq request for this card to generic_irq_handler */ int register_irq_handler(GENERIC_CARD *card) { - switch ((request_irq(card->dev->irq, generic_irq_handler, SA_SHIRQ, tag, (void *)card))){ + switch ((request_irq(card->dev->irq, generic_irq_handler, IRQF_SHARED, tag, (void *)card))){ case -EINVAL: printk(KERN_ERR "genericv4l(%d): bad irq number or handler\n",card->cardnum); break; Index: generic.h =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- generic.h 13 Jan 2007 22:55:44 -0000 1.11 +++ generic.h 30 Mar 2008 13:21:01 -0000 1.12 @@ -30,6 +30,10 @@ #endif #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) +#define IRQF_SHARED SA_SHIRQ +#endif + #include <linux/pci.h> #include <linux/videodev.h> #include <linux/poll.h> Index: board.c =================================================================== RCS file: /cvsroot/gatos/v4l2/board.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- board.c 4 Jul 2005 00:22:20 -0000 1.3 +++ board.c 30 Mar 2008 13:20:48 -0000 1.4 @@ -83,6 +83,7 @@ data[2-i] = 0x8E; //data[2-i] = 0xCE; // MSB -> 1 CP T2 T1 T0 RSA RSB OS <- LSB (see fi1236.pdf) data[3-i] = band ; +dprintk(1,"card(%d) fi12xx_tune called writing to [%d] i=%d d1=%d d2=%d d3=%d d4=%d tvnorm=%d\n",card->cardnum, card->fi12xx.addr,i, data[i], data[i+1], data[2-i], data[3-i],card->tvnorm); i2c_write(card,card->fi12xx.addr,data,sizeof(data)); return 0; } |
From: Receive n. of C. c. <gat...@li...> - 2007-06-12 11:23:26
|
Update of /cvsroot/gatos/ati.2/tvo_set In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv26671/tvo_set Modified Files: Tag: tv_output Imakefile tvo_set.c Log Message: License of tv output driver changed to MIT Index: Imakefile =================================================================== RCS file: /cvsroot/gatos/ati.2/tvo_set/Attic/Imakefile,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- Imakefile 27 Jan 2004 22:55:40 -0000 1.1.2.1 +++ Imakefile 12 Jun 2007 11:23:13 -0000 1.1.2.2 @@ -2,27 +2,31 @@ XCOMM XCOMM Imakefile for tvo_set utility XCOMM -XCOMM Copyright (C) 2004 Federico Ulivi -XCOMM -XCOMM This program is free software; you can redistribute it and/or modify -XCOMM it under the terms of the GNU General Public License as published by -XCOMM the Free Software Foundation; either version 2 of the License, or -XCOMM (at your option) any later version. -XCOMM -XCOMM This program is distributed in the hope that it will be useful, -XCOMM but WITHOUT ANY WARRANTY; without even the implied warranty of -XCOMM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -XCOMM GNU General Public License for more details. -XCOMM -XCOMM You should have received a copy of the GNU General Public License -XCOMM along with this program; if not, write to the Free Software -XCOMM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +XCOMM Copyright (c) 2004-2007 Federico Ulivi +XCOMM +XCOMM Permission is hereby granted, free of charge, to any person obtaining a copy +XCOMM of this software and associated documentation files (the "Software"), to deal +XCOMM in the Software without restriction, including without limitation the rights +XCOMM to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +XCOMM copies of the Software, and to permit persons to whom the Software is +XCOMM furnished to do so, subject to the following conditions: +XCOMM +XCOMM The above copyright notice and this permission notice shall be included in +XCOMM all copies or substantial portions of the Software. +XCOMM +XCOMM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +XCOMM IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +XCOMM FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +XCOMM AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +XCOMM LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +XCOMM OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +XCOMM THE SOFTWARE. XCOMM XCOMM AUTHORS: F.Ulivi XCOMM NOTES: XCOMM $Log$ -XCOMM Revision 1.1.2.1 2004/01/27 22:55:40 fulivi -XCOMM Initial release +XCOMM Revision 1.1.2.2 2007/06/12 11:23:13 fulivi +XCOMM License of tv output driver changed to MIT XCOMM XCOMM Revision 1.1.2.1 2004/01/25 23:07:31 fede XCOMM *** empty log message *** Index: tvo_set.c =================================================================== RCS file: /cvsroot/gatos/ati.2/tvo_set/Attic/tvo_set.c,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- tvo_set.c 27 Jan 2004 22:55:40 -0000 1.1.2.1 +++ tvo_set.c 12 Jun 2007 11:23:13 -0000 1.1.2.2 @@ -6,27 +6,31 @@ * The purpose of this utility is to set various parameters of * tv output module. * - * Copyright (C) 2004 Federico Ulivi - * - * 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. + * Copyright (c) 2004-2007 Federico Ulivi * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. * * AUTHORS: F.Ulivi * NOTES: * $Log$ - * Revision 1.1.2.1 2004/01/27 22:55:40 fulivi - * Initial release + * Revision 1.1.2.2 2007/06/12 11:23:13 fulivi + * License of tv output driver changed to MIT * * Revision 1.1.2.2 2004/01/25 23:07:47 fede * GPL notice added |
From: Receive n. of C. c. <gat...@li...> - 2007-06-12 11:23:25
|
Update of /cvsroot/gatos/ati.2 In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv26671 Modified Files: Tag: tv_output README.tvout theater_out.c theater_out.h Log Message: License of tv output driver changed to MIT Index: README.tvout =================================================================== RCS file: /cvsroot/gatos/ati.2/README.tvout,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- README.tvout 27 Jan 2004 22:50:33 -0000 1.1.2.2 +++ README.tvout 12 Jun 2007 11:23:13 -0000 1.1.2.3 @@ -3,8 +3,9 @@ ** XFree86 driver for TV output on ATI Radeon cards ** ******************************************************* -Copyright (c) 2003-2004, by Federico Ulivi <fu...@ly...> +Copyright (c) 2003-2007, by Federico Ulivi <fu...@ly...> Released under the GNU General Public License, version 2. +Re-released under the MIT license. 1. About this driver -------------------- @@ -16,6 +17,18 @@ 2. Status of the driver ----------------------- +The driver was actively developped by myself until June 2004. From +that moment on I had no more time for this project. Other people +maintained, from time to time, a set of patches to keep the driver +running with more recent XFree86/X.org releases. The initial license +of the tv output driver (GPL v2) prevented the source code to be +fully integrated into X.Org code, though. I'm now (June 2007) +re-releasing the driver with MIT license in the hope that it will +make life easier for those willing to merge this driver into the +official X.Org code. + +** + The driver is in early development stage. It currently works with those cards having a Rage Theater chip for TV output or with cards having the tv module inside the Radeon chip (ERT, Embedded Rage @@ -233,3 +246,8 @@ Support for sizing/positioning of TV image added +2007-06-12 +========== + +Re-released under MIT license + Index: theater_out.h =================================================================== RCS file: /cvsroot/gatos/ati.2/theater_out.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- theater_out.h 27 Jan 2004 22:50:35 -0000 1.1.2.2 +++ theater_out.h 12 Jun 2007 11:23:13 -0000 1.1.2.3 @@ -4,27 +4,31 @@ * * Interface file for theater_out module * - * Copyright (C) 2003 Federico Ulivi - * - * 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. + * Copyright (c) 2003-2007 Federico Ulivi * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. * * AUTHORS: F.Ulivi * NOTES: * $Log$ - * Revision 1.1.2.2 2004/01/27 22:50:35 fulivi - * Support for positioning/sizing of image added + * Revision 1.1.2.3 2007/06/12 11:23:13 fulivi + * License of tv output driver changed to MIT * * Revision 1.1.2.9 2004/01/18 23:01:12 fede * Functions for get/setting h/v pos/size replaced by Index: theater_out.c =================================================================== RCS file: /cvsroot/gatos/ati.2/theater_out.c,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -d -r1.1.2.3 -r1.1.2.4 --- theater_out.c 27 Jan 2004 22:50:35 -0000 1.1.2.3 +++ theater_out.c 12 Jun 2007 11:23:13 -0000 1.1.2.4 @@ -4,25 +4,35 @@ * * Main file for tv output handling of ATI Rage Theater chip * - * Copyright (C) 2003 Federico Ulivi - * - * 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. + * Copyright (c) 2003-2007 Federico Ulivi * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. * * AUTHORS: F.Ulivi * NOTES: * $Log$ + * Revision 1.1.2.4 2007/06/12 11:23:13 fulivi + * License of tv output driver changed to MIT + * + * Revision 1.1.1.1.2.13 2004/06/05 12:48:10 fede + * Provisional support for 640x480 resolution added + * * Revision 1.1.2.3 2004/01/27 22:50:35 fulivi * Support for positioning/sizing of image added * @@ -785,6 +795,121 @@ const ModeConstants availableModes[] = { + { + 640, /* horResolution */ + 480, /* verResolution */ + TV_STD_NTSC, /* standard */ + 803, /* horTotal */ + 600, /* verTotal */ + 652, /* horStart */ + 656, /* horSyncStart */ + 536, /* verSyncStart */ + 407226, /* defRestart */ +/* 408059, /\* defRestart *\/ */ + 0x09009249, /* vScalerCntl1 */ + 0x0000076d, /* yRiseCntl */ + 0x10002492, /* ySawtoothCntl */ + 584, /* crtcPLL_N */ + 91, /* crtcPLL_M */ + FALSE, /* crtcPLL_divBy2 */ + 1, /* crtcPLL_byteClkDiv */ + 6, /* crtcPLL_postDiv */ + TRUE, /* use888RGB */ + 672, /* pixToTV */ + 2, /* byteClkDelay */ + 0x05070503, /* tvoDataDelayA */ + 0x02060505, /* tvoDataDelayB */ + horTimingNTSC_BIOS,/* horTimingTable */ + verTimingNTSC_BIOS /* verTimingTable */ + }, +#if 0 + { + 640, /* horResolution */ + 480, /* verResolution */ + TV_STD_PAL, /* standard */ + 833, /* horTotal */ + 624, /* verTotal */ + 662, /* horStart */ + 672, /* horSyncStart */ + 513, /* verSyncStart */ + 433848, /* defRestart */ + 0x0d007fc4, /* vScalerCntl1 */ + 0x00000c0d, /* yRiseCntl */ + 0x10001ff2, /* ySawtoothCntl */ + 566, /* crtcPLL_N */ + 98, /* crtcPLL_M */ + FALSE, /* crtcPLL_divBy2 */ + 1, /* crtcPLL_byteClkDiv */ + 6, /* crtcPLL_postDiv */ + TRUE, /* use888RGB */ + 488, /* pixToTV */ + 1, /* byteClkDelay */ + 0x0a0b0907, /* tvoDataDelayA */ + 0x060a090a, /* tvoDataDelayB */ + horTimingPAL_BIOS,/* horTimingTable */ + verTimingPAL_BIOS /* verTimingTable */ + }, +#endif +#if 0 + { + 640, /* horResolution */ + 480, /* verResolution */ + TV_STD_PAL, /* standard */ + 818, /* horTotal */ + 607, /* verTotal */ +/* 651, /\* horStart *\/ */ + 640, /* horStart */ + 656, /* horSyncStart */ + 536, /* verSyncStart */ +/* 397830, /\* defRestart *\/ */ + 397830, /* defRestart */ + 0x0d007c50, /* vScalerCntl1 */ + 0x00000ceb, /* yRiseCntl */ + 0x10001f14, /* ySawtoothCntl */ + 651, /* crtcPLL_N */ + 118, /* crtcPLL_M */ + FALSE, /* crtcPLL_divBy2 */ + 1, /* crtcPLL_byteClkDiv */ + 6, /* crtcPLL_postDiv */ + TRUE, /* use888RGB */ + 467, /* pixToTV */ + 0, /* byteClkDelay */ + 0x07080604, /* tvoDataDelayA */ + 0x03070607, /* tvoDataDelayB */ + horTimingPAL_BIOS,/* horTimingTable */ + verTimingPAL_BIOS /* verTimingTable */ + }, +#endif +#if 1 + { + 640, /* horResolution */ + 480, /* verResolution */ + TV_STD_PAL, /* standard */ + 840, /* horTotal */ + 620, /* verTotal */ +/* 630, /\* horStart *\/ */ + 648, /* horStart */ + 656, /* horSyncStart */ + 536, /* verSyncStart */ +/* 416658, /\* defRestart *\/ */ + 424991, /* defRestart */ + 0x0d007efa, /* vScalerCntl1 */ + 0x00000c42, /* yRiseCntl */ + 0x10001fbe, /* ySawtoothCntl */ + 434, /* crtcPLL_N */ + 75, /* crtcPLL_M */ + FALSE, /* crtcPLL_divBy2 */ + 1, /* crtcPLL_byteClkDiv */ + 6, /* crtcPLL_postDiv */ + TRUE, /* use888RGB */ + 489, /* pixToTV */ + 1, /* byteClkDelay */ + 0x04050301, /* tvoDataDelayA */ + 0x00040304, /* tvoDataDelayB */ + horTimingPAL_BIOS,/* horTimingTable */ + verTimingPAL_BIOS /* verTimingTable */ + }, +#endif { 800, /* horResolution */ 600, /* verResolution */ |
From: Receive n. of C. c. <gat...@li...> - 2007-06-09 12:08:27
|
Update of /cvsroot/gatos/v4l2 In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5045 Modified Files: generic.c Log Message: forgot to commit this, updated for irq handler interface changed in 2.6.20 Index: generic.c =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- generic.c 21 Oct 2006 12:27:15 -0000 1.20 +++ generic.c 9 Jun 2007 12:08:24 -0000 1.21 @@ -276,11 +276,13 @@ /* defaults for setting up a cards video4linux capture device */ static struct video_device generic_video_template = { - name: "UNSET", + owner: THIS_MODULE, + name: "UNSET", type: VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY| VID_TYPE_CLIPPING|VID_TYPE_SCALES, hardware: VID_HARDWARE_BT848, /* look in videodev.h for a list NONE IN THERE FOR bt829 */ fops: &generic_fops, /* file operations table above */ + release: video_device_release, minor: -1, }; @@ -2909,7 +2911,11 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) void generic_irq_handler(int irq, void *dev_id, struct pt_regs * regs) #else +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) static irqreturn_t generic_irq_handler(int irq, void *dev_id, struct pt_regs * regs) +#else +static irqreturn_t generic_irq_handler(int irq, void *dev_id) +#endif #endif { GENERIC_CARD *card = (GENERIC_CARD *)dev_id; |
From: Receive n. of C. c. <gat...@li...> - 2007-01-13 23:48:42
|
Update of /cvsroot/gatos/v4l2 In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv11106 Modified Files: generic.h Log Message: adds media/v4l2-common.h for kernel >= 2.6.18 Index: generic.h =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- generic.h 21 Oct 2006 12:27:16 -0000 1.10 +++ generic.h 13 Jan 2007 22:55:44 -0000 1.11 @@ -22,20 +22,23 @@ #include <linux/version.h> #if defined(CONFIG_MODVERSIONS) && ! defined(MODVERSIONS) -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) #include <linux/modversions.h> #else #include <config/modversions.h> -#include <linux/poll.h> -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17) -#include <media/v4l2-dev.h> -#endif #define MODVERSIONS #endif #endif #include <linux/pci.h> #include <linux/videodev.h> +#include <linux/poll.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) +#include <media/v4l2-dev.h> +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) +#include <media/v4l2-common.h> +#endif #define GENERIC_VERSION_CODE KERNEL_VERSION(0,0,1) #define MAX_CARDS 10 #ifdef dprintk |
From: Receive n. of C. c. <gat...@li...> - 2006-12-05 16:28:38
|
Update of /cvsroot/gatos/km In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv9863 Modified Files: km.c Log Message: fix warnings Index: km.c =================================================================== RCS file: /cvsroot/gatos/km/km.c,v retrieving revision 1.110 retrieving revision 1.111 diff -u -d -r1.110 -r1.111 --- km.c 4 Dec 2006 19:45:00 -0000 1.110 +++ km.c 5 Dec 2006 16:28:36 -0000 1.111 @@ -632,7 +632,7 @@ kms->vbi.info_du=-1; spin_lock_init(&(kms->kms_lock)); printk(KERN_DEBUG "km: using irq %ld\n", kms->irq); - printk(KERN_DEBUG "Register aperture is 0x%08lx 0x%08lx\n", pci_resource_start(dev, 2), pci_resource_len(dev, 2)); + printk(KERN_DEBUG "Register aperture is 0x%08llx 0x%08llx\n", (long long)pci_resource_start(dev, 2), (long long)pci_resource_len(dev, 2)); /* if (!request_mem_region(pci_resource_start(dev,2), pci_resource_len(dev,2), @@ -1086,15 +1086,12 @@ printk(KERN_INFO "Kmultimedia module version %s loaded\n", KM_VERSION); printk(KERN_DEBUG "Page size is %ld sizeof(bm_list_descriptor)=%ld sizeof(KM_STRUCT)=%ld\n", PAGE_SIZE, (unsigned long)sizeof(bm_list_descriptor), (unsigned long)sizeof(KM_STRUCT)); num_devices=0; - pci_module_init( &km_pci_driver ); - - return 0; + return pci_module_init( &km_pci_driver ); } void __exit km_cleanup_module(void) { pci_unregister_driver( &km_pci_driver ); - return; } module_init(km_init_module); |
From: Receive n. of C. c. <gat...@li...> - 2006-12-04 19:45:28
|
Update of /cvsroot/gatos/km In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv11243 Modified Files: km.c km_api.c km_api_data.c km_api_data.h km_memory.c km_v4l.c mach64.c radeon.c rage128.c Log Message: Compatibility with kernels > 2.6.17 (patches by Francisco L. Fernandez and huygens): 1) V4L2 headers have changed in 2.6.18 2) #include autoconf.h instead of config.h Index: km_api_data.c =================================================================== RCS file: /cvsroot/gatos/km/km_api_data.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- km_api_data.c 9 Mar 2005 08:40:32 -0000 1.24 +++ km_api_data.c 4 Dec 2006 19:45:00 -0000 1.25 @@ -19,7 +19,6 @@ #include <linux/proc_fs.h> #include <linux/types.h> -#include <linux/config.h> #include <linux/version.h> #include <linux/module.h> #include <linux/kernel.h> @@ -27,6 +26,9 @@ #include <linux/init.h> #include <linux/poll.h> #include <linux/pci.h> +#ifndef LINUX_2_6 +#include <linux/config.h> +#endif #include "km_api_data.h" #include "km_memory.h" Index: km_v4l.c =================================================================== RCS file: /cvsroot/gatos/km/km_v4l.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- km_v4l.c 26 Apr 2005 08:06:58 -0000 1.56 +++ km_v4l.c 4 Dec 2006 19:45:03 -0000 1.57 @@ -14,7 +14,6 @@ #endif #include <linux/types.h> -#include <linux/config.h> #include <linux/version.h> #include <linux/module.h> #include <linux/kernel.h> @@ -22,7 +21,11 @@ #include <linux/init.h> #include <linux/pci.h> #include <linux/interrupt.h> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17) +#include <media/v4l2-dev.h> +#else #include <linux/videodev.h> +#endif #include "km.h" #include "km_memory.h" Index: radeon.c =================================================================== RCS file: /cvsroot/gatos/km/radeon.c,v retrieving revision 1.99 retrieving revision 1.100 diff -u -d -r1.99 -r1.100 --- radeon.c 22 Nov 2004 18:50:06 -0000 1.99 +++ radeon.c 4 Dec 2006 19:45:03 -0000 1.100 @@ -17,7 +17,6 @@ #endif #include <linux/types.h> -#include <linux/config.h> #include <linux/version.h> #include <linux/module.h> #include <linux/kernel.h> @@ -26,6 +25,7 @@ #include <linux/pci.h> #include <linux/interrupt.h> #ifndef LINUX_2_6 +#include <linux/config.h> #include <linux/wrapper.h> #endif #include <linux/videodev.h> Index: km_api_data.h =================================================================== RCS file: /cvsroot/gatos/km/km_api_data.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- km_api_data.h 9 Feb 2003 16:37:02 -0000 1.15 +++ km_api_data.h 4 Dec 2006 19:45:03 -0000 1.16 @@ -9,6 +9,7 @@ #ifndef __KM_DATA_H__ #define __KM_DATA_H__ +#include <linux/poll.h> #include <linux/spinlock.h> Index: mach64.c =================================================================== RCS file: /cvsroot/gatos/km/mach64.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- mach64.c 4 Apr 2005 12:29:59 -0000 1.53 +++ mach64.c 4 Dec 2006 19:45:03 -0000 1.54 @@ -17,7 +17,6 @@ #endif #include <linux/types.h> -#include <linux/config.h> #include <linux/version.h> #include <linux/module.h> #include <linux/kernel.h> @@ -26,6 +25,7 @@ #include <linux/pci.h> #include <linux/interrupt.h> #ifndef LINUX_2_6 +#include <linux/config.h> #include <linux/wrapper.h> #endif #include <linux/videodev.h> Index: rage128.c =================================================================== RCS file: /cvsroot/gatos/km/rage128.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- rage128.c 4 Apr 2005 12:29:59 -0000 1.44 +++ rage128.c 4 Dec 2006 19:45:03 -0000 1.45 @@ -17,7 +17,6 @@ #endif #include <linux/types.h> -#include <linux/config.h> #include <linux/version.h> #include <linux/module.h> #include <linux/kernel.h> @@ -26,6 +25,7 @@ #include <linux/pci.h> #include <linux/interrupt.h> #ifndef LINUX_2_6 +#include <linux/config.h> #include <linux/wrapper.h> #endif #include <linux/videodev.h> Index: km_memory.c =================================================================== RCS file: /cvsroot/gatos/km/km_memory.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- km_memory.c 11 Jan 2004 21:10:23 -0000 1.7 +++ km_memory.c 4 Dec 2006 19:45:03 -0000 1.8 @@ -15,7 +15,6 @@ #endif #include <linux/types.h> -#include <linux/config.h> #include <linux/version.h> #include <linux/module.h> #include <linux/kernel.h> @@ -24,6 +23,7 @@ #include <linux/pci.h> #include <linux/interrupt.h> #ifndef LINUX_2_6 +#include <linux/config.h> #include <linux/wrapper.h> #endif #include <linux/mm.h> Index: km.c =================================================================== RCS file: /cvsroot/gatos/km/km.c,v retrieving revision 1.109 retrieving revision 1.110 diff -u -d -r1.109 -r1.110 --- km.c 3 Jul 2006 17:17:56 -0000 1.109 +++ km.c 4 Dec 2006 19:45:00 -0000 1.110 @@ -20,7 +20,6 @@ #endif #include <linux/types.h> -#include <linux/config.h> #include <linux/version.h> #include <linux/module.h> #include <linux/moduleparam.h> @@ -33,8 +32,11 @@ #ifndef LINUX_2_6 #include <linux/wrapper.h> #endif +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17) +#include <media/v4l2-dev.h> +#else #include <linux/videodev.h> - +#endif #include "km_api.h" #include "km.h" Index: km_api.c =================================================================== RCS file: /cvsroot/gatos/km/km_api.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- km_api.c 16 Dec 2004 14:30:56 -0000 1.43 +++ km_api.c 4 Dec 2006 19:45:00 -0000 1.44 @@ -19,13 +19,15 @@ #include <linux/proc_fs.h> #include <linux/types.h> -#include <linux/config.h> #include <linux/version.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/sched.h> #include <linux/init.h> #include <linux/poll.h> +#ifndef LINUX_2_6 +#include <linux/config.h> +#endif #include "km_api.h" #include "km_api_data.h" @@ -93,7 +95,6 @@ if(kmfpd->br_free+10>=kmfpd->br_size)expand_buffer(kmfpd, 10); kmfpd->br_free+=sprintf(kmfpd->buffer_read+kmfpd->br_free, "+STATUS\n"); - for(i=0;kmd->fields[i].type!=KM_FIELD_TYPE_EOL;i++){ f=&(kmd->fields[i]); switch(f->type){ |
From: Receive n. of C. c. <gat...@li...> - 2006-11-12 20:06:39
|
Update of /cvsroot/gatos/avview In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv19613 Modified Files: README Added Files: lircrc.example Log Message: Add more detailed instructions about LIRC Index: README =================================================================== RCS file: /cvsroot/gatos/avview/README,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- README 9 Nov 2004 16:51:45 -0000 1.20 +++ README 12 Nov 2006 20:06:22 -0000 1.21 @@ -50,8 +50,8 @@ *** Pressed anywhere in AVview *** Control-F toggle fullscreen - Keypad + or - switch favorite channels - Control-Keypad + or - increas/decreases channel number + Keypad + or - switch favorite channels + Control-Keypad + or - increas/decreases channel number Control-i switch between tuner/composite/svideo Keypad * toggle mute Arrow Up/Down switch on-screen controls @@ -76,12 +76,11 @@ *** LIRC CONFIGURATION *** * LIRC (Linux Infrared Remote Control) commands are defined in - file ~/.lircrc, see - <" rel="nofollow">http://www.lirc.org/html/configure.html#lircrc_format> for - description of the file format. Each entry in the file has - prog field telling which application should handle the button - press. For AVview this field is 'avview' (without the - apostrophes). The following commands are recogniced as config + file ~/.lircrc. Each entry in the file consist of at least + button, prog and config fields. Button names can be found + from /etc/lircd/lircd.conf or from graphical utility like KDE + LIRC server. prog field has to be set to 'avview' (without + the apostrophes). The following commands are valid config field values: fullscreen toggle fullscreen mode @@ -101,3 +100,9 @@ channel val select channel val. val is channel name (e.g. E5) channel_number val select channel number val + + See <" rel="nofollow">http://www.lirc.org/html/configure.html> for further + description of the file format and instructions on setting up + LIRC. File lircrc.example contains a config file template + that you can edit and append to ~/.lircrc (you may need to + change the button names). --- NEW FILE: lircrc.example --- begin button = CH+ prog = avview config = next_channel +1 end begin button = CH- prog = avview config = next_channel -1 end begin button = VOL+ prog = avview config = volume 1 repeat = 1 end begin button = VOL- prog = avview config = volume -1 repeat = 1 end begin button = 1 prog = avview config = channel_number 1 end begin button = 2 prog = avview config = channel_number 2 end begin button = 3 prog = avview config = channel_number 3 end begin button = 4 prog = avview config = channel_number 4 end begin button = 5 prog = avview config = channel_number 5 end begin button = 6 prog = avview config = channel_number 6 end begin button = 7 prog = avview config = channel_number 7 end begin button = 8 prog = avview config = channel_number 8 end begin button = 9 prog = avview config = channel_number 9 end begin button = 0 prog = avview config = channel_number 0 end begin button = POWER prog = avview config = exit end |
From: Receive n. of C. c. <gat...@li...> - 2006-10-21 12:27:19
|
Update of /cvsroot/gatos/v4l2 In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv20876 Modified Files: generic.c generic.h Log Message: should compile properly now Index: generic.h =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- generic.h 21 Oct 2006 01:16:10 -0000 1.9 +++ generic.h 21 Oct 2006 12:27:16 -0000 1.10 @@ -19,13 +19,23 @@ #ifndef GENERICV4L_HEADER #define GENERICV4L_HEADER 1 -#include <linux/pci.h> -#include <linux/videodev.h> #include <linux/version.h> -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17) + +#if defined(CONFIG_MODVERSIONS) && ! defined(MODVERSIONS) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) +#include <linux/modversions.h> +#else +#include <config/modversions.h> #include <linux/poll.h> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17) #include <media/v4l2-dev.h> #endif +#define MODVERSIONS +#endif +#endif + +#include <linux/pci.h> +#include <linux/videodev.h> #define GENERIC_VERSION_CODE KERNEL_VERSION(0,0,1) #define MAX_CARDS 10 #ifdef dprintk Index: generic.c =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- generic.c 21 Oct 2006 00:56:57 -0000 1.19 +++ generic.c 21 Oct 2006 12:27:15 -0000 1.20 @@ -23,14 +23,7 @@ */ -#if defined(CONFIG_MODVERSIONS) && ! defined(MODVERSIONS) -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) -#include <linux/modversions.h> -#else -#include <config/modversions.h> -#define MODVERSIONS -#endif -#endif +#include "generic.h" #include <linux/kernel.h> #include <linux/module.h> @@ -38,7 +31,6 @@ #include <linux/interrupt.h> #include <linux/proc_fs.h> -#include "generic.h" #include "i2c.h" #include "bt829.h" #include "board.h" |
From: Receive n. of C. c. <gat...@li...> - 2006-10-21 01:16:12
|
Update of /cvsroot/gatos/v4l2 In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv31224 Modified Files: generic.h Log Message: should work on older kernels as well :) Index: generic.h =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- generic.h 21 Oct 2006 00:56:57 -0000 1.8 +++ generic.h 21 Oct 2006 01:16:10 -0000 1.9 @@ -22,9 +22,10 @@ #include <linux/pci.h> #include <linux/videodev.h> #include <linux/version.h> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17) #include <linux/poll.h> #include <media/v4l2-dev.h> - +#endif #define GENERIC_VERSION_CODE KERNEL_VERSION(0,0,1) #define MAX_CARDS 10 #ifdef dprintk |
From: Receive n. of C. c. <gat...@li...> - 2006-10-21 00:57:00
|
Update of /cvsroot/gatos/v4l2 In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv24121 Modified Files: generic.c generic.h Log Message: fixes to compile on 2.6.18 kernel Index: generic.h =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- generic.h 30 Jul 2006 20:32:46 -0000 1.7 +++ generic.h 21 Oct 2006 00:56:57 -0000 1.8 @@ -22,6 +22,8 @@ #include <linux/pci.h> #include <linux/videodev.h> #include <linux/version.h> +#include <linux/poll.h> +#include <media/v4l2-dev.h> #define GENERIC_VERSION_CODE KERNEL_VERSION(0,0,1) #define MAX_CARDS 10 Index: generic.c =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- generic.c 4 Aug 2006 02:13:01 -0000 1.18 +++ generic.c 21 Oct 2006 00:56:57 -0000 1.19 @@ -24,9 +24,13 @@ */ #if defined(CONFIG_MODVERSIONS) && ! defined(MODVERSIONS) -#include <linux/modversions.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) +#include <linux/modversions.h> +#else +#include <config/modversions.h> #define MODVERSIONS #endif +#endif #include <linux/kernel.h> #include <linux/module.h> @@ -2537,17 +2541,17 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) printk(KERN_INFO "genericv4l(%d): rev %d at %s, irq: %d, latency: %d, atifb: 0x%lx\n", num_cards_detected, card->revision, dev->slot_name, dev->irq, lat, pci_resource_start(dev,0)); #else - printk(KERN_INFO "genericv4l(%d): rev %d at %s, irq: %d, latency: %d, atifb: 0x%lx\n", num_cards_detected, card->revision, pci_name(dev), dev->irq, lat, pci_resource_start(dev,0)); + printk(KERN_INFO "genericv4l(%d): rev %d at %s, irq: %d, latency: %d, atifb: 0x%lx\n", num_cards_detected, card->revision, pci_name(dev), dev->irq, lat, (ulong) pci_resource_start(dev,0)); #endif - printk(KERN_INFO "IO at 0x%08lx 0x%08lx\n", pci_resource_start(dev, 1), pci_resource_end(dev, 1)); - printk(KERN_INFO "mmr at 0x%08lx 0x%08lx\n", pci_resource_start(dev, 2), pci_resource_end(dev, 2)); + printk(KERN_INFO "IO at 0x%08lx 0x%08lx\n", (ulong) pci_resource_start(dev, 1), (ulong) pci_resource_end(dev, 1)); + printk(KERN_INFO "mmr at 0x%08lx 0x%08lx\n", (ulong) pci_resource_start(dev, 2), (ulong) pci_resource_end(dev, 2)); romaddr = pci_resource_start(dev, PCI_ROM_RESOURCE); if (romaddr == 0 || forceromaddr){ romaddr = 0x000C0000; //primary card } - printk(KERN_INFO "bios at 0x%08x 0x%08lx\n", romaddr, pci_resource_end(dev, PCI_ROM_RESOURCE)); + printk(KERN_INFO "bios at 0x%08x 0x%08lx\n", (uint) romaddr, (ulong) pci_resource_end(dev, PCI_ROM_RESOURCE)); /* map the cards framebuffer/capturebuffer/bios to our generic_card struct pci_resource_start(device,number) will give you the starting address of |
From: Receive n. of C. c. <gat...@li...> - 2006-08-07 14:58:07
|
Update of /cvsroot/gatos/v4l2 In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv4245 Modified Files: mach64.c mach64.h Log Message: more changes by Brian Julin ack interrupts before enabling them (separate writes) Index: mach64.c =================================================================== RCS file: /cvsroot/gatos/v4l2/mach64.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mach64.c 30 Jul 2006 20:32:46 -0000 1.6 +++ mach64.c 7 Aug 2006 14:58:04 -0000 1.7 @@ -208,7 +208,10 @@ MACH64_CAPTURE_BUF1_OFFSET = card->buffer1; /* just turn off the interrupts */ - MACH64_CRTC_INT_CNTL &= ~(MACH64_CAPBUF0_INT_EN|MACH64_CAPBUF1_INT_EN|MACH64_CAPONESHOT_INT_EN|MACH64_BUSMASTER_INT_EN); + flags = MACH64_CRTC_INT_CNTL; + flags &= ~(MACH64_CRTC_INT_CNTL_RO_MASK | MACH64_CRTC_INT_CNTL_ACK_MASK); + flags &= ~(MACH64_CAPBUF0_INT_EN|MACH64_CAPBUF1_INT_EN|MACH64_CAPONESHOT_INT_EN|MACH64_BUSMASTER_INT_EN); + MACH64_CRTC_INT_CNTL = flags; //make sure capture is off MACH64_TRIG_CNTL &= ~MACH64_CAPTURE_EN; @@ -346,10 +349,18 @@ } //acknowledge buffer and busmaster interrupts (basicly clear them) - MACH64_CRTC_INT_CNTL |= MACH64_CAPBUF0_INT_ACK | MACH64_CAPBUF1_INT_ACK | MACH64_CAPONESHOT_INT_ACK | MACH64_BUSMASTER_INT_ACK; + flags = MACH64_CRTC_INT_CNTL; + flags &= ~(MACH64_CRTC_INT_CNTL_RO_MASK | MACH64_CRTC_INT_CNTL_ACK_MASK); + flags |= MACH64_CAPBUF0_INT_ACK | MACH64_CAPBUF1_INT_ACK | + MACH64_CAPONESHOT_INT_ACK | MACH64_BUSMASTER_INT_ACK; + MACH64_CRTC_INT_CNTL = flags; //Enable buffer and busmaster interrupts - MACH64_CRTC_INT_CNTL |= MACH64_CAPBUF0_INT_EN|MACH64_CAPBUF1_INT_EN|MACH64_CAPONESHOT_INT_EN|MACH64_BUSMASTER_INT_EN; + flags = MACH64_CRTC_INT_CNTL; + flags &= ~(MACH64_CRTC_INT_CNTL_RO_MASK | MACH64_CRTC_INT_CNTL_ACK_MASK); + flags |= MACH64_CAPBUF0_INT_EN | MACH64_CAPBUF1_INT_EN | + MACH64_CAPONESHOT_INT_EN | MACH64_BUSMASTER_INT_EN; + MACH64_CRTC_INT_CNTL = flags; MACH64_TRIG_CNTL |= MACH64_CAPTURE_EN; @@ -359,6 +370,7 @@ void mach64_disable_capture(GENERIC_CARD *card) { u32 bus_cntl; + unsigned int flags; /* make sure DMA transfers have stopped */ bus_cntl = MACH64_BUS_CNTL; @@ -367,5 +379,10 @@ MACH64_CAPTURE_CONFIG = 0x00000000L; /* disable interrupts */ - //MACH64_CRTC_INT_CNTL &= ~(MACH64_CAPBUF0_INT_EN|MACH64_CAPBUF1_INT_EN|MACH64_CAPONESHOT_INT_EN|MACH64_BUSMASTER_INT_EN); + flags = MACH64_CRTC_INT_CNTL; + flags &= ~(MACH64_CRTC_INT_CNTL_RO_MASK | MACH64_CRTC_INT_CNTL_ACK_MASK); + flags &= ~(MACH64_CAPBUF0_INT_EN|MACH64_CAPBUF1_INT_EN|MACH64_CAPONESHOT_INT_EN|MACH64_BUSMASTER_INT_EN); + MACH64_CRTC_INT_CNTL = flags; + + } Index: mach64.h =================================================================== RCS file: /cvsroot/gatos/v4l2/mach64.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mach64.h 30 Jul 2006 20:32:46 -0000 1.3 +++ mach64.h 7 Aug 2006 14:58:04 -0000 1.4 @@ -34,6 +34,9 @@ #define MACH64_CRTC_H_TOTAL_DISP (*(card->MEM_0+0x00)) #define MACH64_CRTC_V_TOTAL_DISP (*(card->MEM_0+0x02)) #define MACH64_CRTC_INT_CNTL (*(card->MEM_0+0x06)) +#define MACH64_CRTC_INT_CNTL_RO_MASK 0x10000fe1 +#define MACH64_CRTC_INT_CNTL_ACK_MASK 0xcaaaa014 + #define MACH64_BUS_CNTL (*(card->MEM_0+0x28)) #define MACH64_CRTC_GEN_CNTL (*(card->MEM_0+0x07)) #define MACH64_TV_I2C_CNTL 0x0015 |
From: Receive n. of C. c. <gat...@li...> - 2006-08-04 02:13:05
|
Update of /cvsroot/gatos/v4l2 In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15484 Modified Files: generic.c Log Message: updates MODULE_PARM to module_param Index: generic.c =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- generic.c 30 Jul 2006 20:32:45 -0000 1.17 +++ generic.c 4 Aug 2006 02:13:01 -0000 1.18 @@ -50,25 +50,25 @@ /* any params that this module can accept are listed here */ int debug=0; -MODULE_PARM(debug, "i"); +module_param(debug, int , 0); MODULE_PARM_DESC(debug, "Debugging level"); int disablev4l2=0; -MODULE_PARM(disablev4l2, "i"); +module_param(disablev4l2, int, 0); MODULE_PARM_DESC(disablev4l2, "disable v4l2 support"); int disabledma=0; -MODULE_PARM(disabledma, "i"); +module_param(disabledma, int, 0); MODULE_PARM_DESC(disabledma, "disable dma support"); int disableinterlace=0; -MODULE_PARM(disableinterlace, "i"); +module_param(disableinterlace, int, 0); MODULE_PARM_DESC(disableinterlace, "disable interlace modes"); int halfwidth=0; -MODULE_PARM(halfwidth, "i"); +module_param(halfwidth, int, 0); MODULE_PARM_DESC(halfwidth, "cut max width in half (640 becomes 320)"); int forceromaddr=0; -MODULE_PARM(forceromaddr, "i"); +module_param(forceromaddr, int, 0); MODULE_PARM_DESC(forceromaddr, "Force romaddr to 0x000C0000"); int tunertype=-1; -MODULE_PARM(tunertype, "i"); +module_param(tunertype, int, 0); MODULE_PARM_DESC(tunertype, "Tuner type, 0=pal, 1=ntsc, 2=secam, 3=pal nc, 4=pal m, 5= pal n, 6=ntsc jp"); struct proc_dir_entry *proc_dir; |
From: Receive n. of C. c. <gat...@li...> - 2006-07-30 20:32:52
|
Update of /cvsroot/gatos/v4l2 In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv9746 Modified Files: generic.c generic.h i2c.c i2c.h mach64.c mach64.h Log Message: Some patches supplied by Brian S. Julin cleans up i2c and splits writing of ACKs and enabling interrupts Index: generic.c =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- generic.c 25 Feb 2006 02:14:55 -0000 1.16 +++ generic.c 30 Jul 2006 20:32:45 -0000 1.17 @@ -85,14 +85,14 @@ subdevice: PCI_ANY_ID, class: 0, class_mask: 0, - driver_data: MACH64CHIP /* can use to store extra data here */ + driver_data: MACH64CHIP /* Holds chiptype and i2c driver */ }, {PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_215GB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, MACH64CHIP}, {PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_215GD, PCI_ANY_ID, PCI_ANY_ID, 0, 0, MACH64CHIP}, {PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_215GI, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, MACH64CHIP}, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, MACH64CHIP|RAGEPRO_I2C}, {PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_215GP, PCI_ANY_ID, PCI_ANY_ID, 0, 0, MACH64CHIP}, {PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_215GQ, Index: mach64.h =================================================================== RCS file: /cvsroot/gatos/v4l2/mach64.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mach64.h 9 Mar 2005 20:34:42 -0000 1.2 +++ mach64.h 30 Jul 2006 20:32:46 -0000 1.3 @@ -29,6 +29,8 @@ #define MACH64_GEN_TEST_CNTL_PTR (card->MEM_0+0x34) #define MACH64_GP_IO (*(card->MEM_0+0x1E)) #define MACH64_GP_IO_PTR (card->MEM_0+0x1E) +#define MACH64_SCRATCH_REG0 (*(card->MEM_0+0x20)) +#define MACH64_SCRATCH_REG0_PTR (card->MEM_0+0x20) #define MACH64_CRTC_H_TOTAL_DISP (*(card->MEM_0+0x00)) #define MACH64_CRTC_V_TOTAL_DISP (*(card->MEM_0+0x02)) #define MACH64_CRTC_INT_CNTL (*(card->MEM_0+0x06)) Index: generic.h =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- generic.h 22 Jan 2006 14:41:48 -0000 1.6 +++ generic.h 30 Jul 2006 20:32:46 -0000 1.7 @@ -67,6 +67,11 @@ which i2c driver to use and whatever else */ #define MACH64CHIP (1 << 0) #define RAGE128CHIP (1 << 1) +#define DACGEN_I2C (1 << 2) +#define GPIO_I2C (1 << 3) +#define LG_I2C (1 << 4) +#define IMPACTTV_I2C (1 << 5) +#define RAGEPRO_I2C (1 << 6) struct generici2cchip { int deviceid; Index: mach64.c =================================================================== RCS file: /cvsroot/gatos/v4l2/mach64.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mach64.c 9 Mar 2005 20:34:42 -0000 1.5 +++ mach64.c 30 Jul 2006 20:32:46 -0000 1.6 @@ -345,17 +345,13 @@ MACH64_CAPTURE_CONFIG = MACH64_CAP_INPUT_MODE | MACH64_CAP_BUF_MODE | MACH64_ONESHOT_MODE | MACH64_CAP_BUF_FRAME | MACH64_CAP_FIELD_FLIP; } - MACH64_TRIG_CNTL |= MACH64_CAPTURE_EN; - - flags = MACH64_CRTC_INT_CNTL; - //acknowledge buffer and busmaster interrupts (basicly clear them) - flags |= MACH64_CAPBUF0_INT_ACK | MACH64_CAPBUF1_INT_ACK | MACH64_CAPONESHOT_INT_ACK | MACH64_BUSMASTER_INT_ACK; + MACH64_CRTC_INT_CNTL |= MACH64_CAPBUF0_INT_ACK | MACH64_CAPBUF1_INT_ACK | MACH64_CAPONESHOT_INT_ACK | MACH64_BUSMASTER_INT_ACK; //Enable buffer and busmaster interrupts - flags |= MACH64_CAPBUF0_INT_EN|MACH64_CAPBUF1_INT_EN|MACH64_CAPONESHOT_INT_EN|MACH64_BUSMASTER_INT_EN; + MACH64_CRTC_INT_CNTL |= MACH64_CAPBUF0_INT_EN|MACH64_CAPBUF1_INT_EN|MACH64_CAPONESHOT_INT_EN|MACH64_BUSMASTER_INT_EN; - MACH64_CRTC_INT_CNTL = flags; + MACH64_TRIG_CNTL |= MACH64_CAPTURE_EN; card->status |= STATUS_CAPTURING; } Index: i2c.c =================================================================== RCS file: /cvsroot/gatos/v4l2/i2c.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- i2c.c 9 Mar 2005 20:34:42 -0000 1.2 +++ i2c.c 30 Jul 2006 20:32:46 -0000 1.3 @@ -27,170 +27,297 @@ #include "mach64.h" #include "rage128.h" -struct i2c_funcs generic_i2c_driver[] = { -/* A (DAC+GEN_TEST) B (GP_IO Register) LG (GP_IO Register) */ - { ®_scldir, ®_setscl, ®_getscl, - ®_sdadir, ®_setsda, ®_getsda }, - /* TB (ImpacTV) */ - { &itv_scldir, &itv_setscl, &itv_getscl, - &itv_sdadir, &itv_setsda, &itv_getsda }, - { &pro_scldir, &pro_setscl, &pro_getscl, /* C (Rage PRO) */ - &pro_sdadir, &pro_setsda, &pro_getsda }, - { NULL, NULL, NULL, NULL, NULL, NULL} /* Rage128 H/W Driver */ -}; -const unsigned int MAXI2CDRIVER = ARRAY_SIZE(generic_i2c_driver); +static struct i2c_funcs* i2c_getfuncs(void); /* sleazy C proto avoidance */ int i2c_init(GENERIC_CARD *card) { - int ok; - u32 save1,save2,save3,save4; + struct i2c_funcs *i2cf; + int idx, ok; + u32 saves[4]; unsigned long nm; - + + i2cf = i2c_getfuncs(); /* sleazy C proto avoidance */ + if (card->driver_data & RAGE128CHIP){ - /* set it to the rage128 i2c driver (all nulls) */ - card->i2c = &generic_i2c_driver[3]; - + /* No banging, handled specially. Set to all NULLs JIC. */ + idx = 0; + while (i2cf[idx].name) idx++; + card->i2c = &i2cf[idx]; + nm = card->refclock * 10000 / (4*R128_CLOCK_FREQ); - for (card->R128_N=1 ; card->R128_N<255 ; card->R128_N++) - if (card->R128_N*(card->R128_N-1) > nm) - break; - card->R128_M = card->R128_N - 1; - card->R128_TIME = 2*card->R128_N; - R128_I2C_CNTL_1 = (card->R128_TIME<<24) | I2C_SEL | I2C_EN; - R128_I2C_CNTL_0_0 = I2C_DONE | I2C_NACK | I2C_HALT | I2C_SOFT_RST | - I2C_DRIVE_EN | I2C_DRIVE_SEL; - - ok = i2c_device(card,0xC0) + i2c_device(card,0xC2) + - i2c_device(card,0xC4) + i2c_device(card,0xC6); + for (card->R128_N=1 ; card->R128_N < 255 ; card->R128_N++) + if (card->R128_N * (card->R128_N-1) > nm) + break; + card->R128_M = card->R128_N - 1; + card->R128_TIME = 2*card->R128_N; + R128_I2C_CNTL_1 = (card->R128_TIME<<24) | I2C_SEL | I2C_EN; + R128_I2C_CNTL_0_0 = I2C_DONE | I2C_NACK | I2C_HALT | I2C_SOFT_RST | + I2C_DRIVE_EN | I2C_DRIVE_SEL; - if (ok != 0 && ok != 4){ -printk(KERN_INFO "card(%d) Rage128 i2c driver\n",card->cardnum); - return 0; - } - /* check for bt829 chip */ - ok = i2c_device(card,0x88) + i2c_device(card,0x8a); - if ((ok != 0) && (ok != 4)) { - return 0; + /* Probes can "succeed" if the pin is stuck high. At least + one of these should fail. If stuck low, or no hardware, + all will fail as well. Do minimum IO to make the call. + */ + ok = i2c_device(card,0xC0); /* tuners */ + if ((i2c_device(card,0xC2) == ok) && + (i2c_device(card,0xC4) == ok) && + (i2c_device(card,0xC6) == ok) && + (i2c_device(card,0x88) == ok) && /* grabbers (bt8xx) */ + (i2c_device(card,0x8a) == ok)) { + /* pin stuck or no harware present */ + R128_I2C_CNTL_1 = 0x0; + return (-ENODEV); } - /* failed to find it */ - R128_I2C_CNTL_1 = 0x0; + + printk(KERN_INFO "card(%d) Rage128 i2c driver\n",card->cardnum); + return 0; } else if (card->driver_data & MACH64CHIP){ - // try (DAC+GEN_TEST) - card->i2c = &generic_i2c_driver[0]; - card->sclreg = MACH64_DAC_CNTL_PTR; - card->sdareg = MACH64_GEN_TEST_CNTL_PTR; - card->sclset = 0x01000000; - card->sdaset = 0x00000001; - card->sdaget = 0x00000008; - card->scldir = 0x08000000; - card->sdadir = 0x00000020; - save1 = MACH64_DAC_CNTL; - save2 = MACH64_GEN_TEST_CNTL; - save3 = MACH64_GP_IO; - *card->sdareg |= 0x00000010; - save4 = MACH64_CRTC_H_TOTAL_DISP; //hmm why do this? - MACH64_GP_IO &= 0x7FFFFFFF; - MACH64_CRTC_H_TOTAL_DISP = save4; //hmm why do this? - ok = i2c_device(card,0xC0) + i2c_device(card,0xC2) + - i2c_device(card,0xC4) + i2c_device(card,0xC6); + idx = 0; + while (i2cf[idx].name) { + card->i2c = &i2cf[idx]; - if (ok != 0 && ok != 4){ -dprintk(2,"card(%d) DAC+GEN_TEST i2c driver\n",card->cardnum); - return 0; + dprintk(3, "card(%d) Trying %s I2C driver\n", + card->cardnum,i2cf[idx].name); + if (!card->i2c->init(card,saves)) { + /* Probes can "succeed" if the pin is stuck high. At least + one of these should fail. If stuck low, or no hardware, + all will fail as well. Do minimum IO to make the call. + */ + ok = i2c_device(card,0xC0); /* tuners */ + if (!((i2c_device(card,0xC2) == ok) && + (i2c_device(card,0xC4) == ok) && + (i2c_device(card,0xC6) == ok) && + (i2c_device(card,0x88) == ok) && /* grabbers (bt8xx) */ + (i2c_device(card,0x8a) == ok))) { + /* found */ + dprintk(2, "card(%d) %s I2C driver succeeded\n", + card->cardnum,i2cf[idx].name); + return 0; + } + } + card->i2c->deinit(card, saves); + idx++; } - //else this is not the right i2c driver set everything back to what it was - MACH64_DAC_CNTL = save1; - MACH64_GEN_TEST_CNTL = save2; - MACH64_GP_IO = save3; + printk(KERN_INFO "No hardware found via i2c.\n"); + } + return (-ENODEV); +} - //try next i2c driver (GP_IO Register) - card->sclreg = MACH64_GP_IO_PTR; - card->sdareg = MACH64_GP_IO_PTR; - save1 = MACH64_GP_IO; - card->sclset = 0x00000800; - card->sdaset = 0x00000010; - card->sdaget = 0x00000010; - card->scldir = 0x08000000; - card->sdadir = 0x00100000; - ok = i2c_device(card,0xC0) + i2c_device(card,0xC2) + - i2c_device(card,0xC4) + i2c_device(card,0xC6); - if (ok != 0 && ok != 4){ -dprintk(2,"card(%d) GP_IO i2c driver\n",card->cardnum); - return 0; - } - /* now try bt829 units in case there is no tuner */ - if (ok == 0){ - ok = i2c_device(card,0x88)+i2c_device(card,0x8a); - if (ok != 0){ - return 0; - } - } - //else nope reset and test next - MACH64_GP_IO = save1; +/* Type A: I2C bus accessed through DAC_CNTL and GEN_TEST_CNTL */ - //try next i2c driver LG (GP_IO Register) - card->sclreg = MACH64_GP_IO_PTR; - card->sdareg = MACH64_GP_IO_PTR; - save1 = MACH64_GP_IO; - card->sclset = 0x00000400; - card->sdaset = 0x00001000; - card->sdaget = 0x00001000; - card->scldir = 0x04000000; - card->sdadir = 0x10000000; - ok = i2c_device(card,0xC0) + i2c_device(card,0xC2) + - i2c_device(card,0xC4) + i2c_device(card,0xC6); +static int dac_init(GENERIC_CARD *card, u32 *saves) { + saves[0] = MACH64_DAC_CNTL; + saves[1] = MACH64_GEN_TEST_CNTL; + saves[2] = MACH64_GP_IO; + MACH64_GEN_TEST_CNTL |= 0x00000010; + saves[3] = MACH64_CRTC_H_TOTAL_DISP; //hmm why do this? + MACH64_GP_IO &= 0x7FFFFFFF; + MACH64_CRTC_H_TOTAL_DISP = saves[3]; //hmm why do this? + return 0; +} - if (ok != 0 && ok != 4){ -dprintk(2,"card(%d) LG GP_IO i2c driver\n",card->cardnum); - return 0; - } - //else nope reset and try next - MACH64_GP_IO = save1; +static void dac_deinit(GENERIC_CARD *card, u32 *saves) { + MACH64_DAC_CNTL = saves[0]; + MACH64_GEN_TEST_CNTL = saves[1]; + MACH64_GP_IO = saves[2]; +} - //TB (ImpacTV) - card->i2c = &generic_i2c_driver[1]; - tvout_write32(card,MACH64_TV_I2C_CNTL,0x00005500|card->tv_i2c_cntl); - ok = i2c_device(card,0xC0) + i2c_device(card,0xC2) + - i2c_device(card,0xC4) + i2c_device(card,0xC6); +static void dac_scldir(GENERIC_CARD *card, int set) +{ + set ? (MACH64_DAC_CNTL |= 0x08000000) : (MACH64_DAC_CNTL &= 0xf7ffffff); +} - if (ok != 0 && ok != 4){ -dprintk(2,"card(%d) Impact tv i2c driver\n",card->cardnum); - return 0; - } - //else nope try last one +static void dac_sdadir(GENERIC_CARD *card, int set) +{ + set ? (MACH64_GEN_TEST_CNTL|=0x00000020):(MACH64_GEN_TEST_CNTL&=0xffffffdf); +} - //(Rage PRO) - card->i2c = &generic_i2c_driver[2]; - save1 = MACH64_I2C_CNTL_0; - save2 = MACH64_I2C_CNTL_1; - MACH64_I2C_CNTL_1 = 0x00400000; - if (MACH64_I2C_CNTL_1!=0x00400000) - return (-ENODEV); +static void dac_setscl(GENERIC_CARD *card, int set) +{ + set ? (MACH64_DAC_CNTL |= 0x01000000) : (MACH64_DAC_CNTL &= 0xfeffffff); + I2C_SLEEP; +} - card->i2c_cntl_0 = 0x0000C000; - MACH64_I2C_CNTL_0 = card->i2c_cntl_0|0x00040000; +static void dac_setsda(GENERIC_CARD *card, int set) +{ + set ? (MACH64_GEN_TEST_CNTL|=0x00000001):(MACH64_GEN_TEST_CNTL&=0xfffffffe); + I2C_SLEEP; +} - ok = i2c_device(card,0xC0) + i2c_device(card,0xC2) + - i2c_device(card,0xC4) + i2c_device(card,0xC6); +static int dac_getscl(GENERIC_CARD *card) +{ + return (MACH64_DAC_CNTL & 0x01000000); +} - if (ok != 0 && ok != 4){ -dprintk(2,"card(%d) RagePro i2c driver\n",card->cardnum); - return 0; - } - MACH64_I2C_CNTL_0 = save1; - MACH64_I2C_CNTL_1 = save2; - } - return (-ENODEV); +static int dac_getsda(GENERIC_CARD *card) +{ + return (MACH64_GEN_TEST_CNTL & 0x00000008); } -void pro_scldir(GENERIC_CARD *card,int set) { } -void pro_sdadir(GENERIC_CARD *card,int set) { } -void pro_setscl(GENERIC_CARD *card,int set) +/* Type B: Routines for I2C bus accessed through GP_IO_B and GP_IO_4 */ + +static int gb4_init(GENERIC_CARD *card, u32 *saves) { + saves[0] = MACH64_GP_IO; + return 0; +} + +static void gb4_deinit(GENERIC_CARD *card, u32 *saves) { + MACH64_GP_IO = saves[0]; +} + +static void gb4_scldir(GENERIC_CARD *card, int set) +{ + set ? (MACH64_GP_IO |= 0x08000000) : (MACH64_GP_IO &= 0xf7ffffff); +} + +static void gb4_sdadir(GENERIC_CARD *card, int set) +{ + set ? (MACH64_GP_IO |= 0x00100000) : (MACH64_GP_IO &= 0xffefffff); +} + +static void gb4_setscl(GENERIC_CARD *card, int set) +{ + set ? (MACH64_GP_IO |= 0x00000800) : (MACH64_GP_IO &= 0xfffff7ff); + I2C_SLEEP; +} + +static void gb4_setsda(GENERIC_CARD *card, int set) +{ + set ? (MACH64_GP_IO |=0x00000010) : (MACH64_GP_IO &=0xffffffef); + I2C_SLEEP; +} + +static int gb4_getscl(GENERIC_CARD *card) +{ + return (MACH64_GP_IO & 0x00000800); +} + +static int gb4_getsda(GENERIC_CARD *card) +{ + return (MACH64_GP_IO & 0x00000010); +} + + +/* Type C: I2C bus accessed through GP_IO_A and GP_IO_C */ + +static int gac_init(GENERIC_CARD *card, u32 *saves) { + saves[0] = MACH64_GP_IO; + return 0; +} + +static void gac_deinit(GENERIC_CARD *card, u32 *saves) { + MACH64_GP_IO = saves[0]; +} + +static void gac_scldir(GENERIC_CARD *card, int set) +{ + set ? (MACH64_GP_IO |= 0x04000000) : (MACH64_GP_IO &= 0xfbffffff); +} + +static void gac_sdadir(GENERIC_CARD *card, int set) +{ + set ? (MACH64_GP_IO |= 0x10000000) : (MACH64_GP_IO &= 0xefffffff); +} + +static void gac_setscl(GENERIC_CARD *card, int set) +{ + set ? (MACH64_GP_IO |= 0x00000400) : (MACH64_GP_IO &= 0xfffffbff); + I2C_SLEEP; +} + +static void gac_setsda(GENERIC_CARD *card, int set) +{ + set ? (MACH64_GP_IO |=0x00001000) : (MACH64_GP_IO &=0xffffefff); + I2C_SLEEP; +} + +static int gac_getscl(GENERIC_CARD *card) +{ + return (MACH64_GP_IO & 0x00000400); +} + +static int gac_getsda(GENERIC_CARD *card) +{ + return (MACH64_GP_IO & 0x00001000); +} + + +/* Type BPM (Broken Pro/Mobility) I2C access through GPIO_D and GPIO_C */ +static int gdc_init(GENERIC_CARD *card, u32 *saves) { + saves[0] = MACH64_GP_IO; + saves[1] = MACH64_I2C_CNTL_1; + MACH64_I2C_CNTL_1 |= 0x00400000; /* bit 23 does something too, but what? */ + return 0; +} + +static void gdc_deinit(GENERIC_CARD *card, u32 *saves) { + MACH64_GP_IO = saves[0]; + MACH64_I2C_CNTL_1 = saves[1]; +} + +/* Needs 8-bit access */ +#define MACH64_GP_IO_B1 *(( u8*)MACH64_GP_IO_PTR + 1) +#define MACH64_GP_IO_B3 *(( u8*)MACH64_GP_IO_PTR + 3) +static void gdc_scldir(GENERIC_CARD *card, int set) +{ + set ? (MACH64_GP_IO_B3 |= 0x20) : (MACH64_GP_IO_B3 &= 0xdf); +} + +static void gdc_sdadir(GENERIC_CARD *card, int set) +{ + set ? (MACH64_GP_IO_B3 |= 0x10) : (MACH64_GP_IO_B3 &= 0xef); +} + +static void gdc_setscl(GENERIC_CARD *card, int set) +{ + set ? (MACH64_GP_IO_B1 |= 0x20) : (MACH64_GP_IO_B1 &= 0xdf); + I2C_SLEEP; +} + +static void gdc_setsda(GENERIC_CARD *card, int set) +{ + set ? (MACH64_GP_IO_B1 |= 0x10) : (MACH64_GP_IO_B1 &=0xef); + I2C_SLEEP; +} + +static int gdc_getscl(GENERIC_CARD *card) +{ + return (MACH64_GP_IO_B1 & 0x20); +} + +static int gdc_getsda(GENERIC_CARD *card) +{ + return (MACH64_GP_IO_B1 & 0x10); +} + + +/* Type C: Rage Pro I2C control registers */ + +static int pro_init(GENERIC_CARD *card, u32 *saves) { + saves[0] = MACH64_I2C_CNTL_0; + saves[1] = MACH64_I2C_CNTL_1; + MACH64_I2C_CNTL_1 = 0x00400000; + if (MACH64_I2C_CNTL_1!=0x00400000) return (-ENODEV); + + card->i2c_cntl_0 = 0x0000C000; + MACH64_I2C_CNTL_0 = card->i2c_cntl_0|0x00040000; + return 0; +} + +static void pro_deinit(GENERIC_CARD *card, u32 *saves) { + MACH64_I2C_CNTL_0 = saves[0]; + MACH64_I2C_CNTL_1 = saves[1]; +} + +static void pro_scldir(GENERIC_CARD *card,int set) { } +static void pro_sdadir(GENERIC_CARD *card,int set) { } + +static void pro_setscl(GENERIC_CARD *card,int set) { if (set){ card->i2c_cntl_0 |= 0x00004000; @@ -201,7 +328,7 @@ I2C_SLEEP; } -void pro_setsda(GENERIC_CARD *card,int set) +static void pro_setsda(GENERIC_CARD *card,int set) { if (set){ card->i2c_cntl_0 |= 0x00008000; @@ -212,66 +339,84 @@ I2C_SLEEP; } -int pro_getscl(GENERIC_CARD *card) +static int pro_getscl(GENERIC_CARD *card) { return (MACH64_I2C_CNTL_0 & 0x00004000); } -int pro_getsda(GENERIC_CARD *card) +static int pro_getsda(GENERIC_CARD *card) { return (MACH64_I2C_CNTL_0 & 0x00008000); } -/* Hardware routines for I2C modes A, B and LG (DAC+GEN_TEST or GP_IO) */ -void reg_scldir(GENERIC_CARD *card,int set) + +/* Type TB: Hardware routines for ImpacTV I2C access */ + +/* Returns 1 if ready, 0 if MPP bus timed out (not ready) */ +static int mpp_wait(GENERIC_CARD *card) { - if (set) - *card->sclreg |= card->scldir; - else - *card->sclreg &= ~card->scldir; + u32 tries=MPPTRIES ; + while (tries && (MPP_CONFIG3 & 0x40)) + tries--; + if (tries) + return 1 ; + return 0 ; } -void reg_sdadir(GENERIC_CARD *card,int set) +/* Set ImpacTV register index and return MPP_ADDR + * to 0x0018 for ImpacTV register data access. */ +static void tvout_addr(GENERIC_CARD *card,u16 addr) { - if (set) - *card->sdareg |= card->sdadir; - else - *card->sdareg &= ~card->sdadir; + mpp_wait(card); + MPP_CONFIG = MPPNORMALINC; + MPP_ADDR = 0x00000008L; + MPP_DATA0 = addr; + mpp_wait(card); + MPP_DATA0 = addr>>8; + mpp_wait(card); + MPP_CONFIG = MPPNORMAL; + MPP_ADDR = 0x00000018L; } -void reg_setscl(GENERIC_CARD *card,int set) +/* Write to ImpacTV register */ +static void tvout_write32(GENERIC_CARD *card, u16 addr, u32 data) { - if (set) - *card->sclreg |= card->sclset; - else - *card->sclreg &= ~card->sclset; + tvout_addr(card,addr); - I2C_SLEEP; + mpp_wait(card); + MPP_CONFIG = MPPNORMALINC ; + MPP_DATA0 = data ; mpp_wait(card) ; + MPP_DATA0 = data >> 8 ; mpp_wait(card) ; + MPP_DATA0 = data >> 16 ; mpp_wait(card) ; + MPP_DATA0 = data >> 24 ; mpp_wait(card) ; + if (addr != MACH64_TV_I2C_CNTL) tvout_addr(card,MACH64_TV_I2C_CNTL) ; } -void reg_setsda(GENERIC_CARD *card,int set) +/* Write low byte of ImpacTV TV_I2C_CNTL register */ +static void tvout_write_i2c_cntl8(GENERIC_CARD *card,u8 data) { - if (set) - *card->sdareg |= card->sdaset; - else - *card->sdareg &= ~card->sdaset; - - I2C_SLEEP; + mpp_wait(card); + MPP_CONFIG = MPPNORMAL; + MPP_DATA0 = data; } -int reg_getscl(GENERIC_CARD *card) +/* Read low byte of ImpacTV TV_I2C_CNTL register */ +static u8 tvout_read_i2c_cntl8(GENERIC_CARD *card) { - return (*card->sclreg & card->sclset); + mpp_wait(card); + MPP_CONFIG = MPPREAD; + mpp_wait(card); + return MPPREADBYTE; } -int reg_getsda(GENERIC_CARD *card) -{ - return (*card->sdareg & card->sdaget); +static int itv_init (GENERIC_CARD *card, u32 *saves) { + tvout_write32(card, MACH64_TV_I2C_CNTL, 0x00005500 | card->tv_i2c_cntl); + return 0; } -/* Hardware routines for I2C mode TB (ImpacTV) */ +static void itv_deinit (GENERIC_CARD *card, u32 *saves) { } -void itv_scldir(GENERIC_CARD * card,int set) +static void itv_scldir(GENERIC_CARD * card,int set) { if (set) card->tv_i2c_cntl |= 0x01; @@ -282,7 +427,7 @@ I2C_SLEEP; } -void itv_sdadir(GENERIC_CARD * card,int set) +static void itv_sdadir(GENERIC_CARD * card,int set) { if (set) card->tv_i2c_cntl |= 0x10; @@ -293,7 +438,7 @@ I2C_SLEEP; } -void itv_setsda(GENERIC_CARD * card,int set) +static void itv_setsda(GENERIC_CARD * card,int set) { if (set) card->tv_i2c_cntl |= 0x20; @@ -304,7 +449,7 @@ I2C_SLEEP; } -void itv_setscl(GENERIC_CARD * card,int set) +static void itv_setscl(GENERIC_CARD * card,int set) { if (set) card->tv_i2c_cntl |= 0x02; @@ -315,44 +460,44 @@ I2C_SLEEP; } -int itv_getscl(GENERIC_CARD *card) +static int itv_getscl(GENERIC_CARD *card) { return (tvout_read_i2c_cntl8(card) & 0x04); } -int itv_getsda(GENERIC_CARD *card) +static int itv_getsda(GENERIC_CARD *card) { return (tvout_read_i2c_cntl8(card) & 0x40); } -/* Returns 1 if ready, 0 if MPP bus timed out (not ready) */ -int mpp_wait(GENERIC_CARD *card) -{ - u32 tries=MPPTRIES ; - while (tries && (MPP_CONFIG3 & 0x40)) - tries--; - if (tries) - return 1 ; - return 0 ; -} +/* Rage128 I2C routines */ -/* Write low byte of ImpacTV TV_I2C_CNTL register */ -void tvout_write_i2c_cntl8(GENERIC_CARD *card,u8 data) -{ - mpp_wait(card); - MPP_CONFIG = MPPNORMAL; - MPP_DATA0 = data; +static int r128_wait_ack(GENERIC_CARD *card) { + int nack=0, n1=0, n2=0 ; + while (n1++ < 10 && (R128_I2C_CNTL_0_1 & (I2C_GO>>8))) udelay(15); + while (n2++ < 10 && !nack) { + nack = R128_I2C_CNTL_0_0 & (I2C_DONE|I2C_NACK|I2C_HALT); + if (!nack) + udelay(15); + } + return (nack != I2C_DONE); +} + +static void r128_reset(GENERIC_CARD *card) { + R128_I2C_CNTL_0 = I2C_SOFT_RST | I2C_HALT | I2C_NACK | I2C_DONE; } -/* Read low byte of ImpacTV TV_I2C_CNTL register */ -u8 tvout_read_i2c_cntl8(GENERIC_CARD *card) -{ - mpp_wait(card); - MPP_CONFIG = MPPREAD; - mpp_wait(card); - return MPPREADBYTE; +static int r128_go(GENERIC_CARD *card,int naddr, int ndata, u32 flags) { + R128_I2C_CNTL_1 = (card->R128_TIME<<24) | I2C_EN | I2C_SEL + | (naddr<<8) | ndata; + R128_I2C_CNTL_0 = (card->R128_N<<24) | (card->R128_M<<16) + | I2C_GO | I2C_START | I2C_STOP | I2C_DRIVE_EN | flags; + return r128_wait_ack(card); } + +/* Mach64/Rage128 I2C Intraface */ + void i2c_start(GENERIC_CARD *card) { card->i2c->scldir(card,1); @@ -407,61 +552,10 @@ nack = i2c_sendbyte(card,addr); i2c_stop(card); } + dprintk(7, "%s @ %x result %d\n", card->i2c->name, addr, !nack); return !nack; } -/* Set ImpacTV register index and return MPP_ADDR - * to 0x0018 for ImpacTV register data access. */ -void tvout_addr(GENERIC_CARD *card,u16 addr) -{ - mpp_wait(card); - MPP_CONFIG = MPPNORMALINC; - MPP_ADDR = 0x00000008L; - MPP_DATA0 = addr; - mpp_wait(card); - MPP_DATA0 = addr>>8; - mpp_wait(card); - MPP_CONFIG = MPPNORMAL; - MPP_ADDR = 0x00000018L; -} - -/* Write to ImpacTV register */ -void tvout_write32(GENERIC_CARD *card, u16 addr, u32 data) -{ - tvout_addr(card,addr); - - mpp_wait(card); - MPP_CONFIG = MPPNORMALINC ; - MPP_DATA0 = data ; mpp_wait(card) ; - MPP_DATA0 = data >> 8 ; mpp_wait(card) ; - MPP_DATA0 = data >> 16 ; mpp_wait(card) ; - MPP_DATA0 = data >> 24 ; mpp_wait(card) ; - if (addr != MACH64_TV_I2C_CNTL) tvout_addr(card,MACH64_TV_I2C_CNTL) ; -} - -int r128_wait_ack(GENERIC_CARD *card) { - int nack=0, n1=0, n2=0 ; - while (n1++ < 10 && (R128_I2C_CNTL_0_1 & (I2C_GO>>8))) udelay(15); - while (n2++ < 10 && !nack) { - nack = R128_I2C_CNTL_0_0 & (I2C_DONE|I2C_NACK|I2C_HALT); - if (!nack) - udelay(15); - } - return (nack != I2C_DONE); -} - -void r128_reset(GENERIC_CARD *card) { - R128_I2C_CNTL_0 = I2C_SOFT_RST | I2C_HALT | I2C_NACK | I2C_DONE; -} - -int r128_go(GENERIC_CARD *card,int naddr, int ndata, u32 flags) { - R128_I2C_CNTL_1 = (card->R128_TIME<<24) | I2C_EN | I2C_SEL - | (naddr<<8) | ndata; - R128_I2C_CNTL_0 = (card->R128_N<<24) | (card->R128_M<<16) - | I2C_GO | I2C_START | I2C_STOP | I2C_DRIVE_EN | flags; - return r128_wait_ack(card); -} - u8 i2c_read(GENERIC_CARD *card,u8 addr) { int nack=0; @@ -562,3 +656,30 @@ return nack ? -1 : 0; } + +/* Drivers are tried in order listed here. */ +static struct i2c_funcs generic_i2c_driver[] = { + { "type A (DAC_CNTL/GEN_TEST_CNTL)", &dac_init, &dac_deinit, + &dac_scldir, &dac_setscl, &dac_getscl, + &dac_sdadir, &dac_setsda, &dac_getsda }, + { "type B (GP_IO pins B and 4)", &gb4_init, &gb4_deinit, + &gb4_scldir, &gb4_setscl, &gb4_getscl, + &gb4_sdadir, &gb4_setsda, &gb4_getsda }, + { "type LG (GP_IO pins A and C)", &gac_init, &gac_deinit, + &gac_scldir, &gac_setscl, &gac_getscl, + &gac_sdadir, &gac_setsda, &gac_getsda }, + { "type C (Pro I2C registers)", &pro_init, &pro_deinit, + &pro_scldir, &pro_setscl, &pro_getscl, + &pro_sdadir, &pro_setsda, &pro_getsda }, + { "type BPM (GP_IO pins D and C)", &gdc_init, &gdc_deinit, + &gdc_scldir, &gdc_setscl, &gdc_getscl, + &gdc_sdadir, &gdc_setsda, &gdc_getsda }, + { "type TB (ImpacTV)", &itv_init, &itv_deinit, + &itv_scldir, &itv_setscl, &itv_getscl, + &itv_sdadir, &itv_setsda, &itv_getsda }, + { NULL, NULL, NULL, + NULL, NULL, NULL, + NULL, NULL, NULL} /* List terminator + Rage128 */ +}; + +static struct i2c_funcs *i2c_getfuncs(void) { return generic_i2c_driver; }; Index: i2c.h =================================================================== RCS file: /cvsroot/gatos/v4l2/i2c.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- i2c.h 11 Jan 2005 21:11:05 -0000 1.1.1.1 +++ i2c.h 30 Jul 2006 20:32:46 -0000 1.2 @@ -35,6 +35,9 @@ /* Function pointers used by low level functions */ struct i2c_funcs { + char *name; + int (*init)(GENERIC_CARD *, u32 *saves); + void (*deinit)(GENERIC_CARD *, u32 *saves); void (*scldir)(GENERIC_CARD *,int); void (*setscl)(GENERIC_CARD *,int); int (*getscl)(GENERIC_CARD *); @@ -43,41 +46,15 @@ int (*getsda)(GENERIC_CARD *); }; -void reg_scldir(GENERIC_CARD *card,int set); -void reg_sdadir(GENERIC_CARD *card,int set); -void reg_setscl(GENERIC_CARD *card,int set); -void reg_setsda(GENERIC_CARD *card,int set); -int reg_getscl(GENERIC_CARD *card); -int reg_getsda(GENERIC_CARD *card); -void itv_scldir(GENERIC_CARD * card,int set); -void itv_sdadir(GENERIC_CARD * card,int set); -void itv_setsda(GENERIC_CARD * card,int set); -void itv_setscl(GENERIC_CARD * card,int set); -int itv_getscl(GENERIC_CARD *card); -int itv_getsda(GENERIC_CARD *card); -int mpp_wait(GENERIC_CARD *card); -void tvout_write_i2c_cntl8(GENERIC_CARD *card,u8 data); -u8 tvout_read_i2c_cntl8(GENERIC_CARD *card); void i2c_start(GENERIC_CARD *card); void i2c_stop(GENERIC_CARD * card); int i2c_sendbyte(GENERIC_CARD *card, u8 data); int i2c_device(GENERIC_CARD * card,u8 addr); -void tvout_addr(GENERIC_CARD *card,u16 addr); -void tvout_write32(GENERIC_CARD *card, u16 addr, u32 data); u8 i2c_read(GENERIC_CARD *card,u8 addr); u8 i2c_readbyte(GENERIC_CARD *card,int last); u8 i2c_readreg8(GENERIC_CARD *card,u8 addr, u8 reg); int i2c_writereg8(GENERIC_CARD *card,u8 addr, u8 reg, u8 value); int i2c_write(GENERIC_CARD *card,u8 addr, u8 *data, int count); -void pro_scldir(GENERIC_CARD *card, int set); -void pro_sdadir(GENERIC_CARD *card, int set); -void pro_setscl(GENERIC_CARD *card, int set); -void pro_setsda(GENERIC_CARD *card, int set); -int pro_getscl(GENERIC_CARD *card); -int pro_getsda(GENERIC_CARD *card); int i2c_init(GENERIC_CARD *card); -void r128_reset(GENERIC_CARD *card); -int r128_go(GENERIC_CARD *card,int naddr, int ndata, u32 flags); -int r128_wait_ack(GENERIC_CARD *card); #endif |
From: Receive n. of C. c. <gat...@li...> - 2006-07-03 17:18:06
|
Update of /cvsroot/gatos/km In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv27185 Modified Files: km.c Log Message: MODULE_PARM is deprecated in 2.6.17 kernels, use module_param instead. Remove unused parameter km_debug_overruns. Index: km.c =================================================================== RCS file: /cvsroot/gatos/km/km.c,v retrieving revision 1.108 retrieving revision 1.109 diff -u -d -r1.108 -r1.109 --- km.c 15 Jan 2006 18:27:09 -0000 1.108 +++ km.c 3 Jul 2006 17:17:56 -0000 1.109 @@ -23,6 +23,7 @@ #include <linux/config.h> #include <linux/version.h> #include <linux/module.h> +#include <linux/moduleparam.h> #include <linux/kmod.h> #include <linux/kernel.h> #include <linux/sched.h> @@ -47,20 +48,17 @@ MODULE_LICENSE("GPL"); #endif +int km_debug=0; +int km_buffers=5; + MODULE_DESCRIPTION("km_drv"); -MODULE_PARM(km_debug, "i"); -MODULE_PARM(km_debug_overruns, "i"); -MODULE_PARM(km_buffers, "i"); +module_param(km_debug, int, 0); +module_param(km_buffers, int, 0); MODULE_PARM_DESC(km_debug, "kmultimedia debugging level"); -MODULE_PARM_DESC(km_debug_overruns, "kmultimedia debug overruns"); MODULE_PARM_DESC(km_buffers, "how many buffers to use for video capture per each device"); #define POINTER_TO_INT( x ) ((unsigned long)(x)) -int km_debug=0; -int km_debug_overruns=0; -int km_buffers=5; - int find_free_buffer(KM_STREAM *stream) { int next; |
From: <gat...@li...> - 2006-02-25 02:15:06
|
Update of /cvsroot/gatos/v4l2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5264 Modified Files: generic.c Log Message: removes some debugging lines Index: generic.c =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- generic.c 21 Feb 2006 03:27:04 -0000 1.15 +++ generic.c 25 Feb 2006 02:14:55 -0000 1.16 @@ -1708,7 +1708,6 @@ unsigned long *freq = arg; *freq = card->freq; dprintk(2,"card(%d) VIDIOCGFREQ called %ld\n",card->cardnum,card->freq); -printk("SNAPPER card(%d) VIDIOCGFREQ called %ld\n",card->cardnum,card->freq); return 0; } /* Set tuner */ @@ -1716,7 +1715,6 @@ { unsigned long *freq = arg; dprintk(2,"card(%d) VIDIOCSFREQ called %ld\n",card->cardnum, *freq); -printk("SNAPPER card(%d) VIDIOCSFREQ called %ld\n",card->cardnum, *freq); down_interruptible(&card->lock); card->freq=*freq; /* actually change the channel here */ @@ -2411,7 +2409,6 @@ down_interruptible(&card->lock); card->freq = f->frequency; dprintk(2,"card(%d) VIDIOC_S_FREQUENCY set to %ld\n",card->cardnum, card->freq); -printk("SNAPPER card(%d) VIDIOC_S_FREQUENCY set to %ld\n",card->cardnum, card->freq); fi12xx_tune(card); up(&card->lock); return 0; |
From: <gat...@li...> - 2006-02-21 03:27:10
|
Update of /cvsroot/gatos/v4l2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16155 Modified Files: generic.c Log Message: Fixes a bug with VIDIOC_DQBUF, I wasnt checking if capture was disabled so mplayer would go into an endless loop when exiting trying to clear the buffers. Index: generic.c =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- generic.c 22 Jan 2006 14:41:46 -0000 1.14 +++ generic.c 21 Feb 2006 03:27:04 -0000 1.15 @@ -1708,6 +1708,7 @@ unsigned long *freq = arg; *freq = card->freq; dprintk(2,"card(%d) VIDIOCGFREQ called %ld\n",card->cardnum,card->freq); +printk("SNAPPER card(%d) VIDIOCGFREQ called %ld\n",card->cardnum,card->freq); return 0; } /* Set tuner */ @@ -1715,6 +1716,7 @@ { unsigned long *freq = arg; dprintk(2,"card(%d) VIDIOCSFREQ called %ld\n",card->cardnum, *freq); +printk("SNAPPER card(%d) VIDIOCSFREQ called %ld\n",card->cardnum, *freq); down_interruptible(&card->lock); card->freq=*freq; /* actually change the channel here */ @@ -2089,11 +2091,18 @@ card->frame = remove_frame_from_queue(&card->frame_queue); if (card->frame < 0){ if (file->f_flags & O_NONBLOCK){ - dprintk(1,"VIDIOC_DQBUF should do something here cause we ran out of buffers\n"); + if (fh->resources & STATUS_CAPTURING){ + dprintk(1,"VIDIOC_DQBUF should do something here cause we ran out of buffers and we are still capturing\n"); + } + return -EAGAIN; + } + if (fh->resources & STATUS_CAPTURING){ + /* should wait for a frame to be available here? */ + card->frame = 0; + } else { + //out of buffers but thats okay cause we are not capturing return -EAGAIN; } - /* should wait for a frame to be available here? */ - card->frame = 0; } grab_frame(card); @@ -2402,6 +2411,7 @@ down_interruptible(&card->lock); card->freq = f->frequency; dprintk(2,"card(%d) VIDIOC_S_FREQUENCY set to %ld\n",card->cardnum, card->freq); +printk("SNAPPER card(%d) VIDIOC_S_FREQUENCY set to %ld\n",card->cardnum, card->freq); fi12xx_tune(card); up(&card->lock); return 0; |
From: <gat...@li...> - 2006-02-12 00:06:20
|
Update of /cvsroot/gatos/avview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25016 Modified Files: acsite.m4 Log Message: Remove extra quote. Fix contributed by Tom Epperly. Index: acsite.m4 =================================================================== RCS file: /cvsroot/gatos/avview/acsite.m4,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- acsite.m4 18 Jul 2003 20:16:12 -0000 1.3 +++ acsite.m4 12 Feb 2006 00:06:12 -0000 1.4 @@ -586,7 +586,7 @@ # results, and the version is kept in special file). if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then - system=MP-RAS-`awk '{print $3}' /etc/.relid'` + system=MP-RAS-`awk '{print $3}' /etc/.relid` fi if test "`uname -s`" = "AIX" ; then system=AIX-`uname -v`.`uname -r` |
From: <gat...@li...> - 2006-01-22 14:41:59
|
Update of /cvsroot/gatos/v4l2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19102 Modified Files: generic.c generic.h memory.c Log Message: Patch provided by Fred Howell to get dma working on AMD 64 machines. Index: generic.h =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- generic.h 24 Nov 2005 19:29:34 -0000 1.5 +++ generic.h 22 Jan 2006 14:41:48 -0000 1.6 @@ -371,6 +371,7 @@ DMA_BM_TABLE *dma_table_vbi; //u32 *framebuffer1,*framebuffer2, *vbidatabuffer; u8 *framebuffer1,*framebuffer2, *vbidatabuffer; + dma_addr_t dmabuf1, dmabuf2, dmavbi; int frame; /* which frame they want to capture to */ int whichfield; /* which field we just captured */ unsigned int field_count; @@ -418,8 +419,8 @@ void generic_mmap_vclose(struct vm_area_struct *vma); void grab_frame(GENERIC_CARD *card); int grab_vbi(GENERIC_CARD *card); -ssize_t proc_read(char *buffer, char **start, off_t offset, int size, int *eof, void *data); -ssize_t proc_write(struct file *file, const char *buffer, unsigned long count, void *data); +int proc_read(char *buffer, char **start, off_t offset, int size, int *eof, void *data); +int proc_write(struct file *file, const char *buffer, unsigned long count, void *data); #endif Index: generic.c =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- generic.c 24 Nov 2005 19:29:34 -0000 1.13 +++ generic.c 22 Jan 2006 14:41:46 -0000 1.14 @@ -923,7 +923,7 @@ page = kvirt_to_pa(pos); if (remap_page_range(vma,start,page,PAGE_SIZE, PAGE_SHARED)) { #else - page = page_to_pfn(vmalloc_to_page((void *)pos)); + page = page_to_pfn(virt_to_page((void *)pos)); if (remap_pfn_range(vma,start,page,PAGE_SIZE, PAGE_SHARED)) { #endif #endif @@ -2411,6 +2411,35 @@ } return 0; } +static void mark_pages2(void *res, int order) +{ + struct page *page = virt_to_page(res); + struct page *last_page = page + (1 << order); + while (page < last_page) + SetPageReserved(page++); +} + +static void unmark_pages2(void *res, int order) +{ + struct page *page = virt_to_page(res); + struct page *last_page = page + (1 << order); + while (page < last_page) + ClearPageReserved(page++); +} +static void mark_pages(void *res, unsigned sz) +{ +int pg; +for (pg = 0; PAGE_SIZE * (1 << pg) < sz; pg++); + mark_pages2(res,pg); +} + +static void unmark_pages(void *res, unsigned sz) +{ +int pg; +for (pg = 0; PAGE_SIZE * (1 << pg) < sz; pg++); +unmark_pages2(res,pg); + +} /* called by pci_module_init, and is passed any cards listed in our table generic_pci_driver */ @@ -2717,9 +2746,12 @@ card->fbmallocsize = (card->fbmallocsize + PAGE_SIZE -1) & ~(PAGE_SIZE -1); if (!disabledma) { - card->framebuffer1 = rvmalloc(card->fbmallocsize); - card->framebuffer2 = rvmalloc(card->fbmallocsize); - card->vbidatabuffer = rvmalloc(32768); + card->framebuffer1 = pci_alloc_consistent(dev,card->fbmallocsize,&card->dmabuf1); + if (card->framebuffer1 != NULL) mark_pages(card->framebuffer1,card->fbmallocsize); + card->framebuffer2 = pci_alloc_consistent(dev,card->fbmallocsize,&card->dmabuf2); + if (card->framebuffer2 != NULL) mark_pages(card->framebuffer2,card->fbmallocsize); + card->vbidatabuffer = pci_alloc_consistent(dev,32768,&card->dmavbi); + if (card->vbidatabuffer != NULL) mark_pages(card->vbidatabuffer,32768); if (card->framebuffer1 == NULL || card->framebuffer2 == NULL || card->vbidatabuffer == NULL){ printk("Could not allocate dma buffer\n"); @@ -2768,12 +2800,12 @@ if (!disabledma) { // build dma tables (dma table, from_addr, to_addr, bufsize) - build_dma_table(card->dma_table_buf0, card->buffer0,(unsigned long)card->framebuffer1, bufsize); - build_dma_table(card->dma_table_buf1, card->buffer1,(unsigned long)card->framebuffer1, bufsize); - build_dma_table(card->dma_table_buf2, card->buffer0,(unsigned long)card->framebuffer2, bufsize); - build_dma_table(card->dma_table_buf3, card->buffer1,(unsigned long)card->framebuffer2, bufsize); + build_dma_table(card->dma_table_buf0, cpu_to_le32(card->buffer0),cpu_to_le32(card->dmabuf1), bufsize); + build_dma_table(card->dma_table_buf1, cpu_to_le32(card->buffer1),cpu_to_le32(card->dmabuf1), bufsize); + build_dma_table(card->dma_table_buf2, cpu_to_le32(card->buffer0),cpu_to_le32(card->dmabuf2), bufsize); + build_dma_table(card->dma_table_buf3, cpu_to_le32(card->buffer1),cpu_to_le32(card->dmabuf2), bufsize); // build the vbi buffers while we are at it - build_dma_table(card->dma_table_vbi, card->vbibuffer,(unsigned long)card->vbidatabuffer, 32768); + build_dma_table(card->dma_table_vbi, card->vbibuffer,card->dmavbi, 32768); } /* add proc interface for this card */ @@ -3067,9 +3099,12 @@ /* remove the dma table and frame memory */ if (!disabledma) { - rvfree(card->framebuffer1,card->fbmallocsize); - rvfree(card->framebuffer2,card->fbmallocsize); - rvfree(card->vbidatabuffer,32768); + if (card->framebuffer1 != NULL) unmark_pages(card->framebuffer1,card->fbmallocsize); + pci_free_consistent(pci_dev,card->fbmallocsize,card->framebuffer1,card->dmabuf1); + if (card->framebuffer2 != NULL) unmark_pages(card->framebuffer2,card->fbmallocsize); + pci_free_consistent(pci_dev,card->fbmallocsize,card->framebuffer2,card->dmabuf2); + if (card->vbidatabuffer != NULL) unmark_pages(card->vbidatabuffer,32768); + pci_free_consistent(pci_dev,32768,card->vbidatabuffer,card->dmavbi); kfree(card->dma_table_buf0); kfree(card->dma_table_buf1); kfree(card->dma_table_buf2); Index: memory.c =================================================================== RCS file: /cvsroot/gatos/v4l2/memory.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- memory.c 9 Mar 2005 20:34:42 -0000 1.2 +++ memory.c 22 Jan 2006 14:41:48 -0000 1.3 @@ -95,7 +95,7 @@ for (i=0;bufsize >= PAGE_SIZE; i++){ ptr[i].from_addr = from_addr + i*PAGE_SIZE; - ptr[i].to_addr = kvirt_to_pa(to_addr + i*PAGE_SIZE); + ptr[i].to_addr = to_addr + i*PAGE_SIZE; ptr[i].size = PAGE_SIZE; // amount to transfer? /* ERROR NOT REQUIRED FOR MACH64 */ ptr[i].size = PAGE_SIZE | RAGE128_BM_FORCE_TO_PCI; @@ -111,7 +111,7 @@ } ptr[i].from_addr = from_addr + i*PAGE_SIZE; - ptr[i].to_addr = kvirt_to_pa(to_addr + i*PAGE_SIZE); + ptr[i].to_addr = to_addr + i*PAGE_SIZE; ptr[i].size = bufsize | MACH64_DMA_GUI_COMMAND__EOL; //make it stop /* ERROR NOT REQUIRED FOR MACH64 */ ptr[i].size = bufsize | RAGE128_BM_FORCE_TO_PCI | MACH64_DMA_GUI_COMMAND__EOL; //make it stop |
From: <gat...@li...> - 2006-01-15 18:27:20
|
Update of /cvsroot/gatos/km In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12443 Modified Files: km.c Log Message: Kernel 2.6.15 does not define some PCI_IDs that were previously defined Index: km.c =================================================================== RCS file: /cvsroot/gatos/km/km.c,v retrieving revision 1.107 retrieving revision 1.108 diff -u -d -r1.107 -r1.108 --- km.c 19 Jun 2005 07:20:16 -0000 1.107 +++ km.c 15 Jan 2006 18:27:09 -0000 1.108 @@ -1023,10 +1023,13 @@ PCI_ANY_ID, PCI_ANY_ID, 0, 0, HARDWARE_RAGE128}, #endif /* Radeons */ + /* Kernel 2.6.15 does not define these */ +#ifdef PCI_DEVICE_ID_ATI_RADEON_LE {PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RADEON_LE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, HARDWARE_RADEON}, {PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RADEON_LF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, HARDWARE_RADEON}, +#endif {PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RADEON_N1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, HARDWARE_RADEON}, {PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RADEON_N2, |
From: <gat...@li...> - 2005-11-24 19:29:42
|
Update of /cvsroot/gatos/v4l2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4928 Modified Files: generic.c generic.h rage128.c Log Message: added "forceromaddr" module option to force the rom address to 0x000C0000 changed tuner input name to Television ( Make sure you update your ~.xawtv config file ) added missing header file (linux/version.h) so it will compile on 2.6.14 kernel Eric Index: generic.h =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- generic.h 17 Feb 2005 17:22:58 -0000 1.4 +++ generic.h 24 Nov 2005 19:29:34 -0000 1.5 @@ -21,6 +21,7 @@ #include <linux/pci.h> #include <linux/videodev.h> +#include <linux/version.h> #define GENERIC_VERSION_CODE KERNEL_VERSION(0,0,1) #define MAX_CARDS 10 Index: generic.c =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- generic.c 6 Oct 2005 13:03:31 -0000 1.12 +++ generic.c 24 Nov 2005 19:29:34 -0000 1.13 @@ -64,6 +64,9 @@ int halfwidth=0; MODULE_PARM(halfwidth, "i"); MODULE_PARM_DESC(halfwidth, "cut max width in half (640 becomes 320)"); +int forceromaddr=0; +MODULE_PARM(forceromaddr, "i"); +MODULE_PARM_DESC(forceromaddr, "Force romaddr to 0x000C0000"); int tunertype=-1; MODULE_PARM(tunertype, "i"); MODULE_PARM_DESC(tunertype, "Tuner type, 0=pal, 1=ntsc, 2=secam, 3=pal nc, 4=pal m, 5= pal n, 6=ntsc jp"); @@ -250,7 +253,9 @@ /* STATIC DATA */ /* pass this struct to pci_module_init and it will call generic_probe -on any cards that match generic_pci_tbl */ +on any cards that match generic_pci_tbl +Should i bother adding save_state,suspend,resume,enable_wake ? +*/ static struct pci_driver generic_pci_driver = { name: "genericv4l", id_table: generic_pci_tbl, @@ -1724,7 +1729,7 @@ // if (v->tuner) /* Only tuner 0 */ // return -EINVAL; - strcpy(v->name, "tuner"); + strcpy(v->name, "Television"); v->rangelow = 0; v->rangehigh = 0x7FFFFFFF; v->flags = VIDEO_TUNER_PAL|VIDEO_TUNER_NTSC|VIDEO_TUNER_SECAM; @@ -1768,7 +1773,7 @@ v->type = VIDEO_TYPE_CAMERA; v->norm = card->tvnorm; if (channel == generic_tvcards[card->type].tuner) { - strcpy(v->name,"tuner"); + strcpy(v->name,"Television"); v->flags|=VIDEO_VC_TUNER; v->type=VIDEO_TYPE_TV; v->tuners=1; @@ -1809,7 +1814,7 @@ dprintk(2,"card(%d) VIDIOCGAUDIO called\n",card->cardnum); memset(v,0,sizeof(*v)); - strcpy(v->name,"tuner"); + strcpy(v->name,"Television"); v->flags = VIDEO_AUDIO_MUTABLE; v->mode = VIDEO_SOUND_STEREO; @@ -2259,7 +2264,7 @@ /* you never know, they may make one without a tuner :) */ if (i->index == generic_tvcards[card->type].tuner) { - sprintf(i->name, "tuner"); + sprintf(i->name, "Television"); i->type = V4L2_INPUT_TYPE_TUNER; i->tuner = 0; } else if (i->index == generic_tvcards[card->type].svhs) { @@ -2317,7 +2322,7 @@ down_interruptible(&card->lock); memset(t,0,sizeof(*t)); - strncpy(t->name, "tuner", sizeof(t->name)); + strncpy(t->name, "Television", sizeof(t->name)); t->type = V4L2_TUNER_ANALOG_TV; t->rangehigh = 0xffffffffUL; if (card->audio.deviceid == TDA9850) { @@ -2502,9 +2507,10 @@ printk(KERN_INFO "IO at 0x%08lx 0x%08lx\n", pci_resource_start(dev, 1), pci_resource_end(dev, 1)); printk(KERN_INFO "mmr at 0x%08lx 0x%08lx\n", pci_resource_start(dev, 2), pci_resource_end(dev, 2)); romaddr = pci_resource_start(dev, PCI_ROM_RESOURCE); - if (romaddr == 0){ + if (romaddr == 0 || forceromaddr){ romaddr = 0x000C0000; //primary card } + printk(KERN_INFO "bios at 0x%08x 0x%08lx\n", romaddr, pci_resource_end(dev, PCI_ROM_RESOURCE)); /* map the cards framebuffer/capturebuffer/bios to our generic_card struct @@ -2534,7 +2540,7 @@ /* force the rage128 to let us read the bios... not sure why this works but it does (found by trial and error) */ if (*(biosptr) == 0x0 || *(biosptr) == 0xFF) { - printk (KERN_INFO "ERROR reading from bios, attempting to fix!\n"); + printk (KERN_INFO "ERROR reading from bios, attempting to fix! (if it still fails try forceromaddr=1\n"); R128_I2C_CNTL_1 = 0x0; iounmap(card->atifb); card->atifb=ioremap(pci_resource_start(dev, 0),pci_resource_len(dev, 0)); @@ -3009,7 +3015,7 @@ proc_dir->owner = THIS_MODULE; //have the pci routines search for and initialize cards for us - retval = pci_module_init(&generic_pci_driver); + retval = pci_register_driver(&generic_pci_driver); /* enable our irq handler */ tasklet_enable(&generic_tasklet); @@ -3057,6 +3063,7 @@ /* remove pointer back to our struct */ pci_set_drvdata(pci_dev, NULL); +// pci_disable_device(pci_dev); /* remove the dma table and frame memory */ if (!disabledma) { Index: rage128.c =================================================================== RCS file: /cvsroot/gatos/v4l2/rage128.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- rage128.c 15 Mar 2005 21:27:40 -0000 1.4 +++ rage128.c 24 Nov 2005 19:29:34 -0000 1.5 @@ -55,7 +55,8 @@ printk(KERN_INFO "videoram is %d\n",card->videoram); /* not sure what this does */ - R128_VIDEOMUX_CNTL=0x50783; + //R128_VIDEOMUX_CNTL=0x50783; + R128_VIDEOMUX_CNTL=0x50781; R128_CAPTURE_PORT_MODE_CNTL = 0; |
From: <gat...@li...> - 2005-11-12 13:23:48
|
Update of /cvsroot/gatos/avview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10604 Modified Files: INSTALL aclocal.m4 Log Message: update INSTALL Index: aclocal.m4 =================================================================== RCS file: /cvsroot/gatos/avview/aclocal.m4,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- aclocal.m4 26 Aug 2004 00:24:33 -0000 1.6 +++ aclocal.m4 12 Nov 2005 13:23:40 -0000 1.7 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.9.1 -*- Autoconf -*- +# generated automatically by aclocal 1.7.9 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -11,9 +11,132 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. [...1166 lines suppressed...] - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar <conftest.tar]) - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi -done -rm -rf conftest.dir +# serial 6 -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) Index: INSTALL =================================================================== RCS file: /cvsroot/gatos/avview/INSTALL,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- INSTALL 19 Oct 2004 16:58:53 -0000 1.12 +++ INSTALL 12 Nov 2005 13:23:40 -0000 1.13 @@ -19,6 +19,7 @@ If you are using code from CVS you need to run these commands first: + aclocal autoconf autoheader automake |
From: <gat...@li...> - 2005-11-12 11:00:47
|
Update of /cvsroot/gatos/avview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19236 Modified Files: configure.in lirc.c Log Message: More user friendly error messages when LIRC initialization fails Index: lirc.c =================================================================== RCS file: /cvsroot/gatos/avview/lirc.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- lirc.c 26 Aug 2004 00:26:02 -0000 1.1 +++ lirc.c 12 Nov 2005 11:00:38 -0000 1.2 @@ -125,7 +125,7 @@ lirc_socket=lirc_init("avview",1); if(lirc_socket == -1) { - fprintf(stderr, "Can't initialize LIRC: error opening socket.\n"); + fprintf(stderr, "Failed to initialize LIRC, remote control support disabled.\n"); return NULL; } @@ -138,8 +138,8 @@ fcntl(lirc_socket,F_SETOWN,getpid()); flags=fcntl(lirc_socket,F_GETFL,0); if(flags == -1) { - fprintf(stderr, "Can't initialize LIRC:" - "error occured while setting-up the socket.\n"); + fprintf(stderr, "Failed initialize LIRC socket, " + "remote control support disabled.\n"); lirc_deinit(); return NULL; } Index: configure.in =================================================================== RCS file: /cvsroot/gatos/avview/configure.in,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- configure.in 17 Dec 2004 12:40:31 -0000 1.61 +++ configure.in 12 Nov 2005 11:00:37 -0000 1.62 @@ -4,7 +4,7 @@ # Note to self: always bump version number when there are changes # in setup window or avview_shell # -AC_INIT([AVview], [0.80.6], [gat...@li...]) +AC_INIT([AVview], [0.80.7], [gat...@li...]) # # For now I'll be happier without NEWS and Changelog files. # |
From: <gat...@li...> - 2005-10-06 13:03:54
|
Update of /cvsroot/gatos/v4l2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14620 Modified Files: generic.c Log Message: adds halfwidth option to help cut the buffer size. Index: generic.c =================================================================== RCS file: /cvsroot/gatos/v4l2/generic.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- generic.c 4 Jul 2005 00:22:22 -0000 1.11 +++ generic.c 6 Oct 2005 13:03:31 -0000 1.12 @@ -61,6 +61,9 @@ int disableinterlace=0; MODULE_PARM(disableinterlace, "i"); MODULE_PARM_DESC(disableinterlace, "disable interlace modes"); +int halfwidth=0; +MODULE_PARM(halfwidth, "i"); +MODULE_PARM_DESC(halfwidth, "cut max width in half (640 becomes 320)"); int tunertype=-1; MODULE_PARM(tunertype, "i"); MODULE_PARM_DESC(tunertype, "Tuner type, 0=pal, 1=ntsc, 2=secam, 3=pal nc, 4=pal m, 5= pal n, 6=ntsc jp"); @@ -1500,7 +1503,8 @@ { struct video_picture *pic = arg; - if (pic->palette != VIDEO_PALETTE_YUV422){ + if (pic->palette != VIDEO_PALETTE_YUV422 && pic->palette != VIDEO_PALETTE_YUYV){ +dprintk(1,"card(%d) VIDIOCGPICT call failed %d != %d\n",card->cardnum,pic->palette, VIDEO_PALETTE_YUV422); return -EAGAIN; } @@ -1625,7 +1629,7 @@ // set format width height here and start capture //we only support yuyv packed -if (vm->format != VIDEO_PALETTE_YUV422){ +if (vm->format != VIDEO_PALETTE_YUV422 && vm->format != VIDEO_PALETTE_YUYV){ up(&fh->cap.lock); return -EINVAL; } @@ -2591,7 +2595,6 @@ return -ENODEV; } } - board_setaudio(card); bt829_setmux(card); /* set the mux */ @@ -2993,6 +2996,11 @@ generic_tvnorms[i].sheight /= 2; } } + if (halfwidth){ + for (i = 0; i < GENERIC_TVNORMS; i++){ + generic_tvnorms[i].swidth /= 2; + } + } /* add proc interface */ proc_dir = proc_mkdir("genericv4l", NULL); if (!proc_dir) { |