Re: [RFCv2 PATCH 01/12] stk-webcam: the initial hflip and vflip setup was the wrong way around

2013-02-14 Thread Arvydas Sidorenko
On Thu, Feb 14, 2013 at 8:12 AM, Hans Verkuil hverk...@xs4all.nl wrote:

 Arvydas, can you please test this? I'd like to do a git pull tomorrow and I'd
 like to know if the upside-down changes are now OK.

 Thanks,


Hi Hans

Everything is working fine now - dmesg is clean, LED lights on and off
when needed, viewport angle is correct.

Thanks for the fixes.

Arvydas
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFCv2 PATCH 01/12] stk-webcam: the initial hflip and vflip setup was the wrong way around

2013-02-11 Thread Arvydas Sidorenko
On Mon, Feb 11, 2013 at 2:21 PM, Hans Verkuil hverk...@xs4all.nl wrote:

 That doesn't make sense either. Arvydas, it worked fine for you before, right?
 That is, if you use e.g. v3.8-rc7 then your picture is the right side up.


It is upside down using any v3.7.x or v3.8-rc7. I didn't pay attention
in the older versions, but I am aware of this issue since pre-v3.

On Mon, Feb 11, 2013 at 2:41 PM, Hans de Goede hdego...@redhat.com wrote:

 Arvydas, can you please run sudo dmidecode  dmi.log, and send me or
 Hans V. the generated dmi.log file? Then we can add your laptop to the
 upside-down model list.


$ sudo dmidecode
# dmidecode 2.11
SMBIOS 2.4 present.
37 structures occupying 1499 bytes.
Table at 0x000E5020.

Handle 0x, DMI type 0, 24 bytes
BIOS Information
Vendor: American Megatrends Inc.
Version: 305
Release Date: 02/15/2007
Address: 0xF
Runtime Size: 64 kB
ROM Size: 512 kB
Characteristics:
ISA is supported
PCI is supported
PC Card (PCMCIA) is supported
PNP is supported
BIOS is upgradeable
BIOS shadowing is allowed
ESCD support is available
Boot from CD is supported
Selectable boot is supported
EDD is supported
5.25/1.2 MB floppy services are supported (int 13h)
3.5/720 kB floppy services are supported (int 13h)
3.5/2.88 MB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Printer services are supported (int 17h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
Smart battery is supported
BIOS boot specification is supported
Function key-initiated network boot is supported
Targeted content distribution is supported
BIOS Revision: 1.124
Firmware Revision: 168.153

Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: ASUSTeK Computer Inc.
Product Name: F3JC
Version: 1.0
Serial Number: SSN12345678901234567
UUID: F13181DB-43CD-9AAD-CE00-0018F338B599
Wake-up Type: Power Switch
SKU Number:
Family:

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: ASUSTeK Computer Inc.
Product Name: F3JC
Version: 1.0
Serial Number: BSN12345678901234567
Asset Tag: ATN12345678901234567
Features:
Board is a hosting board
Board requires at least one daughter board
Board is replaceable
Location In Chassis: MIDDLE
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0

Handle 0x0003, DMI type 3, 21 bytes
Chassis Information
Manufacturer: ASUSTeK Computer Inc.
Type: Notebook
Lock: Not Present
Version:
Serial Number:
Asset Tag:
Boot-up State: Safe
Power Supply State: Safe
Thermal State: Safe
Security Status: None
OEM Information: 0x
Height: Unspecified
Number Of Power Cords: 1
Contained Elements: 0

Handle 0x0004, DMI type 4, 35 bytes
Processor Information
Socket Designation: Socket 478
Type: Central Processor
Family: Other
Manufacturer: Intel
ID: F6 06 00 00 FF FB EB BF
Signature: Type 0, Family 6, Model 15, Stepping 6
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (Time stamp counter)
MSR (Model specific registers)
PAE (Physical address extension)
MCE (Machine check exception)
CX8 (CMPXCHG8 instruction supported)
APIC (On-chip APIC hardware supported)
SEP (Fast system call)
MTRR (Memory type range registers)
PGE (Page global enable)
MCA (Machine check architecture)
CMOV (Conditional move instruction supported)
PAT (Page attribute table)
PSE-36 (36-bit page size extension)
CLFSH (CLFLUSH instruction supported)
DS (Debug store)
ACPI (ACPI supported)
MMX (MMX technology supported)
FXSR (FXSAVE and FXSTOR instructions supported)
SSE (Streaming SIMD extensions)
SSE2 (Streaming SIMD extensions 2)
SS (Self-snoop)
HTT (Multi-threading)
TM (Thermal monitor supported)
 

Re: [RFC PATCH 1/8] stk-webcam: various fixes.

2013-02-10 Thread Arvydas Sidorenko
On Sun, Feb 10, 2013 at 8:28 AM, Hans Verkuil hverk...@xs4all.nl wrote:

 I've improved this message, so please run again with the latest code and let 
 me
 know what it says. I don't understand all the upside-down problems...


$ dmesg | grep upside
upside down: 0 -1 -1
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 1/8] stk-webcam: various fixes.

