From nobody@FreeBSD.org  Mon May 15 14:48:56 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 29B7416A74E
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 May 2006 14:48:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6A85043D5D
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 May 2006 14:48:55 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k4FEmsuF090783
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 May 2006 14:48:54 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k4FEmskZ090781;
	Mon, 15 May 2006 14:48:54 GMT
	(envelope-from nobody)
Message-Id: <200605151448.k4FEmskZ090781@www.freebsd.org>
Date: Mon, 15 May 2006 14:48:54 GMT
From: Jindrich Fucik <fulda@seznam.cz>
To: freebsd-gnats-submit@FreeBSD.org
Subject: graphics/spcaview - freebsd port not working with PAC207 cameras
X-Send-Pr-Version: www-2.3

>Number:         97302
>Category:       ports
>Synopsis:       graphics/spcaview - freebsd port not working with PAC207 cameras
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 15 14:50:27 GMT 2006
>Closed-Date:    Wed Jul 05 14:14:15 GMT 2006
>Last-Modified:  Wed Jul 05 14:14:15 GMT 2006
>Originator:     Jindrich Fucik
>Release:        6.1-STABLE
>Organization:
-
>Environment:
FreeBSD evzen.hopto.org 6.1-STABLE FreeBSD 6.1-STABLE #0: Fri May 12 09:38:34 CEST 2006     root@evzen.hopto.org:/usr/src/sys/i386/compile/evzen  i386

>Description:
there are problem with recognizing begin of frame from BRIDGE_PAC207 cameras.
>How-To-Repeat:
run spcaview with PAC207 camera
>Fix:
#### less spca5share.c ####
#### sorry I have no diff, I try to create. ####

         case BRIDGE_PAC207:
//       case 0:
          {
            iPix = 0;
            sof = 0;
            j = 0;
            p = 0;
            if (datalength < 6 )
                        continue;
                else
                {
                    for (p = 0; p < datalength-6; p++)
                      {
                        if ((cdata[0 + p] == 0xFF) && (cdata[1 + p] == 0xFF)
                            && (cdata[2 + p] == 0x00)
                            && (cdata[3 + p] == 0xFF)
                            && (cdata[4 + p] == 0x96)
                            )
                          {
                                    sof = 1;
                                    break;
                          }
                      }

                    if (sof)
                      {
                        //printf("sof p %d datalength %d\n",p,datalength);
                        sequenceNumber = 0;
// JFU patch
                        if (frame->scanstate == STATE_SCANNING)
                         {
                            frame->highwater = frame->data;
                            frame->last_packet = -1;
                            frame->totlength = 0;
                            memcpy (frame->highwater, cdata+p,datalength-p);
                            frame->highwater += (datalength-p);
                            totlen = (datalength-p);
                         }
// JFU patch
                        // copy the end of data to the current frame
                        memcpy (frame->highwater, cdata,p);
                        frame->highwater += p;
                        totlen += p;
                        spca50x->header_len = p ; //copy to the nextframe start
at p
                       PDEBUG (5,
                                "Pixartcam header packet found, %d datalength %d
 totlength %d!!",
                                p, datalength, totlen);
                      }
                    else
                    {
                        /* drop packet */
                        sequenceNumber++;
                    }

                }
          }
          break;

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Mon May 15 14:53:29 UTC 2006 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=97302 
State-Changed-From-To: feedback->closed 
State-Changed-By: arved 
State-Changed-When: Wed Jul 5 14:13:16 UTC 2006 
State-Changed-Why:  
If i understood correctly, your problem has been addressed by 0.6a 
(PR 98862).  
If i am wrong please follow up. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=97302 
>Unformatted:
