[Tech] errore compilazione driver gspca

unsenepopiu@tin.it unsenepopiu@tin.it
Mar 7 Apr 2009 16:06:45 CEST


On Tue, 07 Apr 2009 13:48:12 +0200
Giancarlo Martini <giancarlomartini@gmail.com> wrote:

> unsenepopiu@tin.it wrote:
> > qualcuno puņ provare a compilare il driver x webcam gspca su tinycorelinux?
> > x favore che a me da errore:
> > 
> > make -C /lib/modules/`uname -r`/build SUBDIRS=/home/tc/gspcav1-20071224 CC=cc modules
> > make[1]: Entering directory `/usr/local/src/linux-headers-2.6.26'
> >   CC [M]  /home/tc/gspcav1-20071224/gspca_core.o
> > In file included from /home/tc/gspcav1-20071224/gspca_core.c:848:
> > /home/tc/gspcav1-20071224/Sunplus/spca506.h: In function 'spca506_SetNormeInput':
> > /home/tc/gspcav1-20071224/Sunplus/spca506.h:120: error: 'VIDEO_MODE_NTSC' undeclared (first use in this function)
> sembra un define non definito in spca506.h
> Prova a postare cosa c'č da linea 100 a 140 del file spca506.h.
> Ciao

quasi all'inizio del file spca506.h
/* define from v4l */
//#define VIDEO_MODE_PAL                0
//#define VIDEO_MODE_NTSC               1
//#define VIDEO_MODE_SECAM              2
//#define VIDEO_MODE_AUTO               3

scommentandole vanno via gli errori ma rimangono gli altri:

/mnt/hda4/jls_legalize/gspca/gspcav1-20071224/gspca_core.c: In function 'spca5xx_get_depth':
/mnt/hda4/jls_legalize/gspca/gspcav1-20071224/gspca_core.c:1093: error: 'VIDEO_PALETTE_RGB565' undeclared (first use in this function)
/mnt/hda4/jls_legalize/gspca/gspcav1-20071224/gspca_core.c:1093: error: (Each undeclared identifier is reported only once
/mnt/hda4/jls_legalize/gspca/gspcav1-20071224/gspca_core.c:1093: error: for each function it appears in.)
/mnt/hda4/jls_legalize/gspca/gspcav1-20071224/gspca_core.c:1095: error: 'VIDEO_PALETTE_RGB24' undeclared (first use in this function)
/mnt/hda4/jls_legalize/gspca/gspcav1-20071224/gspca_core.c:1101: error: 'VIDEO_PALETTE_YUV420P' undeclared (first use in this function)
/mnt/hda4/jls_legalize/gspca/gspcav1-20071224/gspca_core.c:1104: error: 'VIDEO_PALETTE_RGB32' undeclared (first use in this function)
/mnt/hda4/jls_legalize/gspca/gspcav1-20071224/gspca_core.c: In function 'v4l_to_spca5xx':
/mnt/hda4/jls_legalize/gspca/gspcav1-20071224/gspca_core.c:1291: error: 'VIDEO_PALETTE_RGB565' undeclared (first use in this function)
/mnt/hda4/jls_legalize/gspca/gspcav1-20071224/gspca_core.c:1293: error: 'VIDEO_PALETTE_RGB24' undeclared (first use in this function)
/mnt/hda4/jls_legalize/gspca/gspcav1-20071224/gspca_core.c:1295: error: 'VIDEO_PALETTE_RGB32' undeclared (first use in this function)
/mnt/hda4/jls_legalize/gspca/gspcav1-20071224/gspca_core.c:1297: error: 'VIDEO_PALETTE_YUV422P' undeclared (first use in this function)
/mnt/hda4/jls_legalize/gspca/gspcav1-20071224/gspca_core.c:1299: error: 'VIDEO_PALETTE_YUV420P' undeclared (first use in this function)




dalla riga 100 circa: 100 a 140

static void spca506_SetNormeInput(struct usb_spca50x *spca50x, __u16 norme,
				  __u16 channel)
{
    __u8 setbit0 = 0x00;
    __u8 setbit1 = 0x00;
    __u8 videomask = 0x00;
    PDEBUG(3, "************ Open Set Norme  **************");
    spca506_Initi2c(spca50x);
    /* NTSC bit0 -> 1(525 l) PAL SECAM bit0 -> 0 (625 l) */
    /* Composite channel bit1 -> 1 S-video bit 1 -> 0 */
    /* and exclude SAA7113 reserved channel set default 0 otherwise */
    if (norme == VIDEO_MODE_NTSC)
	setbit0 = 0x01;
    if ((channel == 4) || (channel == 5) || (channel > 9))
	channel = 0;
    if (channel < 4)
	setbit1 = 0x02;
    videomask = (0x48 | setbit0 | setbit1);
    spca5xxRegWrite(spca50x->dev, 0x08, videomask, 0x0000, NULL, 0);
    spca506_WriteI2c(spca50x, (0xc0 | (channel & 0x0F)), 0x02);

    switch (norme) {
    case VIDEO_MODE_PAL:
	spca506_WriteI2c(spca50x, 0x03, 0x0e);	//Chrominance Control PAL BGHIV
	break;
    case VIDEO_MODE_NTSC:
	spca506_WriteI2c(spca50x, 0x33, 0x0e);	//Chrominance Control NTSC N
	break;
    case VIDEO_MODE_SECAM:
	spca506_WriteI2c(spca50x, 0x53, 0x0e);	//Chrominance Control SECAM
	break;
    default:
	spca506_WriteI2c(spca50x, 0x03, 0x0e);	//Chrominance Control PAL BGHIV
	break;
    }
    spca50x->norme = norme;
    spca50x->channel = channel;
    PDEBUG(3, "Set Video Byte to 0x%2X ", videomask);
    PDEBUG(3, "Set Norme : %d Channel %d ", norme, channel);
    PDEBUG(3, "************ Close SetNorme  **************");


}



Maggiori informazioni sulla lista flug-tech