2013-02-10 Thread Arvydas Sidorenko
On Sun, Feb 10, 2013 at 3:02 PM, Hans Verkuil hverk...@xs4all.nl wrote:

 Thanks, I found the bug. It's my fault: I made a logic error w.r.t. setting up
 the initial hflip/vflip values. I've read over it dozens of times without
 actually catching the - rather obvious - bug :-)

 Get the latest code, try again and if everything works fine for you then I'll
 clean up my patches and post the final version.


Looks good. Thanks for you effort!

Arvydas
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 1/8] stk-webcam: various fixes.

2013-02-09 Thread Arvydas Sidorenko
On Fri, Feb 8, 2013 at 10:20 AM, Hans Verkuil hverk...@xs4all.nl wrote:

 Thanks for the testing! I've pushed some more improvements to my git branch.
 Hopefully the compliance tests are now running OK. Please check the dmesg
 output as well.

 In addition I've added an 'upside down' message to the kernel log that tells
 me whether the driver is aware that your sensor is upside down or not.

 Which laptop do you have? Asus G1?

 Regards,

 Hans

Now it looks better, but clearly there is an issue with the upside down thing.
I have ASUS F3Jc laptop.

Although a commit '6f89814d3d' introduced a problem.
 if (rb-count == 0)
 dev-owner = NULL;
Now 'v4l_stk_release' doesn't release the resources because 'dev-owner != fp'.

$ dmesg | grep upside
[4.933507] upside down: 0

$ v4l2-compliance -d /dev/video0
Driver Info:
Driver name   : stk
Card type : stk
Bus info  : usb-:00:1d.7-8
Driver version: 3.1.0
Capabilities  : 0x8501
Video Capture
Read/Write
Streaming
Device Capabilities
Device Caps   : 0x0501
Video Capture
Read/Write
Streaming

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
test second video open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK

Debug ioctls:
test VIDIOC_DBG_G_CHIP_IDENT: OK (Not Supported)
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK

Input ioctls:
test VIDIOC_G/S_TUNER: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Control ioctls:
test VIDIOC_QUERYCTRL/MENU: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 4 Private Controls: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_PRESETS: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)

Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
warn: v4l2-test-formats.cpp(565): TRY_FMT cannot handle an 
invalid
pixelformat. This may or may not be a problem.
See http://www.mail-archive.com/linux-media@vger.kernel.org/msg56550.html
for more information.
test VIDIOC_TRY_FMT: OK
warn: v4l2-test-formats.cpp(723): S_FMT cannot handle an invalid
pixelformat. This may or may not be a problem.
See http://www.mail-archive.com/linux-media@vger.kernel.org/msg56550.html
for more information.
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)

Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls:
warn: v4l2-test-buffers.cpp(175): VIDIOC_CREATE_BUFS not 
supported
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK

Total: 38, Succeeded: 38, Failed: 0, Warnings: 3


Arvydas
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 1/8] stk-webcam: various fixes.

