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) |
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
|
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
|
9
|
10
|
11
|
12
|
13
|
14
|
15
|
|
16
|
17
|
18
|
19
|
20
|
21
|
22
|
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
|
30
(1) |
31
|
|
|
|
|
|
|
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; } |