Web lists-archives.org

Re: [Spca50x-devs] Unable to see picture using Phillips SPC200NC webcam




Hi,

Thanks for your prompt response.  The kernel version I'm using is
2.6.15.4.  I have a different OHCI driver, because this is a PCMCIA
card.  Hence I cannot use the standard OHCI dirver, which is PCI-based.
Now the only difference between these two drivers is that the one I am
using sends an interrupt earlier than the standard PCI-based driver i.e.
an interrupt is sent before 1ms in my case.

Due to this difference, I added a delay of 1 ms between two
spca5xxRegReads and between one spca5xxRegRead and spca5xxRegWrite in
the functions, zcxx_i2cRead and zcxx_i2cWrite.  After making this
change, the spca5xx driver behaves properly, by detecting the correct
sensor and retrieving the correct capablities of the webcam, and I am
able to see the picture using spcaview.  Following is the code snippet
of the same.

static __u16 zcxx_i2cRead(struct usb_device *dev, __u8 reg)
{
    __u8 retbyte = 0;
    __u8 retval[] = { 0, 0 };

    spca5xxRegWrite(dev, 0xa0, reg, 0x92, NULL, 0);
    spca5xxRegWrite(dev, 0xa0, 0x02, 0x90, NULL, 0);	// <-read
command
    wait_ms(1); // 1 ms delay added
    spca5xxRegRead(dev, 0xa1, 0x01, 0x0091, &retbyte, 1);	// read
status
    wait_ms(1); // 1 ms delay added	
    spca5xxRegRead(dev, 0xa1, 0x01, 0x0095, &retval[0], 1);	// read
Lowbyte
    wait_ms(1); // 1 ms delay added    
    spca5xxRegRead(dev, 0xa1, 0x01, 0x0096, &retval[1], 1);	// read
Hightbyte
    return ((retval[1] << 8) | retval[0]);
}

static __u8 zcxx_i2cWrite(struct usb_device *dev, __u8 reg, __u8 valL,
			  __u8 valH)
{
    __u8 retbyte = 0;
    spca5xxRegWrite(dev, 0xa0, reg, 0x92, NULL, 0);
    spca5xxRegWrite(dev, 0xa0, valL, 0x93, NULL, 0);
    spca5xxRegWrite(dev, 0xa0, valH, 0x94, NULL, 0);
    spca5xxRegWrite(dev, 0xa0, 0x01, 0x90, NULL, 0);	// <-write
command
    wait_ms(1); // 1 ms delay added
    spca5xxRegRead(dev, 0xa1, 0x01, 0x0091, &retbyte, 1);	// read
status
    return (retbyte);
}

Does this webcam require some kind of delay for between register
read/write operations?

Regards,
-Srivas

-----Original Message-----
From: Thomas Kaiser [mailto:spca5xx@xxxxxxxxxxxxxxx]
Sent: Monday, July 24, 2006 3:28 PM
To: Srivas Ramgopal (WT01 - Semiconductors & Consumer Electronics)
Cc: spca50x-devs@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Spca50x-devs] FW: Unable to see picture using Phillips
SPC200NC webcam

srivas.ramgopal@xxxxxxxxx wrote:
>  
>  Hi,
>  
> I am having a PCMCIA card, with USB functionality.  When I connect a 
> Phillips SPC200NC camera to this card on a Acer Laptop, the device 
> gets detected.  But I am unable to view picture using "spcaview"
application.
>  
> I am using the spca5xx-20040402 version of the spca5xx driver.  when I

> connect the webcam to my card, I get the following messages.  We get 
> the sensor value as UNKNOW_0.
>  
> Jul 22 15:12:33 localhost kernel: usb 4-1: new full speed USB device 
> using ohci-hcd and address 2 Jul 22 15:13:16 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/spca5xx.c: USB SPCA5XX camera 
> found.Type Philips SPC200NC Vimicro PAS106 Jul 22 15:13:16 localhost
> kernel:
> /root/spca5xx-20060402/drivers/usb/spca5xx.c: [spca5xx_probe:8301] 
> Camera type JPEG Jul 22 15:13:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zc3xx_config:470] Find 
> Sensor UNKNOW_0 force Tas5130 Jul 22 15:18:00 localhost kernel: usb
4-1:
> new full speed USB device using localhost-hcd and address 3 Jul 22
> 15:39:16 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/spca5xx.c: USB SPCA5XX camera 
> found.Type Philips SPC200NC Vimicro PAS106 Jul 22 15:39:16 localhost
> kernel:
> /root/spca5xx-20060402/drivers/usb/spca5xx.c: [spca5xx_probe:8301] 
> Camera type JPEG Jul 22 15:39:16 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/spca5xx.c: [spca50x_configure:5306]

> video_register_device succeeded Jul 22 15:39:16 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:151] 
> sensor answer1  0 Jul 22 15:39:16 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:234] 
> check sensor id  0x0000 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:242] 
> sensor answervga  0 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:234] 
> check sensor id  0x0000 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:242] 
> sensor answervga  0 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:234] 
> check sensor id  0x0000 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:242] 
> sensor answervga  0 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:242] 
> sensor answervga  0 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:234] 
> check sensor id  0x0000 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:242] 
> sensor answervga  0 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:234] 
> check sensor id  0x0000 Jul 22 15:39:17 localhost
 kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:242] 
> sensor answervga  0 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:234] 
> check sensor id  0x0000 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:242] 
> sensor answervga  0 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:234] 
> check sensor id  0x0000 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:242] 
> sensor answervga  0 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zcxx_probeSensor:276] 
> sensor 3w Vga ??? 0x4400 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/zc3xx.h: [zc3xx_config:470] Find 
> Sensor UNKNOW_0 force Tas5130 Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/spca5xx.c:
> [spca50x_set_packet_size:1642] set real packet size: 0, alt=0 Jul 22
> 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/spca5xx.c:
> [spca50x_configure_sensor:5190] starting configuration Jul 22 15:39:17

> localhost kernel:
> /root/spca5xx-20060402/drivers/usb/spca5xx.c:
> [spca5xx_getcapability:2198] maxw 640 maxh 480 minw 176 minh 144 Jul
> 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/spca5xx.c: [spca50x_configure:5452]

> Spca5xx Configure done !!
> Jul 22 15:39:17 localhost kernel:
> /root/spca5xx-20060402/drivers/usb/spca5xx.c: [spca5xx_probe:8335] 
> setting video device = c1969e00, spca50x = c79b4000 Jul 22 15:39:17 
> localhost kernel: usbcore: registered new driver spca5xx Jul 22
15:39:17 
> localhost kernel:
> /root/spca5xx-20060402/drivers/usb/spca5xx.c: spca5xx driver 00.57.11 
> registered
>  
>  
> Has anyone faced this issue before?
>  
> -Srivas
> 
Hello

Do you have the same problem with the newest version?
And what kernel version do you use?

Regards, Thomas

--
http://www.kaiser-linux.li

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Spca50x-devs mailing list
Spca50x-devs@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/spca50x-devs