2013-02-07 Thread Arvydas Sidorenko
On Wed, Feb 6, 2013 at 8:32 AM, Hans Verkuil hverk...@xs4all.nl wrote:

 I've improved v4l2-compliance a bit, but I've also pushed a fix (I hope) to
 my git branch.

 It's great if you can test this!


$ v4l2-compliance -d /dev/video0
Driver Info:
Driver name   : stk
Card type : stk
Bus info  : usb-:00:1d.7-8
Driver version: 3.1.0
Capabilities  : 0x8501
Video Capture
Read/Write
Streaming
Device Capabilities
Device Caps   : 0x0501
Video Capture
Read/Write
Streaming

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
test second video open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK

Debug ioctls:
test VIDIOC_DBG_G_CHIP_IDENT: OK (Not Supported)
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK

Input ioctls:
test VIDIOC_G/S_TUNER: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Control ioctls:
test VIDIOC_QUERYCTRL/MENU: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 4 Private Controls: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_PRESETS: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)

Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
warn: v4l2-test-formats.cpp(565): TRY_FMT cannot handle an 
invalid
pixelformat. This may or may not be a problem.
See http://www.mail-archive.com/linux-media@vger.kernel.org/msg56550.html
for more information.
test VIDIOC_TRY_FMT: OK
warn: v4l2-test-formats.cpp(723): S_FMT cannot handle an invalid
pixelformat. This may or may not be a problem.
See http://www.mail-archive.com/linux-media@vger.kernel.org/msg56550.html
for more information.
warn: v4l2-test-formats.cpp(658): Could not set fmt1
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)

Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls:
fail: v4l2-test-buffers.cpp(166): doioctl(node-node2, 
VIDIOC_REQBUFS, bufs)
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL

Total: 38, Succeeded: 37, Failed: 1, Warnings: 3


On top of that it generates some dmesg output:
[   70.514849] stkwebcam 5-8:1.0: =  START STATUS
=
[   70.514856] stkwebcam 5-8:1.0: Brightness: 96
[   70.514860] stkwebcam 5-8:1.0: Horizontal Flip: true
[   70.514863] stkwebcam 5-8:1.0: Vertical Flip: true
[   70.514866] stkwebcam 5-8:1.0: ==  END STATUS
==
[   70.596727] stkwebcam: OmniVision sensor detected, id 9652 at address 60
[   70.859490] stkwebcam: isobufs already allocated. Bad
[   70.859977] stkwebcam: isobuf data already allocated
[   70.860502] stkwebcam: Killing URB
[   70.860990] stkwebcam: isobuf data already allocated
[   70.861478] stkwebcam: Killing URB
[   70.862088] stkwebcam: isobuf data already allocated
[   70.862834] stkwebcam: Killing URB
[   70.863594] stkwebcam: sio_bufs already allocated
[   70.864319] stkwebcam: isobufs already allocated. Bad
[   70.865057] stkwebcam: isobuf data already allocated
[   70.865752] stkwebcam: Killing URB
[   70.866490] stkwebcam: isobuf data already allocated
[   70.867275] stkwebcam: Killing URB
[   70.867980] stkwebcam: isobuf data already allocated
[   70.868721] stkwebcam: Killing URB
[   70.869464] stkwebcam: sio_bufs already allocated
[   70.870244] stkwebcam: isobufs already allocated. Bad
[   70.870968] stkwebcam: isobuf data already allocated
[   70.871704] stkwebcam: Killing URB
[   70.872440] stkwebcam: isobuf data already allocated
[   70.873181] 

Re: [RFC PATCH 1/8] stk-webcam: various fixes.

