New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 670262 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

imageCapture: zoom is 0 the first time

Project Member Reported by fbeaufort@chromium.org, Dec 1 2016

Issue description

Chrome Version       : 56.0.2924.9
OS Version: 9000.10.0

What steps will reproduce the problem?
1. calling the first time getPhotoCapabilities() return a zoom set to 0
2. refreshing page and calling a second time getPhotoCapabilities return a proper range for zoom (non 0 for min and max)
 
And here's my dmesg log:

$ dmesg

[17537.174954] pci_pm_runtime_suspend(): hcd_pci_runtime_suspend+0x0/0x15 returns -16
[17537.386909] usb 2-1.2: new high-speed USB device number 8 using ehci-pci
[17537.744458] usb 2-1.2: New USB device found, idVendor=046d, idProduct=0823
[17537.744504] usb 2-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=1
[17537.744545] usb 2-1.2: SerialNumber: B3CC4900
[17538.214266] uvcvideo: Found UVC 1.00 device <unnamed> (046d:0823)

// Request first time fails

[17551.131505] ehci-pci 0000:00:1d.0: setting latency timer to 64
[17551.280522] usb 2-1.2: reset high-speed USB device number 8 using ehci-pci
[17552.374274] uvcvideo: Failed to query (GET_DEF) UVC control 11 on unit 1: -110 (exp. 2).
[17552.674218] uvcvideo: Failed to query (GET_CUR) UVC control 8 on unit 1: -110 (exp. 1).
[17552.794089] uvcvideo: Failed to query (GET_CUR) UVC control 2 on unit 1: -32 (exp. 1).

// Second time succeeds hence there are no errors after
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ba3e7171459cfa4bc9c0c26329a88ff3a4c21bd6

commit ba3e7171459cfa4bc9c0c26329a88ff3a4c21bd6
Author: mcasas <mcasas@chromium.org>
Date: Tue Dec 06 19:27:12 2016

ImageCapture: queue requests if device is not started (Linux,CrOs)

This CL is the continuation of https://crrev.com/2193213003
for CrOs. Said CL added a queue of image-capture related
requests in VideoCaptureManager and in VideoCaptureDeviceAndroid,
this CL adds such a queue in VideoCaptureDeviceLinux,
otherwise (see bug) there is a race between the photo
related requests and the device startup, which can take a
while and happens asynchronously.

BUG= 670262 ,  627537 

Review-Url: https://codereview.chromium.org/2557623002
Cr-Commit-Position: refs/heads/master@{#436684}

[modify] https://crrev.com/ba3e7171459cfa4bc9c0c26329a88ff3a4c21bd6/media/capture/video/linux/video_capture_device_linux.cc
[modify] https://crrev.com/ba3e7171459cfa4bc9c0c26329a88ff3a4c21bd6/media/capture/video/linux/video_capture_device_linux.h

Cc: fbeaufort@chromium.org xianglu@chromium.org
Owner: mcasas@chromium.org
Status: Fixed (was: Unconfirmed)
Should be fixed now. 


fbeaufort@ would you mind verifying it?
Labels: Needs-Verification
It is not fixed in my case in Chrome OS 57.0.2948.0 ;(

If I go to https://beaufortfrancois.github.io/sandbox/image-capture/playground.html, the zoom input is disabled.
Refreshing page makes it work after though.

I'm not sure what is happening there.

Comment 6 by mcasas@chromium.org, Dec 16 2016

Status: Started (was: Fixed)
#5: Managed to repro somehow, and it's quite weird since
the other capabilities (brightness, sharpness etc) get 
picked up correctly.  The not-read also affects the colour 
temperature (white balance temperature).

I believe this has to do with the uvc driver getting a bit
stuck in the first VIDIOC_{QUERY,G_}CTRL commands -- this
happened here: [1], we'll probably try something similar
here.


[1] https://cs.chromium.org/chromium/src/media/capture/video/linux/v4l2_capture_delegate.cc?q=ResetUserAndCameraControlsToDefault&sq=package:chromium&dr=CSs&l=172
Is that a known issue in UVC driver?
Where could we ask for help there?
Project Member

Comment 9 by bugdroid1@chromium.org, Dec 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/047c7091b7159c5ad0037d0e35d74e1e4739e080

commit 047c7091b7159c5ad0037d0e35d74e1e4739e080
Author: mcasas <mcasas@chromium.org>
Date: Fri Dec 16 22:48:44 2016

ImageCapture v4l2: retry reading capabilities

The bug illustrates a case in which an ioctl() for reading the photo
capabilities right after opening the device/starting streaming fails,
but work after retrying a few times. (In my repros, the first two
control readings fail, successively working).

This CL reuses the code in ResetUserAndCameraControlsToDefault()
to retry an ioclt a few times for RetrieveUserControlRange().

BUG= 670262 

Review-Url: https://codereview.chromium.org/2582723002
Cr-Commit-Position: refs/heads/master@{#439223}

[modify] https://crrev.com/047c7091b7159c5ad0037d0e35d74e1e4739e080/media/capture/video/linux/v4l2_capture_delegate.cc

Status: Fixed (was: Started)
fbeaufort@ let's give it another stab either you or I when
439223 hits Canary.
Labels: -Needs-Verification
Status: Verified (was: Fixed)
Just tried with a CrOS 57.0.2955.0 and it retrieved the values right
the first time (including colorTemperature and zoom), so, I'd say 
it's verified.  fbeaufort@, please reopen otherwise.
Verified in Chrome Canary 57.0.2958.0. Thank you!

Sign in to add a comment