More information in case someone has an idea. The frame grabber is using the BT878 chip, and I noticed that bttv detects it and start with BT878. However, i2c start for BT848. I am not sure if it matters. Here is an output of my /var/log/messages Jun 3 12:39:07 srslin2 kernel: i2c-core.o: i2c core module Jun 3 12:39:07 srslin2 kernel: i2c-algo-bit.o: i2c bit algorithm module Jun 3 12:39:07 srslin2 kernel: Linux video capture interface: v1.00 Jun 3 12:39:07 srslin2 kernel: bttv: driver version 0.8.40 loaded [v4l/v4l2] Jun 3 12:39:07 srslin2 kernel: bttv: using 8 buffers with 2080k (520 pages) each for capture Jun 3 12:39:07 srslin2 kernel: bttv: Host bridge is Intel Corp. 82850 850 (Tehama) Chipset Host Bridge (MCH) Jun 3 12:39:07 srslin2 kernel: bttv: Bt8xx card found (0). Jun 3 12:39:07 srslin2 kernel: bttv0: Bt878 (rev 17) at 02:09.0, irq: 18, latency: 64, mmio: 0xf8001000 Jun 3 12:39:07 srslin2 kernel: bttv0: subsystem: 6000:0611 (UNKNOWN) Jun 3 12:39:07 srslin2 kernel: bttv0: using: BT878(Sensoray 311) [card=73,insmod option] Jun 3 12:39:07 srslin2 kernel: i2c-core.o: adapter bt848 #0 registered as adapter 0. Jun 3 12:39:07 srslin2 kernel: bttv0: i2c: checking for MSP34xx @ 0x80... not found Jun 3 12:39:07 srslin2 kernel: bttv0: i2c: checking for TDA9875 @ 0xb0... not found Jun 3 12:39:07 srslin2 kernel: bttv0: i2c: checking for TDA7432 @ 0x8a... not found Jun 3 12:39:07 srslin2 kernel: bttv0: registered device video0 Jun 3 12:39:07 srslin2 kernel: bttv0: registered device vbi0 Jun 3 12:39:07 srslin2 kernel: bttv0: amux: mode=128 audio=128 signal=no mux=4/4 irq=no Jun 3 12:39:07 srslin2 kernel: bttv0: amux: mode=2 audio=130 signal=no mux=4/4 irq=no -----Original Message----- From: video4linux-list-admin@xxxxxxxxxx [mailto:video4linux-list-admin@xxxxxxxxxx]On Behalf Of Lionel G. Bouchet Sent: Monday, June 03, 2002 10:11 AM To: video4linux-list@xxxxxxxxxx Subject: RE: Problem with Streaming mode for frame grabbing: Linux crashing! Some more information concerning this problem: It seems that I can send the VIDIOC_STREAMON signal to the card, but after that, any type of access (ioctl or fclose) to the file descriptor corresponding to the video device will freeze the kernel. I would definitly appreciate any help on this. Lionel -----Original Message----- From: video4linux-list-admin@xxxxxxxxxx [mailto:video4linux-list-admin@xxxxxxxxxx]On Behalf Of Lionel Bouchet Sent: Sunday, June 02, 2002 2:21 PM To: video4linux-list@xxxxxxxxxx Subject: Problem with Streaming mode for frame grabbing: Linux crashing! I am trying to grab images from the SenSorray 611 video grabber card under Linux. I installed bttv-0.8.40, V4L2, and the latest patches for the kernel (2.4.19-pre8),. I first tested with xawtv, and the PREVIEW and read mode are working fine. I then wrote a program using the read() capture mode to grab the images and I was able to grab 640x480 at 10 frame per second. I then modified my program to use the streaming mode (I verified that the card had V4L2_FLAG_STREAMING on). I am able to initialize and map the memory, but whenever I turn the streaming on (ioctl(vfd, VIDIOC_STREAMON,&VidBuffer.type)) linux just freeze and does not answer to anything even a ping from the outside. I copied parts of my simple program below. Does anybody have experienced this? Is it a bug due to the video card, bttv, V4L2, or my program? Any help would be GREATLY appreciated. Lionel Bouchet /**/ /* Opening the video device */ /**/ vfd = open(devname,O_RDWR); if (vfd <= 0) { fprintf(stderr,"sorry, no such device %s\n",devname); exit(1); } /**/ /* Verifying the capture and Streaming capabilities */ /**/ if (ioctl(vfd, VIDIOC_QUERYCAP, &VidCapability) < 0) { perror("Cannot query Video capabilities"); close(vfd); exit(1); } if (VidCapability.type != V4L2_TYPE_CAPTURE) { fprintf(stderr, "Device %s is not a video capture device.\n",devname); close(vfd); exit(1); } if (!(VidCapability.flags & V4L2_FLAG_STREAMING)) { fprintf(stderr, "Device %s doesn't support Streaming.\n", devname); close(vfd); exit(1); } /**/ /* Setting format for capture */ /**/ /* set input */ i = 1; /* Composite 1 */ if ( ioctl(vfd, VIDIOC_S_INPUT, &i) == -1 ) { perror("VIDIOC_S_INPUT"); close(vfd); exit(1); } /* set up capture image format */ /* query settings to init struct */ if (ioctl(vfd,VIDIOC_G_FMT,&fmt) < 0) {; perror("error with VIDIOC_G_FMT"); close(vfd); exit(1); } fmt.type = V4L2_BUF_TYPE_CAPTURE; /* THis is the capture device format */ fmt.fmt.pix.flags = V4L2_FMT_FLAG_INTERLACED ; fmt.fmt.pix.width = 640; fmt.fmt.pix.height = 480; fmt.fmt.pix.depth = 8; fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_GREY; if ( ioctl(vfd,VIDIOC_S_FMT,&fmt) < 0) { perror("error with VIDIOC_S_FMT"); close(vfd); exit(1); } /*Verifying settings*/ if ( ioctl(vfd, VIDIOC_G_FMT, &fmt1) == -1 ) { perror("VIDIOC_G_FMT"); close(vfd); exit(1); } printf("after get\n"); print_fmtpix(&fmt1); /**/ /* allocate capture buffers */ /**/ BufferCount=1; ReqBuff.count=BufferCount; ReqBuff.type=V4L2_BUF_TYPE_CAPTURE; if (ioctl(vfd,VIDIOC_REQBUFS,&ReqBuff) ) { perror("error withVIDIOC_REQBUFS "); close(vfd); exit(1); } if ( (ReqBuff.count != BufferCount) || (ReqBuff.type != V4L2_BUF_TYPE_CAPTURE) ) { fprintf(stderr, "VIDIOC_REQBUFS: got not what wanted!\n"); close(vfd); exit(1); } VidBuffer.index=0; VidBuffer.type=ReqBuff.type; if (ioctl(vfd,VIDIOC_QUERYBUF,&VidBuffer) < 0) { perror("error with VIDIOC_QUERYBUF"); close(vfd); exit(1); } /**memory map buffers **/ VideoImage = mmap(NULL,VidBuffer.length,PROT_READ | PROT_WRITE ,MAP_SHARED,vfd,VidBuffer.offset); if (VideoImage == MAP_FAILED) { perror("Error mapping memory\n"); fprintf(stderr,"ERRNO %d\n",errno); fprintf(stderr,"MMAP error %d %d %d %d %d %d \n",EBADF, EACCES, EINVAL, ETXTBSY, EAGAIN, ENOMEM); close(vfd); exit(1); } sleep(6); fprintf(stderr,"Trying VIDIOC_STREAMON\n"); fflush(stderr); /** Starting streaming video **/ if (ioctl(vfd, VIDIOC_STREAMON,&VidBuffer.type) < 0 ) { perror("error with VIDIOC_STREAMON"); close(vfd); exit(1); } fprintf(stderr,"succeeded VIDIOC_STREAMON\n"); fflush(stderr); sleep(6); fprintf(stderr,"doing VIDIOC_STREAMOFF\n"); fflush(stderr); close(vfd); exit(1); _______________________________________________ Video4linux-list mailing list Video4linux-list@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/video4linux-list _______________________________________________ Video4linux-list mailing list Video4linux-list@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/video4linux-list