2013-02-05 Thread Arvydas Sidorenko
On Mon, Feb 4, 2013 at 2:35 PM, Hans Verkuil hverk...@xs4all.nl wrote:

 Hi Arvydas,

 Yes indeed, it would be great if you could test this!

 Note that the patch series is also available in my git tree:

 http://git.linuxtv.org/hverkuil/media_tree.git/shortlog/refs/heads/stkwebcam

 Besides the normal testing that everything works as expected, it would also
 be great if you could run the v4l2-compliance tool. It's part of the v4l-utils
 repository (http://git.linuxtv.org/v4l-utils.git) and it tests whether a 
 driver
 complies to the V4L2 specification.

 Just compile the tool from the repository (don't use a distro-provided 
 version)
 and run it as 'v4l2-compliance -d /dev/videoX' and mail me the output. You 
 will
 get at least one failure at the end, but I'd like to know if there are other
 issues remaining.

 Regards,

 Hans

I have tested the patches using STK-1135 webcam. Everything works well.

$ v4l2-compliance -d /dev/video0
Driver Info:
Driver name   : stk
Card type : stk
Bus info  :
Driver version: 0.0.1
Capabilities  : 0x0501
Video Capture
Read/Write
Streaming

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
fail: v4l2-compliance.cpp(224): string empty
fail: v4l2-compliance.cpp(276): check_ustring(vcap.bus_info,
sizeof(vcap.bus_info))
test VIDIOC_QUERYCAP: FAIL

Allow for multiple opens:
test second video open: OK
fail: v4l2-compliance.cpp(224): string empty
fail: v4l2-compliance.cpp(276): check_ustring(vcap.bus_info,
sizeof(vcap.bus_info))
test VIDIOC_QUERYCAP: FAIL
fail: v4l2-compliance.cpp(334): doioctl(node, 
VIDIOC_G_PRIORITY, prio)
test VIDIOC_G/S_PRIORITY: FAIL

Debug ioctls:
test VIDIOC_DBG_G_CHIP_IDENT: OK (Not Supported)
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
test VIDIOC_G/S_TUNER: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
fail: v4l2-test-input-output.cpp(354): std == 0
fail: v4l2-test-input-output.cpp(409): invalid attributes for 
input 0
test VIDIOC_G/S/ENUMINPUT: FAIL
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Control ioctls:
fail: v4l2-test-controls.cpp(145): can do querymenu on a 
non-menu control
fail: v4l2-test-controls.cpp(254): invalid control 00980900
test VIDIOC_QUERYCTRL/MENU: FAIL
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 0 Private Controls: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_PRESETS: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)

Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
fail: v4l2-test-formats.cpp(385): priv is non-zero!
test VIDIOC_TRY_FMT: FAIL
fail: v4l2-test-formats.cpp(719): Video Capture is valid, but no
S_FMT was implemented
test VIDIOC_S_FMT: FAIL
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)

Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls:
fail: v4l2-test-buffers.cpp(132): ret != -1
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL

Total: 38, Succeeded: 30, Failed: 8, Warnings: 1


Arvydas
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 1/8] stk-webcam: various fixes.

2013-02-05 Thread Arvydas Sidorenko
On Tue, Feb 5, 2013 at 5:56 PM, Ezequiel Garcia elezegar...@gmail.com wrote:
 On Tue, Feb 5, 2013 at 12:35 PM, Hans Verkuil hverk...@xs4all.nl wrote:
 On Tue February 5 2013 16:28:17 Arvydas Sidorenko wrote:

 I have tested the patches using STK-1135 webcam. Everything works well.

 $ v4l2-compliance -d /dev/video0
 Driver Info:
   Driver name   : stk
   Card type : stk
   Bus info  :
   Driver version: 0.0.1

 This is the old version of the driver you are testing with :-)


 @Arvydas: First of all, thanks for taking the time to test Hans' patches.

 I suggest to double check the old driver
 is not loaded and then run depmod -a to update modules.

 As a last resource you can always wipe out the driver from
 /lib/modules/what-ever and reinstall.

 Hope this helps!

 --
 Ezequiel

Yes, I am sorry. I built the wrong branch.

The cam works, but the view is upside down.

$ v4l2-compliance -d /dev/video0
Driver Info:
Driver name   : stk
Card type : stk
Bus info  : 4-8
Driver version: 3.1.0
Capabilities  : 0x8501
Video Capture
Read/Write
Streaming
Device Capabilities
Device Caps   : 0x0501
Video Capture
Read/Write
Streaming

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
fail: v4l2-compliance.cpp(285): missing bus_info prefix ('4-8')
test VIDIOC_QUERYCAP: FAIL

Allow for multiple opens:
test second video open: OK
fail: v4l2-compliance.cpp(285): missing bus_info prefix ('4-8')
test VIDIOC_QUERYCAP: FAIL
test VIDIOC_G/S_PRIORITY: OK

Debug ioctls:
test VIDIOC_DBG_G_CHIP_IDENT: OK (Not Supported)
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK

Input ioctls:
test VIDIOC_G/S_TUNER: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Control ioctls:
test VIDIOC_QUERYCTRL/MENU: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 4 Private Controls: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_PRESETS: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)

Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
fail: v4l2-test-formats.cpp(566): Video Capture is valid, but
TRY_FMT failed to return a format
test VIDIOC_TRY_FMT: FAIL
fail: v4l2-test-formats.cpp(719): Video Capture is valid, but no
S_FMT was implemented
test VIDIOC_S_FMT: FAIL
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)

Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls:
fail: v4l2-test-buffers.cpp(132): ret != -1
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL

Total: 38, Succeeded: 33, Failed: 5, Warnings: 0
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] stkwebcam: Fix sparse warning on undeclared symbol

2012-11-02 Thread Arvydas Sidorenko
 why the heck do we need this first_init?

first_init was introduced in 7b1c8f58fcdbed75 for turning off LED when
the cam finishes
the capture.
Andrea Anacleto andreaanacl...@libero.it claimed that the change
broke his webcam
on the same laptop, so he introduced that variable to fix the issue.
It didn't have any
impact to my cam so I merged it's patch and resent my fix to the maintainer.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] drivers/media/video/stk-webcam.c: webcam LED bug fix [IMPROVED]

2011-09-21 Thread Arvydas Sidorenko
This is an improved version of the patch I sent a little ago.

The problem was:
On my DC-1125 webcam chip from Syntek, whenever the webcam turns
on, the LED light on it is turned on also and never turns off again 
unless
system is shut downed or restarted.

The previous version seemed to break some other laptop webcam work. Thanks
to Andrea Anacleto for the bug report and solution.

Signed-off-by: Andrea Anacleto andreaanacl...@libero.it
Signed-off-by: Arvydas Sidorenko asi...@gmail.com
---
 drivers/media/video/stk-webcam.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c
index d1a2cef..af57d80 100644
--- a/drivers/media/video/stk-webcam.c
+++ b/drivers/media/video/stk-webcam.c
@@ -55,6 +55,8 @@ MODULE_AUTHOR(Jaime Velasco Juan jsagarri...@gmail.com and 
Nicolas VIVIEN);
 MODULE_DESCRIPTION(Syntek DC1125 webcam driver);
 
 
+/* bool for webcam LED management */
+int first_init = 1;
 
 /* Some cameras have audio interfaces, we aren't interested in those */
 static struct usb_device_id stkwebcam_table[] = {
@@ -561,6 +563,12 @@ static int v4l_stk_open(struct file *fp)
if (dev == NULL || !is_present(dev)) {
return -ENXIO;
}
+
+   if (!first_init)
+   stk_camera_write_reg(dev, 0x0, 0x24);
+   else
+   first_init = 0;
+
fp-private_data = dev;
usb_autopm_get_interface(dev-interface);
 
@@ -574,6 +582,7 @@ static int v4l_stk_release(struct file *fp)
if (dev-owner == fp) {
stk_stop_stream(dev);
stk_free_buffers(dev);
+   stk_camera_write_reg(dev, 0x0, 0x49); /* turn off the LED */
dev-owner = NULL;
}
 
@@ -1350,6 +1359,7 @@ static int stk_camera_resume(struct usb_interface *intf)
return 0;
unset_initialised(dev);
stk_initialise(dev);
+   stk_camera_write_reg(dev, 0x0, 0x49);
stk_setup_format(dev);
if (is_streaming(dev))
stk_start_stream(dev);
-- 
1.7.4.4

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] drivers/media/video/stk-webcam.c: webcam LED bug fix

2011-09-13 Thread Arvydas Sidorenko
The probem was on my DC-1125 webcam chip from Syntek. Whenever the webcam turns
on, the LED light on it is turn on also and never turns off again unless system
is shut downed or restarted.

This patch will fix this issue - the LED will be turned off whenever the device
is released.

Signed-off-by: Arvydas Sidorenko asi...@gmail.com
---
 drivers/media/video/stk-webcam.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c
index d1a2cef..859e78f 100644
--- a/drivers/media/video/stk-webcam.c
+++ b/drivers/media/video/stk-webcam.c
@@ -574,6 +574,8 @@ static int v4l_stk_release(struct file *fp)
if (dev-owner == fp) {
stk_stop_stream(dev);
stk_free_buffers(dev);
+   stk_camera_write_reg(dev, 0x0, 0x48); /* turn off the LED */
+   unset_initialised(dev);
dev-owner = NULL;
}
 
-- 
1.7.4.4

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] drivers/media/video/stk-webcam.c: coding style issue

2011-09-13 Thread Arvydas Sidorenko
checkpatch.pl gave some coding style errors, so on the way to the first
patch I added the fix to them.

Signed-off-by: Arvydas Sidorenko asi...@gmail.com
---
 drivers/media/video/stk-webcam.c |   18 --
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c
index 859e78f..5fc6bbc 100644
--- a/drivers/media/video/stk-webcam.c
+++ b/drivers/media/video/stk-webcam.c
@@ -518,7 +518,7 @@ static int stk_prepare_sio_buffers(struct stk_camera *dev, 
unsigned n_sbufs)
return -ENOMEM;
for (i = 0; i  n_sbufs; i++) {
if (stk_setup_siobuf(dev, i))
-   return (dev-n_sbufs  1)? 0 : -ENOMEM;
+   return (dev-n_sbufs  1 ? 0 : -ENOMEM);
dev-n_sbufs = i+1;
}
}
@@ -558,9 +558,8 @@ static int v4l_stk_open(struct file *fp)
vdev = video_devdata(fp);
dev = vdev_to_camera(vdev);
 
-   if (dev == NULL || !is_present(dev)) {
+   if (dev == NULL || !is_present(dev))
return -ENXIO;
-   }
fp-private_data = dev;
usb_autopm_get_interface(dev-interface);
 
@@ -579,7 +578,7 @@ static int v4l_stk_release(struct file *fp)
dev-owner = NULL;
}
 
-   if(is_present(dev))
+   if (is_present(dev))
usb_autopm_put_interface(dev-interface);
 
return 0;
@@ -656,7 +655,7 @@ static unsigned int v4l_stk_poll(struct file *fp, 
poll_table *wait)
return POLLERR;
 
if (!list_empty(dev-sio_full))
-   return (POLLIN | POLLRDNORM);
+   return POLLIN | POLLRDNORM;
 
return 0;
 }
@@ -893,9 +892,9 @@ static int stk_vidioc_g_fmt_vid_cap(struct file *filp,
struct stk_camera *dev = priv;
int i;
 
-   for (i = 0; i  ARRAY_SIZE(stk_sizes)
-stk_sizes[i].m != dev-vsettings.mode;
-   i++);
+   for (i = 0; i  ARRAY_SIZE(stk_sizes) 
+   stk_sizes[i].m != dev-vsettings.mode; i++)
+   ;
if (i == ARRAY_SIZE(stk_sizes)) {
STK_ERROR(ERROR: mode invalid\n);
return -EINVAL;
@@ -1307,9 +1306,8 @@ static int stk_camera_probe(struct usb_interface 
*interface,
usb_set_intfdata(interface, dev);
 
err = stk_register_video_device(dev);
-   if (err) {
+   if (err)
goto error;
-   }
 
return 0;
 
-- 
1.7.4.4

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html