* Devices with a front and back webcam represented as a single UVC device
@ 2018-07-11 8:37 Hans de Goede
2018-07-11 11:00 ` Laurent Pinchart
0 siblings, 1 reply; 15+ messages in thread
From: Hans de Goede @ 2018-07-11 8:37 UTC (permalink / raw)
To: Laurent Pinchart, Carlos Garnacho; +Cc: Linux Media Mailing List
[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]
Hi Laurent,
At Guadec Carlos (in the Cc) told me that on his Acer 2-in-1 only
the frontcam is working and it seems both are represented by a
single UVC USB device. I've told him to check for some v4l control
to flip between front and back.
Carlos, as I mentioned you can try gtk-v4l
("sudo dnf install gtk-v4l") or qv4l2
("sudo dnf install qv4l2") these will both show
you various controls for the camera. One of those might do the trick.
But I recently bought a 2nd second hand Cherry Trail based HP
X2 2-in-1 and much to my surprise that is actually using an UVC
cam, rather then the usual ATOMISP crap and it has the same issue.
This device does not seem to have a control to flip between the
2 cams, instead it registers 2 /dev/video? nodes but the second
node does not work and dmesg contains:
[ 26.079868] uvcvideo: Found UVC 1.00 device HP TrueVision HD (05c8:03a3)
[ 26.095485] uvcvideo 1-4.2:1.0: Entity type for entity Extension 4 was not initialized!
[ 26.095492] uvcvideo 1-4.2:1.0: Entity type for entity Processing 2 was not initialized!
[ 26.095496] uvcvideo 1-4.2:1.0: Entity type for entity Camera 1 was not initialized!
Laurent, I've attached lsusb -v output so that you can check the
descriptors.
Carlos, it might be good to get Laurent your descriptors too, to do
this do "lsusb", note what is the <vid>:<pid> for your camera and then
run:
sudo lsusb -v -d <vid>:<pid> > lsusb.log
And send Laurent a mail with the generated lsusb
Regards,
Hans
[-- Attachment #2: lsusb.log --]
[-- Type: text/x-log, Size: 23407 bytes --]
Bus 001 Device 005: ID 05c8:03a3 Cheng Uei Precision Industry Co., Ltd (Foxlink)
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x05c8 Cheng Uei Precision Industry Co., Ltd (Foxlink)
idProduct 0x03a3
bcdDevice 1.01
iManufacturer 3 Generic
iProduct 1 HP TrueVision HD
iSerial 2 200901010001
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 722
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 4 USB Camera
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 14 Video
bFunctionSubClass 3 Video Interface Collection
bFunctionProtocol 0
iFunction 5 HP TrueVision HD
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 1 Video Control
bInterfaceProtocol 0
iInterface 5 HP TrueVision HD
VideoControl Interface Descriptor:
bLength 13
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdUVC 1.00
wTotalLength 78
dwClockFrequency 15.000000MHz
bInCollection 1
baInterfaceNr( 0) 1
VideoControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Camera Sensor
bAssocTerminal 0
iTerminal 0
wObjectiveFocalLengthMin 0
wObjectiveFocalLengthMax 0
wOcularFocalLength 0
bControlSize 3
bmControls 0x0000000e
Auto-Exposure Mode
Auto-Exposure Priority
Exposure Time (Absolute)
VideoControl Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 5 (PROCESSING_UNIT)
Warning: Descriptor too short
bUnitID 2
bSourceID 1
wMaxMultiplier 0
bControlSize 2
bmControls 0x0000177f
Brightness
Contrast
Hue
Saturation
Sharpness
Gamma
White Balance Temperature
Backlight Compensation
Gain
Power Line Frequency
White Balance Temperature, Auto
iProcessing 0
bmVideoStandards 0x09
None
SECAM - 625/50
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 3
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 4
iTerminal 0
VideoControl Interface Descriptor:
bLength 27
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 4
guidExtensionCode {1229a78c-47b4-4094-b0ce-db07386fb938}
bNumControl 2
bNrPins 1
baSourceID( 0) 2
bControlSize 2
bmControls( 0) 0x00
bmControls( 1) 0x06
iExtension 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 6
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 15
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 2
wTotalLength 485
bEndPointAddress 129
bmInfo 0
bTerminalLink 3
bStillCaptureMethod 2
bTriggerSupport 1
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 0
bmaControls( 1) 0
VideoStreaming Interface Descriptor:
bLength 27
bDescriptorType 36
bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED)
bFormatIndex 1
bNumFrameDescriptors 6
guidFormat {32595559-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 640
wHeight 480
dwMinBitRate 147456000
dwMaxBitRate 147456000
dwMaxVideoFrameBufferSize 614400
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 2
bmCapabilities 0x00
Still image unsupported
wWidth 176
wHeight 144
dwMinBitRate 12165120
dwMaxBitRate 12165120
dwMaxVideoFrameBufferSize 50688
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 3
bmCapabilities 0x00
Still image unsupported
wWidth 320
wHeight 240
dwMinBitRate 36864000
dwMaxBitRate 36864000
dwMaxVideoFrameBufferSize 153600
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 4
bmCapabilities 0x00
Still image unsupported
wWidth 352
wHeight 288
dwMinBitRate 48660480
dwMaxBitRate 48660480
dwMaxVideoFrameBufferSize 202752
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 5
bmCapabilities 0x00
Still image unsupported
wWidth 640
wHeight 360
dwMinBitRate 110592000
dwMaxBitRate 110592000
dwMaxVideoFrameBufferSize 460800
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 6
bmCapabilities 0x00
Still image unsupported
wWidth 1280
wHeight 720
dwMinBitRate 147456000
dwMaxBitRate 147456000
dwMaxVideoFrameBufferSize 1843200
dwDefaultFrameInterval 1000000
bFrameIntervalType 1
dwFrameInterval( 0) 1000000
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 3 (STILL_IMAGE_FRAME)
bEndpointAddress 0
bNumImageSizePatterns 6
wWidth( 0) 640
wHeight( 0) 480
wWidth( 1) 176
wHeight( 1) 144
wWidth( 2) 320
wHeight( 2) 240
wWidth( 3) 352
wHeight( 3) 288
wWidth( 4) 640
wHeight( 4) 360
wWidth( 5) 1280
wHeight( 5) 720
bNumCompressionPatterns 0
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 6 (FORMAT_MJPEG)
bFormatIndex 2
bNumFrameDescriptors 6
bFlags 1
Fixed-size samples: Yes
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 1 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 640
wHeight 480
dwMinBitRate 147456000
dwMaxBitRate 147456000
dwMaxVideoFrameBufferSize 614400
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 2
bmCapabilities 0x00
Still image unsupported
wWidth 176
wHeight 144
dwMinBitRate 12165120
dwMaxBitRate 12165120
dwMaxVideoFrameBufferSize 50688
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 3
bmCapabilities 0x00
Still image unsupported
wWidth 320
wHeight 240
dwMinBitRate 36864000
dwMaxBitRate 36864000
dwMaxVideoFrameBufferSize 153600
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 4
bmCapabilities 0x00
Still image unsupported
wWidth 352
wHeight 288
dwMinBitRate 48660480
dwMaxBitRate 48660480
dwMaxVideoFrameBufferSize 202752
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 5
bmCapabilities 0x00
Still image unsupported
wWidth 640
wHeight 360
dwMinBitRate 110592000
dwMaxBitRate 110592000
dwMaxVideoFrameBufferSize 460800
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 6
bmCapabilities 0x00
Still image unsupported
wWidth 1280
wHeight 720
dwMinBitRate 442368000
dwMaxBitRate 442368000
dwMaxVideoFrameBufferSize 1843200
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 3 (STILL_IMAGE_FRAME)
bEndpointAddress 0
bNumImageSizePatterns 6
wWidth( 0) 640
wHeight( 0) 480
wWidth( 1) 176
wHeight( 1) 144
wWidth( 2) 320
wHeight( 2) 240
wWidth( 3) 352
wHeight( 3) 288
wWidth( 4) 640
wHeight( 4) 360
wWidth( 5) 1280
wHeight( 5) 720
bNumCompressionPatterns 0
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0080 1x 128 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 2
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 3
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 4
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0b00 2x 768 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 5
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0c00 2x 1024 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 6
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x1380 3x 896 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 7
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x1400 3x 1024 bytes
bInterval 1
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Devices with a front and back webcam represented as a single UVC device
2018-07-11 8:37 Devices with a front and back webcam represented as a single UVC device Hans de Goede
@ 2018-07-11 11:00 ` Laurent Pinchart
2018-07-11 11:03 ` Laurent Pinchart
2018-07-11 11:36 ` Carlos Garnacho
0 siblings, 2 replies; 15+ messages in thread
From: Laurent Pinchart @ 2018-07-11 11:00 UTC (permalink / raw)
To: Hans de Goede; +Cc: Carlos Garnacho, Linux Media Mailing List
Hi Hans,
On Wednesday, 11 July 2018 11:37:14 EEST Hans de Goede wrote:
> Hi Laurent,
>
> At Guadec Carlos (in the Cc) told me that on his Acer 2-in-1 only
> the frontcam is working and it seems both are represented by a
> single UVC USB device. I've told him to check for some v4l control
> to flip between front and back.
>
> Carlos, as I mentioned you can try gtk-v4l
> ("sudo dnf install gtk-v4l") or qv4l2
> ("sudo dnf install qv4l2") these will both show
> you various controls for the camera. One of those might do the trick.
>
> But I recently bought a 2nd second hand Cherry Trail based HP
> X2 2-in-1 and much to my surprise that is actually using an UVC
> cam, rather then the usual ATOMISP crap and it has the same issue.
>
> This device does not seem to have a control to flip between the
> 2 cams, instead it registers 2 /dev/video? nodes but the second
> node does not work
The second node is there to expose metadata to userspace, not image data.
That's a recent addition to the uvcvideo driver.
> and dmesg contains:
>
> [ 26.079868] uvcvideo: Found UVC 1.00 device HP TrueVision HD (05c8:03a3)
> [ 26.095485] uvcvideo 1-4.2:1.0: Entity type for entity Extension 4 was
> not initialized!
> [ 26.095492] uvcvideo 1-4.2:1.0: Entity type for entity Processing 2 was
> not initialized!
> [ 26.095496] uvcvideo 1-4.2:1.0: Entity type for entity Camera 1 was not
> initialized!
You can safely ignore those messages. I need to submit a patch to get rid of
them.
> Laurent, I've attached lsusb -v output so that you can check the
> descriptors.
Thank you.
It's funny how UVC specifies a standard way to describe a device with two
camera sensors with dynamic selection of one of them at runtime, and vendors
instead implement vendor-specific crap :-(
The interesting part in the descriptors is
VideoControl Interface Descriptor:
bLength 27
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 4
guidExtensionCode {1229a78c-47b4-4094-b0ce-db07386fb938}
bNumControl 2
bNrPins 1
baSourceID( 0) 2
bControlSize 2
bmControls( 0) 0x00
bmControls( 1) 0x06
iExtension 0
The extension unit exposes two controls (bmControls is a bitmask). They can be
accessed from userspace through the UVCIOC_CTRL_QUERY ioctl, or mapped to V4L2
controls through the UVCIOC_CTRL_MAP ioctl, in which case they will be exposed
to standard V4L2 applications.
If you want to experiment with this, I would advise querying both controls
with UVCIOC_CTRL_QUERY. You can use the UVC_GET_CUR, UVC_GET_MIN, UVC_GET_MAX,
UVC_GET_DEF and UVC_GET_RES requests to get the control current, minimum,
maximum, default and resolution values, and UVC_GET_LEN and UVC_GET_INFO to
get the control size (in bytes) and flags. Based on that you can start
experimenting with UVC_SET_CUR to set semi-random values.
I'm however worried that those two controls would be a register address and a
register value, for indirect access to all hardware registers in the device.
In that case, you would likely need information from the device vendor, or
possibly a USB traffic dump from a Windows machine when switching between the
front and back cameras.
> Carlos, it might be good to get Laurent your descriptors too, to do
> this do "lsusb", note what is the <vid>:<pid> for your camera and then
> run:
>
> sudo lsusb -v -d <vid>:<pid> > lsusb.log
>
> And send Laurent a mail with the generated lsusb
That would be appreciated, but I expect the same issue :-(
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Devices with a front and back webcam represented as a single UVC device
2018-07-11 11:00 ` Laurent Pinchart
@ 2018-07-11 11:03 ` Laurent Pinchart
2018-07-11 11:36 ` Carlos Garnacho
1 sibling, 0 replies; 15+ messages in thread
From: Laurent Pinchart @ 2018-07-11 11:03 UTC (permalink / raw)
To: Hans de Goede; +Cc: Carlos Garnacho, Linux Media Mailing List
Hi Hans,
On Wednesday, 11 July 2018 14:00:38 EEST Laurent Pinchart wrote:
> On Wednesday, 11 July 2018 11:37:14 EEST Hans de Goede wrote:
> > Hi Laurent,
> >
> > At Guadec Carlos (in the Cc) told me that on his Acer 2-in-1 only
> > the frontcam is working and it seems both are represented by a
> > single UVC USB device. I've told him to check for some v4l control
> > to flip between front and back.
> >
> > Carlos, as I mentioned you can try gtk-v4l
> > ("sudo dnf install gtk-v4l") or qv4l2
> > ("sudo dnf install qv4l2") these will both show
> > you various controls for the camera. One of those might do the trick.
> >
> > But I recently bought a 2nd second hand Cherry Trail based HP
> > X2 2-in-1 and much to my surprise that is actually using an UVC
> > cam, rather then the usual ATOMISP crap and it has the same issue.
> >
> > This device does not seem to have a control to flip between the
> > 2 cams, instead it registers 2 /dev/video? nodes but the second
> > node does not work
>
> The second node is there to expose metadata to userspace, not image data.
> That's a recent addition to the uvcvideo driver.
>
> > and dmesg contains:
> >
> > [ 26.079868] uvcvideo: Found UVC 1.00 device HP TrueVision HD
> > (05c8:03a3)
> > [ 26.095485] uvcvideo 1-4.2:1.0: Entity type for entity Extension 4 was
> > not initialized!
> > [ 26.095492] uvcvideo 1-4.2:1.0: Entity type for entity Processing 2 was
> > not initialized!
> > [ 26.095496] uvcvideo 1-4.2:1.0: Entity type for entity Camera 1 was not
> > initialized!
>
> You can safely ignore those messages. I need to submit a patch to get rid of
> them.
>
> > Laurent, I've attached lsusb -v output so that you can check the
> > descriptors.
>
> Thank you.
>
> It's funny how UVC specifies a standard way to describe a device with two
> camera sensors with dynamic selection of one of them at runtime, and vendors
> instead implement vendor-specific crap :-(
>
> The interesting part in the descriptors is
>
> VideoControl Interface Descriptor:
> bLength 27
> bDescriptorType 36
> bDescriptorSubtype 6 (EXTENSION_UNIT)
> bUnitID 4
> guidExtensionCode {1229a78c-47b4-4094-b0ce-db07386fb938}
> bNumControl 2
> bNrPins 1
> baSourceID( 0) 2
> bControlSize 2
> bmControls( 0) 0x00
> bmControls( 1) 0x06
> iExtension 0
>
> The extension unit exposes two controls (bmControls is a bitmask). They can
> be accessed from userspace through the UVCIOC_CTRL_QUERY ioctl, or mapped
> to V4L2 controls through the UVCIOC_CTRL_MAP ioctl, in which case they will
> be exposed to standard V4L2 applications.
>
> If you want to experiment with this, I would advise querying both controls
> with UVCIOC_CTRL_QUERY. You can use the UVC_GET_CUR, UVC_GET_MIN,
> UVC_GET_MAX, UVC_GET_DEF and UVC_GET_RES requests to get the control
> current, minimum, maximum, default and resolution values, and UVC_GET_LEN
> and UVC_GET_INFO to get the control size (in bytes) and flags. Based on
> that you can start experimenting with UVC_SET_CUR to set semi-random
> values.
>
> I'm however worried that those two controls would be a register address and
> a register value, for indirect access to all hardware registers in the
> device. In that case, you would likely need information from the device
> vendor, or possibly a USB traffic dump from a Windows machine when
> switching between the front and back cameras.
For the record, the USB descriptors of the 05c8:0403 device from the same
vendor have the exact same extension unit, with the same two controls. I thus
expect them to allow indirect access to internal registers :-(
> > Carlos, it might be good to get Laurent your descriptors too, to do
> > this do "lsusb", note what is the <vid>:<pid> for your camera and then
> > run:
> >
> > sudo lsusb -v -d <vid>:<pid> > lsusb.log
> >
> > And send Laurent a mail with the generated lsusb
>
> That would be appreciated, but I expect the same issue :-(
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Devices with a front and back webcam represented as a single UVC device
2018-07-11 11:00 ` Laurent Pinchart
2018-07-11 11:03 ` Laurent Pinchart
@ 2018-07-11 11:36 ` Carlos Garnacho
2018-07-11 12:08 ` Laurent Pinchart
1 sibling, 1 reply; 15+ messages in thread
From: Carlos Garnacho @ 2018-07-11 11:36 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: Hans de Goede, Carlos Garnacho, Linux Media Mailing List
[-- Attachment #1: Type: text/plain, Size: 4088 bytes --]
Hi!,
Thanks Hans for starting this, and hi Laurent.
On Wed, Jul 11, 2018 at 1:00 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Hans,
>
> On Wednesday, 11 July 2018 11:37:14 EEST Hans de Goede wrote:
>> Hi Laurent,
>>
>> At Guadec Carlos (in the Cc) told me that on his Acer 2-in-1 only
>> the frontcam is working and it seems both are represented by a
>> single UVC USB device. I've told him to check for some v4l control
>> to flip between front and back.
>>
>> Carlos, as I mentioned you can try gtk-v4l
>> ("sudo dnf install gtk-v4l") or qv4l2
>> ("sudo dnf install qv4l2") these will both show
>> you various controls for the camera. One of those might do the trick.
>>
>> But I recently bought a 2nd second hand Cherry Trail based HP
>> X2 2-in-1 and much to my surprise that is actually using an UVC
>> cam, rather then the usual ATOMISP crap and it has the same issue.
>>
>> This device does not seem to have a control to flip between the
>> 2 cams, instead it registers 2 /dev/video? nodes but the second
>> node does not work
>
> The second node is there to expose metadata to userspace, not image data.
> That's a recent addition to the uvcvideo driver.
>
>> and dmesg contains:
>>
>> [ 26.079868] uvcvideo: Found UVC 1.00 device HP TrueVision HD (05c8:03a3)
>> [ 26.095485] uvcvideo 1-4.2:1.0: Entity type for entity Extension 4 was
>> not initialized!
>> [ 26.095492] uvcvideo 1-4.2:1.0: Entity type for entity Processing 2 was
>> not initialized!
>> [ 26.095496] uvcvideo 1-4.2:1.0: Entity type for entity Camera 1 was not
>> initialized!
>
> You can safely ignore those messages. I need to submit a patch to get rid of
> them.
>
>> Laurent, I've attached lsusb -v output so that you can check the
>> descriptors.
>
> Thank you.
>
> It's funny how UVC specifies a standard way to describe a device with two
> camera sensors with dynamic selection of one of them at runtime, and vendors
> instead implement vendor-specific crap :-(
>
> The interesting part in the descriptors is
>
> VideoControl Interface Descriptor:
> bLength 27
> bDescriptorType 36
> bDescriptorSubtype 6 (EXTENSION_UNIT)
> bUnitID 4
> guidExtensionCode {1229a78c-47b4-4094-b0ce-db07386fb938}
> bNumControl 2
> bNrPins 1
> baSourceID( 0) 2
> bControlSize 2
> bmControls( 0) 0x00
> bmControls( 1) 0x06
> iExtension 0
>
> The extension unit exposes two controls (bmControls is a bitmask). They can be
> accessed from userspace through the UVCIOC_CTRL_QUERY ioctl, or mapped to V4L2
> controls through the UVCIOC_CTRL_MAP ioctl, in which case they will be exposed
> to standard V4L2 applications.
>
> If you want to experiment with this, I would advise querying both controls
> with UVCIOC_CTRL_QUERY. You can use the UVC_GET_CUR, UVC_GET_MIN, UVC_GET_MAX,
> UVC_GET_DEF and UVC_GET_RES requests to get the control current, minimum,
> maximum, default and resolution values, and UVC_GET_LEN and UVC_GET_INFO to
> get the control size (in bytes) and flags. Based on that you can start
> experimenting with UVC_SET_CUR to set semi-random values.
>
> I'm however worried that those two controls would be a register address and a
> register value, for indirect access to all hardware registers in the device.
> In that case, you would likely need information from the device vendor, or
> possibly a USB traffic dump from a Windows machine when switching between the
> front and back cameras.
>
>> Carlos, it might be good to get Laurent your descriptors too, to do
>> this do "lsusb", note what is the <vid>:<pid> for your camera and then
>> run:
>>
>> sudo lsusb -v -d <vid>:<pid> > lsusb.log
>>
>> And send Laurent a mail with the generated lsusb
>
> That would be appreciated, but I expect the same issue :-(
Please find it attached. IIUC your last email, it might not be the
exact same issue, but you can definitely judge better.
Cheers,
Carlos
[-- Attachment #2: lsusb.log --]
[-- Type: text/x-log, Size: 28405 bytes --]
Bus 001 Device 004: ID 0bda:56c1 Realtek Semiconductor Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x0bda Realtek Semiconductor Corp.
idProduct 0x56c1
bcdDevice 0.16
iManufacturer 3 Pegatron
iProduct 1 USB Camera
iSerial 2 0x0001
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 963
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 4 USB Camera
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 14 Video
bFunctionSubClass 3 Video Interface Collection
bFunctionProtocol 0
iFunction 5 USB Camera
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 1 Video Control
bInterfaceProtocol 0
iInterface 5 USB Camera
VideoControl Interface Descriptor:
bLength 13
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdUVC 1.00
wTotalLength 107
dwClockFrequency 15.000000MHz
bInCollection 1
baInterfaceNr( 0) 1
VideoControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Camera Sensor
bAssocTerminal 0
iTerminal 0
wObjectiveFocalLengthMin 0
wObjectiveFocalLengthMax 0
wOcularFocalLength 0
bControlSize 3
bmControls 0x0000200e
Auto-Exposure Mode
Auto-Exposure Priority
Exposure Time (Absolute)
Roll (Absolute)
VideoControl Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 5 (PROCESSING_UNIT)
Warning: Descriptor too short
bUnitID 2
bSourceID 1
wMaxMultiplier 0
bControlSize 2
bmControls 0x0000177f
Brightness
Contrast
Hue
Saturation
Sharpness
Gamma
White Balance Temperature
Backlight Compensation
Gain
Power Line Frequency
White Balance Temperature, Auto
iProcessing 0
bmVideoStandards 0x09
None
SECAM - 625/50
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 3
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 6
iTerminal 0
VideoControl Interface Descriptor:
bLength 27
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 4
guidExtensionCode {1229a78c-47b4-4094-b0ce-db07386fb938}
bNumControl 2
bNrPins 1
baSourceID( 0) 2
bControlSize 2
bmControls( 0) 0x00
bmControls( 1) 0x06
iExtension 0
VideoControl Interface Descriptor:
bLength 29
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 6
guidExtensionCode {26b8105a-0713-4870-979d-da79444bb68e}
bNumControl 9
bNrPins 1
baSourceID( 0) 4
bControlSize 4
bmControls( 0) 0x1f
bmControls( 1) 0x01
bmControls( 2) 0x38
bmControls( 3) 0x00
iExtension 6 Realtek Extended Controls Unit
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 6
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 15
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 2
wTotalLength 697
bEndPointAddress 129
bmInfo 0
bTerminalLink 3
bStillCaptureMethod 2
bTriggerSupport 1
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 0
bmaControls( 1) 0
VideoStreaming Interface Descriptor:
bLength 27
bDescriptorType 36
bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED)
bFormatIndex 1
bNumFrameDescriptors 9
guidFormat {32595559-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 34
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 640
wHeight 480
dwMinBitRate 73728000
dwMaxBitRate 147456000
dwMaxVideoFrameBufferSize 614400
dwDefaultFrameInterval 333333
bFrameIntervalType 2
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 666666
VideoStreaming Interface Descriptor:
bLength 34
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 2
bmCapabilities 0x00
Still image unsupported
wWidth 640
wHeight 360
dwMinBitRate 55296000
dwMaxBitRate 110592000
dwMaxVideoFrameBufferSize 460800
dwDefaultFrameInterval 333333
bFrameIntervalType 2
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 666666
VideoStreaming Interface Descriptor:
bLength 34
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 3
bmCapabilities 0x00
Still image unsupported
wWidth 160
wHeight 120
dwMinBitRate 4608000
dwMaxBitRate 9216000
dwMaxVideoFrameBufferSize 38400
dwDefaultFrameInterval 333333
bFrameIntervalType 2
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 666666
VideoStreaming Interface Descriptor:
bLength 34
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 4
bmCapabilities 0x00
Still image unsupported
wWidth 352
wHeight 288
dwMinBitRate 24330240
dwMaxBitRate 48660480
dwMaxVideoFrameBufferSize 202752
dwDefaultFrameInterval 333333
bFrameIntervalType 2
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 666666
VideoStreaming Interface Descriptor:
bLength 34
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 5
bmCapabilities 0x00
Still image unsupported
wWidth 320
wHeight 240
dwMinBitRate 18432000
dwMaxBitRate 36864000
dwMaxVideoFrameBufferSize 153600
dwDefaultFrameInterval 333333
bFrameIntervalType 2
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 666666
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 6
bmCapabilities 0x00
Still image unsupported
wWidth 800
wHeight 600
dwMinBitRate 76800000
dwMaxBitRate 76800000
dwMaxVideoFrameBufferSize 960000
dwDefaultFrameInterval 1000000
bFrameIntervalType 1
dwFrameInterval( 0) 1000000
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 7
bmCapabilities 0x00
Still image unsupported
wWidth 960
wHeight 540
dwMinBitRate 82944000
dwMaxBitRate 82944000
dwMaxVideoFrameBufferSize 1036800
dwDefaultFrameInterval 1000000
bFrameIntervalType 1
dwFrameInterval( 0) 1000000
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 8
bmCapabilities 0x00
Still image unsupported
wWidth 1280
wHeight 720
dwMinBitRate 73728000
dwMaxBitRate 73728000
dwMaxVideoFrameBufferSize 1843200
dwDefaultFrameInterval 2000000
bFrameIntervalType 1
dwFrameInterval( 0) 2000000
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 9
bmCapabilities 0x00
Still image unsupported
wWidth 1600
wHeight 1200
dwMinBitRate 61440000
dwMaxBitRate 61440000
dwMaxVideoFrameBufferSize 3840000
dwDefaultFrameInterval 5000000
bFrameIntervalType 1
dwFrameInterval( 0) 5000000
VideoStreaming Interface Descriptor:
bLength 26
bDescriptorType 36
bDescriptorSubtype 3 (STILL_IMAGE_FRAME)
bEndpointAddress 0
bNumImageSizePatterns 5
wWidth( 0) 1600
wHeight( 0) 1200
wWidth( 1) 160
wHeight( 1) 120
wWidth( 2) 320
wHeight( 2) 240
wWidth( 3) 640
wHeight( 3) 480
wWidth( 4) 1280
wHeight( 4) 720
bNumCompressionPatterns 0
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 6 (FORMAT_MJPEG)
bFormatIndex 2
bNumFrameDescriptors 9
bFlags 1
Fixed-size samples: Yes
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 1 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 34
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 640
wHeight 480
dwMinBitRate 73728000
dwMaxBitRate 147456000
dwMaxVideoFrameBufferSize 614400
dwDefaultFrameInterval 333333
bFrameIntervalType 2
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 666666
VideoStreaming Interface Descriptor:
bLength 34
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 2
bmCapabilities 0x00
Still image unsupported
wWidth 640
wHeight 360
dwMinBitRate 55296000
dwMaxBitRate 110592000
dwMaxVideoFrameBufferSize 460800
dwDefaultFrameInterval 333333
bFrameIntervalType 2
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 666666
VideoStreaming Interface Descriptor:
bLength 34
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 3
bmCapabilities 0x00
Still image unsupported
wWidth 160
wHeight 120
dwMinBitRate 4608000
dwMaxBitRate 9216000
dwMaxVideoFrameBufferSize 38400
dwDefaultFrameInterval 333333
bFrameIntervalType 2
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 666666
VideoStreaming Interface Descriptor:
bLength 34
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 4
bmCapabilities 0x00
Still image unsupported
wWidth 352
wHeight 288
dwMinBitRate 24330240
dwMaxBitRate 48660480
dwMaxVideoFrameBufferSize 202752
dwDefaultFrameInterval 333333
bFrameIntervalType 2
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 666666
VideoStreaming Interface Descriptor:
bLength 34
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 5
bmCapabilities 0x00
Still image unsupported
wWidth 320
wHeight 240
dwMinBitRate 18432000
dwMaxBitRate 36864000
dwMaxVideoFrameBufferSize 153600
dwDefaultFrameInterval 333333
bFrameIntervalType 2
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 666666
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 6
bmCapabilities 0x00
Still image unsupported
wWidth 800
wHeight 600
dwMinBitRate 230400000
dwMaxBitRate 230400000
dwMaxVideoFrameBufferSize 960000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 7
bmCapabilities 0x00
Still image unsupported
wWidth 960
wHeight 540
dwMinBitRate 248832000
dwMaxBitRate 248832000
dwMaxVideoFrameBufferSize 1036800
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 8
bmCapabilities 0x00
Still image unsupported
wWidth 1280
wHeight 720
dwMinBitRate 442368000
dwMaxBitRate 442368000
dwMaxVideoFrameBufferSize 1843200
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 9
bmCapabilities 0x00
Still image unsupported
wWidth 1600
wHeight 1200
dwMinBitRate 921600000
dwMaxBitRate 921600000
dwMaxVideoFrameBufferSize 3840000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 26
bDescriptorType 36
bDescriptorSubtype 3 (STILL_IMAGE_FRAME)
bEndpointAddress 0
bNumImageSizePatterns 5
wWidth( 0) 1600
wHeight( 0) 1200
wWidth( 1) 160
wHeight( 1) 120
wWidth( 2) 320
wHeight( 2) 240
wWidth( 3) 640
wHeight( 3) 480
wWidth( 4) 1280
wHeight( 4) 720
bNumCompressionPatterns 0
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0080 1x 128 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 2
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 3
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 4
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0b00 2x 768 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 5
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0c00 2x 1024 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 6
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x1380 3x 896 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 7
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x1400 3x 1024 bytes
bInterval 1
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Devices with a front and back webcam represented as a single UVC device
2018-07-11 11:36 ` Carlos Garnacho
@ 2018-07-11 12:08 ` Laurent Pinchart
2018-07-11 12:41 ` Hans de Goede
0 siblings, 1 reply; 15+ messages in thread
From: Laurent Pinchart @ 2018-07-11 12:08 UTC (permalink / raw)
To: Carlos Garnacho; +Cc: Hans de Goede, Linux Media Mailing List
Hi Carlos,
On Wednesday, 11 July 2018 14:36:48 EEST Carlos Garnacho wrote:
> On Wed, Jul 11, 2018 at 1:00 PM, Laurent Pinchart wrote:
> > On Wednesday, 11 July 2018 11:37:14 EEST Hans de Goede wrote:
> >> Hi Laurent,
> >>
> >> At Guadec Carlos (in the Cc) told me that on his Acer 2-in-1 only
> >> the frontcam is working and it seems both are represented by a
> >> single UVC USB device. I've told him to check for some v4l control
> >> to flip between front and back.
> >>
> >> Carlos, as I mentioned you can try gtk-v4l
> >> ("sudo dnf install gtk-v4l") or qv4l2
> >> ("sudo dnf install qv4l2") these will both show
> >> you various controls for the camera. One of those might do the trick.
> >>
> >> But I recently bought a 2nd second hand Cherry Trail based HP
> >> X2 2-in-1 and much to my surprise that is actually using an UVC
> >> cam, rather then the usual ATOMISP crap and it has the same issue.
> >>
> >> This device does not seem to have a control to flip between the
> >> 2 cams, instead it registers 2 /dev/video? nodes but the second
> >> node does not work
> >
> > The second node is there to expose metadata to userspace, not image data.
> > That's a recent addition to the uvcvideo driver.
> >
> >> and dmesg contains:
> >>
> >> [ 26.079868] uvcvideo: Found UVC 1.00 device HP TrueVision HD
> >> (05c8:03a3)
> >> [ 26.095485] uvcvideo 1-4.2:1.0: Entity type for entity Extension 4 was
> >> not initialized!
> >> [ 26.095492] uvcvideo 1-4.2:1.0: Entity type for entity Processing 2
> >> was
> >> not initialized!
> >> [ 26.095496] uvcvideo 1-4.2:1.0: Entity type for entity Camera 1 was
> >> not
> >> initialized!
> >
> > You can safely ignore those messages. I need to submit a patch to get rid
> > of them.
> >
> >> Laurent, I've attached lsusb -v output so that you can check the
> >> descriptors.
> >
> > Thank you.
> >
> > It's funny how UVC specifies a standard way to describe a device with two
> > camera sensors with dynamic selection of one of them at runtime, and
> > vendors instead implement vendor-specific crap :-(
> >
> > The interesting part in the descriptors is
> >
> > VideoControl Interface Descriptor:
> > bLength 27
> > bDescriptorType 36
> > bDescriptorSubtype 6 (EXTENSION_UNIT)
> > bUnitID 4
> > guidExtensionCode {1229a78c-47b4-4094-b0ce-db07386fb938}
> > bNumControl 2
> > bNrPins 1
> > baSourceID( 0) 2
> > bControlSize 2
> > bmControls( 0) 0x00
> > bmControls( 1) 0x06
> > iExtension 0
> >
> > The extension unit exposes two controls (bmControls is a bitmask). They
> > can be accessed from userspace through the UVCIOC_CTRL_QUERY ioctl, or
> > mapped to V4L2 controls through the UVCIOC_CTRL_MAP ioctl, in which case
> > they will be exposed to standard V4L2 applications.
> >
> > If you want to experiment with this, I would advise querying both controls
> > with UVCIOC_CTRL_QUERY. You can use the UVC_GET_CUR, UVC_GET_MIN,
> > UVC_GET_MAX, UVC_GET_DEF and UVC_GET_RES requests to get the control
> > current, minimum, maximum, default and resolution values, and UVC_GET_LEN
> > and UVC_GET_INFO to get the control size (in bytes) and flags. Based on
> > that you can start experimenting with UVC_SET_CUR to set semi-random
> > values.
> >
> > I'm however worried that those two controls would be a register address
> > and a register value, for indirect access to all hardware registers in
> > the device. In that case, you would likely need information from the
> > device vendor, or possibly a USB traffic dump from a Windows machine when
> > switching between the front and back cameras.
> >
> >> Carlos, it might be good to get Laurent your descriptors too, to do
> >> this do "lsusb", note what is the <vid>:<pid> for your camera and then
> >> run:
> >>
> >> sudo lsusb -v -d <vid>:<pid> > lsusb.log
> >>
> >> And send Laurent a mail with the generated lsusb
> >
> > That would be appreciated, but I expect the same issue :-(
>
> Please find it attached. IIUC your last email, it might not be the
> exact same issue, but you can definitely judge better.
Your device is similar in the sense that it doesn't use the standard UVC
support for multiple camera sensors. It instead exposes two extension units:
VideoControl Interface Descriptor:
bLength 27
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 4
guidExtensionCode {1229a78c-47b4-4094-b0ce-db07386fb938}
bNumControl 2
bNrPins 1
baSourceID( 0) 2
bControlSize 2
bmControls( 0) 0x00
bmControls( 1) 0x06
iExtension 0
VideoControl Interface Descriptor:
bLength 29
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 6
guidExtensionCode {26b8105a-0713-4870-979d-da79444bb68e}
bNumControl 9
bNrPins 1
baSourceID( 0) 4
bControlSize 4
bmControls( 0) 0x1f
bmControls( 1) 0x01
bmControls( 2) 0x38
bmControls( 3) 0x00
iExtension 6 Realtek Extended Controls Unit
The first one is identical to Hans', and I expect it to offer indirect access
to internal device registers. The second one exposes 9 controls, and I expect
at least some of those to have direct effects on the device. What they do and
how they operate is unfortunately unknown.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Devices with a front and back webcam represented as a single UVC device
2018-07-11 12:08 ` Laurent Pinchart
@ 2018-07-11 12:41 ` Hans de Goede
2018-07-11 16:07 ` Carlos Garnacho
2018-07-12 13:01 ` Laurent Pinchart
0 siblings, 2 replies; 15+ messages in thread
From: Hans de Goede @ 2018-07-11 12:41 UTC (permalink / raw)
To: Laurent Pinchart, Carlos Garnacho; +Cc: Linux Media Mailing List
HI,
On 11-07-18 14:08, Laurent Pinchart wrote:
> Hi Carlos,
>
> On Wednesday, 11 July 2018 14:36:48 EEST Carlos Garnacho wrote:
>> On Wed, Jul 11, 2018 at 1:00 PM, Laurent Pinchart wrote:
>>> On Wednesday, 11 July 2018 11:37:14 EEST Hans de Goede wrote:
>>>> Hi Laurent,
>>>>
>>>> At Guadec Carlos (in the Cc) told me that on his Acer 2-in-1 only
>>>> the frontcam is working and it seems both are represented by a
>>>> single UVC USB device. I've told him to check for some v4l control
>>>> to flip between front and back.
>>>>
>>>> Carlos, as I mentioned you can try gtk-v4l
>>>> ("sudo dnf install gtk-v4l") or qv4l2
>>>> ("sudo dnf install qv4l2") these will both show
>>>> you various controls for the camera. One of those might do the trick.
>>>>
>>>> But I recently bought a 2nd second hand Cherry Trail based HP
>>>> X2 2-in-1 and much to my surprise that is actually using an UVC
>>>> cam, rather then the usual ATOMISP crap and it has the same issue.
>>>>
>>>> This device does not seem to have a control to flip between the
>>>> 2 cams, instead it registers 2 /dev/video? nodes but the second
>>>> node does not work
>>>
>>> The second node is there to expose metadata to userspace, not image data.
>>> That's a recent addition to the uvcvideo driver.
>>>
>>>> and dmesg contains:
>>>>
>>>> [ 26.079868] uvcvideo: Found UVC 1.00 device HP TrueVision HD
>>>> (05c8:03a3)
>>>> [ 26.095485] uvcvideo 1-4.2:1.0: Entity type for entity Extension 4 was
>>>> not initialized!
>>>> [ 26.095492] uvcvideo 1-4.2:1.0: Entity type for entity Processing 2
>>>> was
>>>> not initialized!
>>>> [ 26.095496] uvcvideo 1-4.2:1.0: Entity type for entity Camera 1 was
>>>> not
>>>> initialized!
>>>
>>> You can safely ignore those messages. I need to submit a patch to get rid
>>> of them.
>>>
>>>> Laurent, I've attached lsusb -v output so that you can check the
>>>> descriptors.
>>>
>>> Thank you.
>>>
>>> It's funny how UVC specifies a standard way to describe a device with two
>>> camera sensors with dynamic selection of one of them at runtime, and
>>> vendors instead implement vendor-specific crap :-(
>>>
>>> The interesting part in the descriptors is
>>>
>>> VideoControl Interface Descriptor:
>>> bLength 27
>>> bDescriptorType 36
>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>> bUnitID 4
>>> guidExtensionCode {1229a78c-47b4-4094-b0ce-db07386fb938}
>>> bNumControl 2
>>> bNrPins 1
>>> baSourceID( 0) 2
>>> bControlSize 2
>>> bmControls( 0) 0x00
>>> bmControls( 1) 0x06
>>> iExtension 0
>>>
>>> The extension unit exposes two controls (bmControls is a bitmask). They
>>> can be accessed from userspace through the UVCIOC_CTRL_QUERY ioctl, or
>>> mapped to V4L2 controls through the UVCIOC_CTRL_MAP ioctl, in which case
>>> they will be exposed to standard V4L2 applications.
>>>
>>> If you want to experiment with this, I would advise querying both controls
>>> with UVCIOC_CTRL_QUERY. You can use the UVC_GET_CUR, UVC_GET_MIN,
>>> UVC_GET_MAX, UVC_GET_DEF and UVC_GET_RES requests to get the control
>>> current, minimum, maximum, default and resolution values, and UVC_GET_LEN
>>> and UVC_GET_INFO to get the control size (in bytes) and flags. Based on
>>> that you can start experimenting with UVC_SET_CUR to set semi-random
>>> values.
>>>
>>> I'm however worried that those two controls would be a register address
>>> and a register value, for indirect access to all hardware registers in
>>> the device. In that case, you would likely need information from the
>>> device vendor, or possibly a USB traffic dump from a Windows machine when
>>> switching between the front and back cameras.
>>>
>>>> Carlos, it might be good to get Laurent your descriptors too, to do
>>>> this do "lsusb", note what is the <vid>:<pid> for your camera and then
>>>> run:
>>>>
>>>> sudo lsusb -v -d <vid>:<pid> > lsusb.log
>>>>
>>>> And send Laurent a mail with the generated lsusb
>>>
>>> That would be appreciated, but I expect the same issue :-(
>>
>> Please find it attached. IIUC your last email, it might not be the
>> exact same issue, but you can definitely judge better.
>
> Your device is similar in the sense that it doesn't use the standard UVC
> support for multiple camera sensors. It instead exposes two extension units:
>
> VideoControl Interface Descriptor:
> bLength 27
> bDescriptorType 36
> bDescriptorSubtype 6 (EXTENSION_UNIT)
> bUnitID 4
> guidExtensionCode {1229a78c-47b4-4094-b0ce-db07386fb938}
> bNumControl 2
> bNrPins 1
> baSourceID( 0) 2
> bControlSize 2
> bmControls( 0) 0x00
> bmControls( 1) 0x06
> iExtension 0
> VideoControl Interface Descriptor:
> bLength 29
> bDescriptorType 36
> bDescriptorSubtype 6 (EXTENSION_UNIT)
> bUnitID 6
> guidExtensionCode {26b8105a-0713-4870-979d-da79444bb68e}
> bNumControl 9
> bNrPins 1
> baSourceID( 0) 4
> bControlSize 4
> bmControls( 0) 0x1f
> bmControls( 1) 0x01
> bmControls( 2) 0x38
> bmControls( 3) 0x00
> iExtension 6 Realtek Extended Controls Unit
>
> The first one is identical to Hans', and I expect it to offer indirect access
> to internal device registers. The second one exposes 9 controls, and I expect
> at least some of those to have direct effects on the device. What they do and
> how they operate is unfortunately unknown.
Laurent, thank you for your input on this. I thought it was a bit weird that
the cam on my HP X2 only had what appears to be the debug controls, so I
opened it up and as I suspect (after your analysis) it is using a USB module
for the front camera, but the back camera is a sensor directly hooked with its
CSI/MIPI bus to the PCB, so very likely it is using the ATOMISP stuff.
So I think that we can consider this "solved" for my 2-in-1.
Carlos, your Acer is using a Core CPU (not an Atom) right ? And the front and
rear cams are both centered at the same edge I guess ? (mine had one in the
corner and the other centered which already was a hint)
Regards,
Hans
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Devices with a front and back webcam represented as a single UVC device
2018-07-11 12:41 ` Hans de Goede
@ 2018-07-11 16:07 ` Carlos Garnacho
2018-07-11 17:41 ` Hans de Goede
2018-07-12 13:01 ` Laurent Pinchart
1 sibling, 1 reply; 15+ messages in thread
From: Carlos Garnacho @ 2018-07-11 16:07 UTC (permalink / raw)
To: Hans de Goede; +Cc: Laurent Pinchart, Carlos Garnacho, Linux Media Mailing List
Hi!,
On Wed, Jul 11, 2018 at 2:41 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> HI,
>
>
> On 11-07-18 14:08, Laurent Pinchart wrote:
>>
>> Hi Carlos,
>>
>> On Wednesday, 11 July 2018 14:36:48 EEST Carlos Garnacho wrote:
>>>
>>> On Wed, Jul 11, 2018 at 1:00 PM, Laurent Pinchart wrote:
>>>>
>>>> On Wednesday, 11 July 2018 11:37:14 EEST Hans de Goede wrote:
>>>>>
>>>>> Hi Laurent,
>>>>>
>>>>> At Guadec Carlos (in the Cc) told me that on his Acer 2-in-1 only
>>>>> the frontcam is working and it seems both are represented by a
>>>>> single UVC USB device. I've told him to check for some v4l control
>>>>> to flip between front and back.
>>>>>
>>>>> Carlos, as I mentioned you can try gtk-v4l
>>>>> ("sudo dnf install gtk-v4l") or qv4l2
>>>>> ("sudo dnf install qv4l2") these will both show
>>>>> you various controls for the camera. One of those might do the trick.
>>>>>
>>>>> But I recently bought a 2nd second hand Cherry Trail based HP
>>>>> X2 2-in-1 and much to my surprise that is actually using an UVC
>>>>> cam, rather then the usual ATOMISP crap and it has the same issue.
>>>>>
>>>>> This device does not seem to have a control to flip between the
>>>>> 2 cams, instead it registers 2 /dev/video? nodes but the second
>>>>> node does not work
>>>>
>>>>
>>>> The second node is there to expose metadata to userspace, not image
>>>> data.
>>>> That's a recent addition to the uvcvideo driver.
>>>>
>>>>> and dmesg contains:
>>>>>
>>>>> [ 26.079868] uvcvideo: Found UVC 1.00 device HP TrueVision HD
>>>>> (05c8:03a3)
>>>>> [ 26.095485] uvcvideo 1-4.2:1.0: Entity type for entity Extension 4
>>>>> was
>>>>> not initialized!
>>>>> [ 26.095492] uvcvideo 1-4.2:1.0: Entity type for entity Processing 2
>>>>> was
>>>>> not initialized!
>>>>> [ 26.095496] uvcvideo 1-4.2:1.0: Entity type for entity Camera 1 was
>>>>> not
>>>>> initialized!
>>>>
>>>>
>>>> You can safely ignore those messages. I need to submit a patch to get
>>>> rid
>>>> of them.
>>>>
>>>>> Laurent, I've attached lsusb -v output so that you can check the
>>>>> descriptors.
>>>>
>>>>
>>>> Thank you.
>>>>
>>>> It's funny how UVC specifies a standard way to describe a device with
>>>> two
>>>> camera sensors with dynamic selection of one of them at runtime, and
>>>> vendors instead implement vendor-specific crap :-(
>>>>
>>>> The interesting part in the descriptors is
>>>>
>>>> VideoControl Interface Descriptor:
>>>> bLength 27
>>>> bDescriptorType 36
>>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>>> bUnitID 4
>>>> guidExtensionCode
>>>> {1229a78c-47b4-4094-b0ce-db07386fb938}
>>>> bNumControl 2
>>>> bNrPins 1
>>>> baSourceID( 0) 2
>>>> bControlSize 2
>>>> bmControls( 0) 0x00
>>>> bmControls( 1) 0x06
>>>> iExtension 0
>>>>
>>>> The extension unit exposes two controls (bmControls is a bitmask). They
>>>> can be accessed from userspace through the UVCIOC_CTRL_QUERY ioctl, or
>>>> mapped to V4L2 controls through the UVCIOC_CTRL_MAP ioctl, in which case
>>>> they will be exposed to standard V4L2 applications.
>>>>
>>>> If you want to experiment with this, I would advise querying both
>>>> controls
>>>> with UVCIOC_CTRL_QUERY. You can use the UVC_GET_CUR, UVC_GET_MIN,
>>>> UVC_GET_MAX, UVC_GET_DEF and UVC_GET_RES requests to get the control
>>>> current, minimum, maximum, default and resolution values, and
>>>> UVC_GET_LEN
>>>> and UVC_GET_INFO to get the control size (in bytes) and flags. Based on
>>>> that you can start experimenting with UVC_SET_CUR to set semi-random
>>>> values.
>>>>
>>>> I'm however worried that those two controls would be a register address
>>>> and a register value, for indirect access to all hardware registers in
>>>> the device. In that case, you would likely need information from the
>>>> device vendor, or possibly a USB traffic dump from a Windows machine
>>>> when
>>>> switching between the front and back cameras.
>>>>
>>>>> Carlos, it might be good to get Laurent your descriptors too, to do
>>>>> this do "lsusb", note what is the <vid>:<pid> for your camera and then
>>>>> run:
>>>>>
>>>>> sudo lsusb -v -d <vid>:<pid> > lsusb.log
>>>>>
>>>>> And send Laurent a mail with the generated lsusb
>>>>
>>>>
>>>> That would be appreciated, but I expect the same issue :-(
>>>
>>>
>>> Please find it attached. IIUC your last email, it might not be the
>>> exact same issue, but you can definitely judge better.
>>
>>
>> Your device is similar in the sense that it doesn't use the standard UVC
>> support for multiple camera sensors. It instead exposes two extension
>> units:
>>
>> VideoControl Interface Descriptor:
>> bLength 27
>> bDescriptorType 36
>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>> bUnitID 4
>> guidExtensionCode {1229a78c-47b4-4094-b0ce-db07386fb938}
>> bNumControl 2
>> bNrPins 1
>> baSourceID( 0) 2
>> bControlSize 2
>> bmControls( 0) 0x00
>> bmControls( 1) 0x06
>> iExtension 0
>> VideoControl Interface Descriptor:
>> bLength 29
>> bDescriptorType 36
>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>> bUnitID 6
>> guidExtensionCode {26b8105a-0713-4870-979d-da79444bb68e}
>> bNumControl 9
>> bNrPins 1
>> baSourceID( 0) 4
>> bControlSize 4
>> bmControls( 0) 0x1f
>> bmControls( 1) 0x01
>> bmControls( 2) 0x38
>> bmControls( 3) 0x00
>> iExtension 6 Realtek Extended Controls Unit
>>
>> The first one is identical to Hans', and I expect it to offer indirect
>> access
>> to internal device registers. The second one exposes 9 controls, and I
>> expect
>> at least some of those to have direct effects on the device. What they do
>> and
>> how they operate is unfortunately unknown.
>
>
> Laurent, thank you for your input on this. I thought it was a bit weird that
> the cam on my HP X2 only had what appears to be the debug controls, so I
> opened it up and as I suspect (after your analysis) it is using a USB module
> for the front camera, but the back camera is a sensor directly hooked with
> its
> CSI/MIPI bus to the PCB, so very likely it is using the ATOMISP stuff.
>
> So I think that we can consider this "solved" for my 2-in-1.
>
> Carlos, your Acer is using a Core CPU (not an Atom) right ? And the front
Indeed, it is an i5...
> and
> rear cams are both centered at the same edge I guess ? (mine had one in the
> corner and the other centered which already was a hint)
...but now that you mention this, I have front camera centered and
rear camera on a corner too. Is there any other info I may need to
fetch? I assume ATOMISP is irrelevant here.
Cheers,
Carlos
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Devices with a front and back webcam represented as a single UVC device
2018-07-11 16:07 ` Carlos Garnacho
@ 2018-07-11 17:41 ` Hans de Goede
2018-07-11 18:26 ` Carlos Garnacho
0 siblings, 1 reply; 15+ messages in thread
From: Hans de Goede @ 2018-07-11 17:41 UTC (permalink / raw)
To: Carlos Garnacho; +Cc: Laurent Pinchart, Linux Media Mailing List
Hi,
On 11-07-18 18:07, Carlos Garnacho wrote:
> Hi!,
>
> On Wed, Jul 11, 2018 at 2:41 PM, Hans de Goede <hdegoede@redhat.com> wrote:
>> HI,
>>
>>
>> On 11-07-18 14:08, Laurent Pinchart wrote:
>>>
>>> Hi Carlos,
>>>
>>> On Wednesday, 11 July 2018 14:36:48 EEST Carlos Garnacho wrote:
>>>>
>>>> On Wed, Jul 11, 2018 at 1:00 PM, Laurent Pinchart wrote:
>>>>>
>>>>> On Wednesday, 11 July 2018 11:37:14 EEST Hans de Goede wrote:
>>>>>>
>>>>>> Hi Laurent,
>>>>>>
>>>>>> At Guadec Carlos (in the Cc) told me that on his Acer 2-in-1 only
>>>>>> the frontcam is working and it seems both are represented by a
>>>>>> single UVC USB device. I've told him to check for some v4l control
>>>>>> to flip between front and back.
>>>>>>
>>>>>> Carlos, as I mentioned you can try gtk-v4l
>>>>>> ("sudo dnf install gtk-v4l") or qv4l2
>>>>>> ("sudo dnf install qv4l2") these will both show
>>>>>> you various controls for the camera. One of those might do the trick.
>>>>>>
>>>>>> But I recently bought a 2nd second hand Cherry Trail based HP
>>>>>> X2 2-in-1 and much to my surprise that is actually using an UVC
>>>>>> cam, rather then the usual ATOMISP crap and it has the same issue.
>>>>>>
>>>>>> This device does not seem to have a control to flip between the
>>>>>> 2 cams, instead it registers 2 /dev/video? nodes but the second
>>>>>> node does not work
>>>>>
>>>>>
>>>>> The second node is there to expose metadata to userspace, not image
>>>>> data.
>>>>> That's a recent addition to the uvcvideo driver.
>>>>>
>>>>>> and dmesg contains:
>>>>>>
>>>>>> [ 26.079868] uvcvideo: Found UVC 1.00 device HP TrueVision HD
>>>>>> (05c8:03a3)
>>>>>> [ 26.095485] uvcvideo 1-4.2:1.0: Entity type for entity Extension 4
>>>>>> was
>>>>>> not initialized!
>>>>>> [ 26.095492] uvcvideo 1-4.2:1.0: Entity type for entity Processing 2
>>>>>> was
>>>>>> not initialized!
>>>>>> [ 26.095496] uvcvideo 1-4.2:1.0: Entity type for entity Camera 1 was
>>>>>> not
>>>>>> initialized!
>>>>>
>>>>>
>>>>> You can safely ignore those messages. I need to submit a patch to get
>>>>> rid
>>>>> of them.
>>>>>
>>>>>> Laurent, I've attached lsusb -v output so that you can check the
>>>>>> descriptors.
>>>>>
>>>>>
>>>>> Thank you.
>>>>>
>>>>> It's funny how UVC specifies a standard way to describe a device with
>>>>> two
>>>>> camera sensors with dynamic selection of one of them at runtime, and
>>>>> vendors instead implement vendor-specific crap :-(
>>>>>
>>>>> The interesting part in the descriptors is
>>>>>
>>>>> VideoControl Interface Descriptor:
>>>>> bLength 27
>>>>> bDescriptorType 36
>>>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>>>> bUnitID 4
>>>>> guidExtensionCode
>>>>> {1229a78c-47b4-4094-b0ce-db07386fb938}
>>>>> bNumControl 2
>>>>> bNrPins 1
>>>>> baSourceID( 0) 2
>>>>> bControlSize 2
>>>>> bmControls( 0) 0x00
>>>>> bmControls( 1) 0x06
>>>>> iExtension 0
>>>>>
>>>>> The extension unit exposes two controls (bmControls is a bitmask). They
>>>>> can be accessed from userspace through the UVCIOC_CTRL_QUERY ioctl, or
>>>>> mapped to V4L2 controls through the UVCIOC_CTRL_MAP ioctl, in which case
>>>>> they will be exposed to standard V4L2 applications.
>>>>>
>>>>> If you want to experiment with this, I would advise querying both
>>>>> controls
>>>>> with UVCIOC_CTRL_QUERY. You can use the UVC_GET_CUR, UVC_GET_MIN,
>>>>> UVC_GET_MAX, UVC_GET_DEF and UVC_GET_RES requests to get the control
>>>>> current, minimum, maximum, default and resolution values, and
>>>>> UVC_GET_LEN
>>>>> and UVC_GET_INFO to get the control size (in bytes) and flags. Based on
>>>>> that you can start experimenting with UVC_SET_CUR to set semi-random
>>>>> values.
>>>>>
>>>>> I'm however worried that those two controls would be a register address
>>>>> and a register value, for indirect access to all hardware registers in
>>>>> the device. In that case, you would likely need information from the
>>>>> device vendor, or possibly a USB traffic dump from a Windows machine
>>>>> when
>>>>> switching between the front and back cameras.
>>>>>
>>>>>> Carlos, it might be good to get Laurent your descriptors too, to do
>>>>>> this do "lsusb", note what is the <vid>:<pid> for your camera and then
>>>>>> run:
>>>>>>
>>>>>> sudo lsusb -v -d <vid>:<pid> > lsusb.log
>>>>>>
>>>>>> And send Laurent a mail with the generated lsusb
>>>>>
>>>>>
>>>>> That would be appreciated, but I expect the same issue :-(
>>>>
>>>>
>>>> Please find it attached. IIUC your last email, it might not be the
>>>> exact same issue, but you can definitely judge better.
>>>
>>>
>>> Your device is similar in the sense that it doesn't use the standard UVC
>>> support for multiple camera sensors. It instead exposes two extension
>>> units:
>>>
>>> VideoControl Interface Descriptor:
>>> bLength 27
>>> bDescriptorType 36
>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>> bUnitID 4
>>> guidExtensionCode {1229a78c-47b4-4094-b0ce-db07386fb938}
>>> bNumControl 2
>>> bNrPins 1
>>> baSourceID( 0) 2
>>> bControlSize 2
>>> bmControls( 0) 0x00
>>> bmControls( 1) 0x06
>>> iExtension 0
>>> VideoControl Interface Descriptor:
>>> bLength 29
>>> bDescriptorType 36
>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>> bUnitID 6
>>> guidExtensionCode {26b8105a-0713-4870-979d-da79444bb68e}
>>> bNumControl 9
>>> bNrPins 1
>>> baSourceID( 0) 4
>>> bControlSize 4
>>> bmControls( 0) 0x1f
>>> bmControls( 1) 0x01
>>> bmControls( 2) 0x38
>>> bmControls( 3) 0x00
>>> iExtension 6 Realtek Extended Controls Unit
>>>
>>> The first one is identical to Hans', and I expect it to offer indirect
>>> access
>>> to internal device registers. The second one exposes 9 controls, and I
>>> expect
>>> at least some of those to have direct effects on the device. What they do
>>> and
>>> how they operate is unfortunately unknown.
>>
>>
>> Laurent, thank you for your input on this. I thought it was a bit weird that
>> the cam on my HP X2 only had what appears to be the debug controls, so I
>> opened it up and as I suspect (after your analysis) it is using a USB module
>> for the front camera, but the back camera is a sensor directly hooked with
>> its
>> CSI/MIPI bus to the PCB, so very likely it is using the ATOMISP stuff.
>>
>> So I think that we can consider this "solved" for my 2-in-1.
>>
>> Carlos, your Acer is using a Core CPU (not an Atom) right ? And the front
>
> Indeed, it is an i5...
>
>> and
>> rear cams are both centered at the same edge I guess ? (mine had one in the
>> corner and the other centered which already was a hint)
>
> ...but now that you mention this, I have front camera centered and
> rear camera on a corner too. Is there any other info I may need to
> fetch? I assume ATOMISP is irrelevant here.
Skylake and kabylake also have an ATOMISP like device. What is the
output of lspci ? And what is your CPU model number? (cat /proc/cpuinfo)
Regards,
Hans
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Devices with a front and back webcam represented as a single UVC device
2018-07-11 17:41 ` Hans de Goede
@ 2018-07-11 18:26 ` Carlos Garnacho
2018-07-11 19:51 ` Hans de Goede
0 siblings, 1 reply; 15+ messages in thread
From: Carlos Garnacho @ 2018-07-11 18:26 UTC (permalink / raw)
To: Hans de Goede; +Cc: Carlos Garnacho, Laurent Pinchart, Linux Media Mailing List
[-- Attachment #1: Type: text/plain, Size: 8131 bytes --]
Hi!,
On Wed, Jul 11, 2018 at 7:41 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> Hi,
>
>
> On 11-07-18 18:07, Carlos Garnacho wrote:
>>
>> Hi!,
>>
>> On Wed, Jul 11, 2018 at 2:41 PM, Hans de Goede <hdegoede@redhat.com>
>> wrote:
>>>
>>> HI,
>>>
>>>
>>> On 11-07-18 14:08, Laurent Pinchart wrote:
>>>>
>>>>
>>>> Hi Carlos,
>>>>
>>>> On Wednesday, 11 July 2018 14:36:48 EEST Carlos Garnacho wrote:
>>>>>
>>>>>
>>>>> On Wed, Jul 11, 2018 at 1:00 PM, Laurent Pinchart wrote:
>>>>>>
>>>>>>
>>>>>> On Wednesday, 11 July 2018 11:37:14 EEST Hans de Goede wrote:
>>>>>>>
>>>>>>>
>>>>>>> Hi Laurent,
>>>>>>>
>>>>>>> At Guadec Carlos (in the Cc) told me that on his Acer 2-in-1 only
>>>>>>> the frontcam is working and it seems both are represented by a
>>>>>>> single UVC USB device. I've told him to check for some v4l control
>>>>>>> to flip between front and back.
>>>>>>>
>>>>>>> Carlos, as I mentioned you can try gtk-v4l
>>>>>>> ("sudo dnf install gtk-v4l") or qv4l2
>>>>>>> ("sudo dnf install qv4l2") these will both show
>>>>>>> you various controls for the camera. One of those might do the trick.
>>>>>>>
>>>>>>> But I recently bought a 2nd second hand Cherry Trail based HP
>>>>>>> X2 2-in-1 and much to my surprise that is actually using an UVC
>>>>>>> cam, rather then the usual ATOMISP crap and it has the same issue.
>>>>>>>
>>>>>>> This device does not seem to have a control to flip between the
>>>>>>> 2 cams, instead it registers 2 /dev/video? nodes but the second
>>>>>>> node does not work
>>>>>>
>>>>>>
>>>>>>
>>>>>> The second node is there to expose metadata to userspace, not image
>>>>>> data.
>>>>>> That's a recent addition to the uvcvideo driver.
>>>>>>
>>>>>>> and dmesg contains:
>>>>>>>
>>>>>>> [ 26.079868] uvcvideo: Found UVC 1.00 device HP TrueVision HD
>>>>>>> (05c8:03a3)
>>>>>>> [ 26.095485] uvcvideo 1-4.2:1.0: Entity type for entity Extension 4
>>>>>>> was
>>>>>>> not initialized!
>>>>>>> [ 26.095492] uvcvideo 1-4.2:1.0: Entity type for entity Processing
>>>>>>> 2
>>>>>>> was
>>>>>>> not initialized!
>>>>>>> [ 26.095496] uvcvideo 1-4.2:1.0: Entity type for entity Camera 1
>>>>>>> was
>>>>>>> not
>>>>>>> initialized!
>>>>>>
>>>>>>
>>>>>>
>>>>>> You can safely ignore those messages. I need to submit a patch to get
>>>>>> rid
>>>>>> of them.
>>>>>>
>>>>>>> Laurent, I've attached lsusb -v output so that you can check the
>>>>>>> descriptors.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thank you.
>>>>>>
>>>>>> It's funny how UVC specifies a standard way to describe a device with
>>>>>> two
>>>>>> camera sensors with dynamic selection of one of them at runtime, and
>>>>>> vendors instead implement vendor-specific crap :-(
>>>>>>
>>>>>> The interesting part in the descriptors is
>>>>>>
>>>>>> VideoControl Interface Descriptor:
>>>>>> bLength 27
>>>>>> bDescriptorType 36
>>>>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>>>>> bUnitID 4
>>>>>> guidExtensionCode
>>>>>> {1229a78c-47b4-4094-b0ce-db07386fb938}
>>>>>> bNumControl 2
>>>>>> bNrPins 1
>>>>>> baSourceID( 0) 2
>>>>>> bControlSize 2
>>>>>> bmControls( 0) 0x00
>>>>>> bmControls( 1) 0x06
>>>>>> iExtension 0
>>>>>>
>>>>>> The extension unit exposes two controls (bmControls is a bitmask).
>>>>>> They
>>>>>> can be accessed from userspace through the UVCIOC_CTRL_QUERY ioctl, or
>>>>>> mapped to V4L2 controls through the UVCIOC_CTRL_MAP ioctl, in which
>>>>>> case
>>>>>> they will be exposed to standard V4L2 applications.
>>>>>>
>>>>>> If you want to experiment with this, I would advise querying both
>>>>>> controls
>>>>>> with UVCIOC_CTRL_QUERY. You can use the UVC_GET_CUR, UVC_GET_MIN,
>>>>>> UVC_GET_MAX, UVC_GET_DEF and UVC_GET_RES requests to get the control
>>>>>> current, minimum, maximum, default and resolution values, and
>>>>>> UVC_GET_LEN
>>>>>> and UVC_GET_INFO to get the control size (in bytes) and flags. Based
>>>>>> on
>>>>>> that you can start experimenting with UVC_SET_CUR to set semi-random
>>>>>> values.
>>>>>>
>>>>>> I'm however worried that those two controls would be a register
>>>>>> address
>>>>>> and a register value, for indirect access to all hardware registers in
>>>>>> the device. In that case, you would likely need information from the
>>>>>> device vendor, or possibly a USB traffic dump from a Windows machine
>>>>>> when
>>>>>> switching between the front and back cameras.
>>>>>>
>>>>>>> Carlos, it might be good to get Laurent your descriptors too, to do
>>>>>>> this do "lsusb", note what is the <vid>:<pid> for your camera and
>>>>>>> then
>>>>>>> run:
>>>>>>>
>>>>>>> sudo lsusb -v -d <vid>:<pid> > lsusb.log
>>>>>>>
>>>>>>> And send Laurent a mail with the generated lsusb
>>>>>>
>>>>>>
>>>>>>
>>>>>> That would be appreciated, but I expect the same issue :-(
>>>>>
>>>>>
>>>>>
>>>>> Please find it attached. IIUC your last email, it might not be the
>>>>> exact same issue, but you can definitely judge better.
>>>>
>>>>
>>>>
>>>> Your device is similar in the sense that it doesn't use the standard UVC
>>>> support for multiple camera sensors. It instead exposes two extension
>>>> units:
>>>>
>>>> VideoControl Interface Descriptor:
>>>> bLength 27
>>>> bDescriptorType 36
>>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>>> bUnitID 4
>>>> guidExtensionCode
>>>> {1229a78c-47b4-4094-b0ce-db07386fb938}
>>>> bNumControl 2
>>>> bNrPins 1
>>>> baSourceID( 0) 2
>>>> bControlSize 2
>>>> bmControls( 0) 0x00
>>>> bmControls( 1) 0x06
>>>> iExtension 0
>>>> VideoControl Interface Descriptor:
>>>> bLength 29
>>>> bDescriptorType 36
>>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>>> bUnitID 6
>>>> guidExtensionCode
>>>> {26b8105a-0713-4870-979d-da79444bb68e}
>>>> bNumControl 9
>>>> bNrPins 1
>>>> baSourceID( 0) 4
>>>> bControlSize 4
>>>> bmControls( 0) 0x1f
>>>> bmControls( 1) 0x01
>>>> bmControls( 2) 0x38
>>>> bmControls( 3) 0x00
>>>> iExtension 6 Realtek Extended Controls Unit
>>>>
>>>> The first one is identical to Hans', and I expect it to offer indirect
>>>> access
>>>> to internal device registers. The second one exposes 9 controls, and I
>>>> expect
>>>> at least some of those to have direct effects on the device. What they
>>>> do
>>>> and
>>>> how they operate is unfortunately unknown.
>>>
>>>
>>>
>>> Laurent, thank you for your input on this. I thought it was a bit weird
>>> that
>>> the cam on my HP X2 only had what appears to be the debug controls, so I
>>> opened it up and as I suspect (after your analysis) it is using a USB
>>> module
>>> for the front camera, but the back camera is a sensor directly hooked
>>> with
>>> its
>>> CSI/MIPI bus to the PCB, so very likely it is using the ATOMISP stuff.
>>>
>>> So I think that we can consider this "solved" for my 2-in-1.
>>>
>>> Carlos, your Acer is using a Core CPU (not an Atom) right ? And the front
>>
>>
>> Indeed, it is an i5...
>>
>>> and
>>> rear cams are both centered at the same edge I guess ? (mine had one in
>>> the
>>> corner and the other centered which already was a hint)
>>
>>
>> ...but now that you mention this, I have front camera centered and
>> rear camera on a corner too. Is there any other info I may need to
>> fetch? I assume ATOMISP is irrelevant here.
>
>
> Skylake and kabylake also have an ATOMISP like device. What is the
> output of lspci ? And what is your CPU model number? (cat /proc/cpuinfo)
Oh I see, this is Skylake indeed, so I guess the issue is similar.
Attached cpuinfo contents FYI.
Cheers,
Carlos
[-- Attachment #2: cpuinfo.log --]
[-- Type: text/x-log, Size: 5004 bytes --]
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 78
model name : Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
stepping : 3
microcode : 0xc2
cpu MHz : 776.854
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4800.00
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 78
model name : Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
stepping : 3
microcode : 0xc2
cpu MHz : 771.278
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4800.00
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 78
model name : Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
stepping : 3
microcode : 0xc2
cpu MHz : 779.097
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4800.00
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 78
model name : Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
stepping : 3
microcode : 0xc2
cpu MHz : 777.439
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4800.00
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Devices with a front and back webcam represented as a single UVC device
2018-07-11 18:26 ` Carlos Garnacho
@ 2018-07-11 19:51 ` Hans de Goede
2018-07-18 11:53 ` Carlos Garnacho
0 siblings, 1 reply; 15+ messages in thread
From: Hans de Goede @ 2018-07-11 19:51 UTC (permalink / raw)
To: Carlos Garnacho; +Cc: Laurent Pinchart, Linux Media Mailing List
Hi,
On 11-07-18 20:26, Carlos Garnacho wrote:
> Hi!,
>
> On Wed, Jul 11, 2018 at 7:41 PM, Hans de Goede <hdegoede@redhat.com> wrote:
>> Hi,
>>
>>
>> On 11-07-18 18:07, Carlos Garnacho wrote:
>>>
>>> Hi!,
>>>
>>> On Wed, Jul 11, 2018 at 2:41 PM, Hans de Goede <hdegoede@redhat.com>
>>> wrote:
>>>>
>>>> HI,
>>>>
>>>>
>>>> On 11-07-18 14:08, Laurent Pinchart wrote:
>>>>>
>>>>>
>>>>> Hi Carlos,
>>>>>
>>>>> On Wednesday, 11 July 2018 14:36:48 EEST Carlos Garnacho wrote:
>>>>>>
>>>>>>
>>>>>> On Wed, Jul 11, 2018 at 1:00 PM, Laurent Pinchart wrote:
>>>>>>>
>>>>>>>
>>>>>>> On Wednesday, 11 July 2018 11:37:14 EEST Hans de Goede wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> Hi Laurent,
>>>>>>>>
>>>>>>>> At Guadec Carlos (in the Cc) told me that on his Acer 2-in-1 only
>>>>>>>> the frontcam is working and it seems both are represented by a
>>>>>>>> single UVC USB device. I've told him to check for some v4l control
>>>>>>>> to flip between front and back.
>>>>>>>>
>>>>>>>> Carlos, as I mentioned you can try gtk-v4l
>>>>>>>> ("sudo dnf install gtk-v4l") or qv4l2
>>>>>>>> ("sudo dnf install qv4l2") these will both show
>>>>>>>> you various controls for the camera. One of those might do the trick.
>>>>>>>>
>>>>>>>> But I recently bought a 2nd second hand Cherry Trail based HP
>>>>>>>> X2 2-in-1 and much to my surprise that is actually using an UVC
>>>>>>>> cam, rather then the usual ATOMISP crap and it has the same issue.
>>>>>>>>
>>>>>>>> This device does not seem to have a control to flip between the
>>>>>>>> 2 cams, instead it registers 2 /dev/video? nodes but the second
>>>>>>>> node does not work
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> The second node is there to expose metadata to userspace, not image
>>>>>>> data.
>>>>>>> That's a recent addition to the uvcvideo driver.
>>>>>>>
>>>>>>>> and dmesg contains:
>>>>>>>>
>>>>>>>> [ 26.079868] uvcvideo: Found UVC 1.00 device HP TrueVision HD
>>>>>>>> (05c8:03a3)
>>>>>>>> [ 26.095485] uvcvideo 1-4.2:1.0: Entity type for entity Extension 4
>>>>>>>> was
>>>>>>>> not initialized!
>>>>>>>> [ 26.095492] uvcvideo 1-4.2:1.0: Entity type for entity Processing
>>>>>>>> 2
>>>>>>>> was
>>>>>>>> not initialized!
>>>>>>>> [ 26.095496] uvcvideo 1-4.2:1.0: Entity type for entity Camera 1
>>>>>>>> was
>>>>>>>> not
>>>>>>>> initialized!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> You can safely ignore those messages. I need to submit a patch to get
>>>>>>> rid
>>>>>>> of them.
>>>>>>>
>>>>>>>> Laurent, I've attached lsusb -v output so that you can check the
>>>>>>>> descriptors.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thank you.
>>>>>>>
>>>>>>> It's funny how UVC specifies a standard way to describe a device with
>>>>>>> two
>>>>>>> camera sensors with dynamic selection of one of them at runtime, and
>>>>>>> vendors instead implement vendor-specific crap :-(
>>>>>>>
>>>>>>> The interesting part in the descriptors is
>>>>>>>
>>>>>>> VideoControl Interface Descriptor:
>>>>>>> bLength 27
>>>>>>> bDescriptorType 36
>>>>>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>>>>>> bUnitID 4
>>>>>>> guidExtensionCode
>>>>>>> {1229a78c-47b4-4094-b0ce-db07386fb938}
>>>>>>> bNumControl 2
>>>>>>> bNrPins 1
>>>>>>> baSourceID( 0) 2
>>>>>>> bControlSize 2
>>>>>>> bmControls( 0) 0x00
>>>>>>> bmControls( 1) 0x06
>>>>>>> iExtension 0
>>>>>>>
>>>>>>> The extension unit exposes two controls (bmControls is a bitmask).
>>>>>>> They
>>>>>>> can be accessed from userspace through the UVCIOC_CTRL_QUERY ioctl, or
>>>>>>> mapped to V4L2 controls through the UVCIOC_CTRL_MAP ioctl, in which
>>>>>>> case
>>>>>>> they will be exposed to standard V4L2 applications.
>>>>>>>
>>>>>>> If you want to experiment with this, I would advise querying both
>>>>>>> controls
>>>>>>> with UVCIOC_CTRL_QUERY. You can use the UVC_GET_CUR, UVC_GET_MIN,
>>>>>>> UVC_GET_MAX, UVC_GET_DEF and UVC_GET_RES requests to get the control
>>>>>>> current, minimum, maximum, default and resolution values, and
>>>>>>> UVC_GET_LEN
>>>>>>> and UVC_GET_INFO to get the control size (in bytes) and flags. Based
>>>>>>> on
>>>>>>> that you can start experimenting with UVC_SET_CUR to set semi-random
>>>>>>> values.
>>>>>>>
>>>>>>> I'm however worried that those two controls would be a register
>>>>>>> address
>>>>>>> and a register value, for indirect access to all hardware registers in
>>>>>>> the device. In that case, you would likely need information from the
>>>>>>> device vendor, or possibly a USB traffic dump from a Windows machine
>>>>>>> when
>>>>>>> switching between the front and back cameras.
>>>>>>>
>>>>>>>> Carlos, it might be good to get Laurent your descriptors too, to do
>>>>>>>> this do "lsusb", note what is the <vid>:<pid> for your camera and
>>>>>>>> then
>>>>>>>> run:
>>>>>>>>
>>>>>>>> sudo lsusb -v -d <vid>:<pid> > lsusb.log
>>>>>>>>
>>>>>>>> And send Laurent a mail with the generated lsusb
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> That would be appreciated, but I expect the same issue :-(
>>>>>>
>>>>>>
>>>>>>
>>>>>> Please find it attached. IIUC your last email, it might not be the
>>>>>> exact same issue, but you can definitely judge better.
>>>>>
>>>>>
>>>>>
>>>>> Your device is similar in the sense that it doesn't use the standard UVC
>>>>> support for multiple camera sensors. It instead exposes two extension
>>>>> units:
>>>>>
>>>>> VideoControl Interface Descriptor:
>>>>> bLength 27
>>>>> bDescriptorType 36
>>>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>>>> bUnitID 4
>>>>> guidExtensionCode
>>>>> {1229a78c-47b4-4094-b0ce-db07386fb938}
>>>>> bNumControl 2
>>>>> bNrPins 1
>>>>> baSourceID( 0) 2
>>>>> bControlSize 2
>>>>> bmControls( 0) 0x00
>>>>> bmControls( 1) 0x06
>>>>> iExtension 0
>>>>> VideoControl Interface Descriptor:
>>>>> bLength 29
>>>>> bDescriptorType 36
>>>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>>>> bUnitID 6
>>>>> guidExtensionCode
>>>>> {26b8105a-0713-4870-979d-da79444bb68e}
>>>>> bNumControl 9
>>>>> bNrPins 1
>>>>> baSourceID( 0) 4
>>>>> bControlSize 4
>>>>> bmControls( 0) 0x1f
>>>>> bmControls( 1) 0x01
>>>>> bmControls( 2) 0x38
>>>>> bmControls( 3) 0x00
>>>>> iExtension 6 Realtek Extended Controls Unit
>>>>>
>>>>> The first one is identical to Hans', and I expect it to offer indirect
>>>>> access
>>>>> to internal device registers. The second one exposes 9 controls, and I
>>>>> expect
>>>>> at least some of those to have direct effects on the device. What they
>>>>> do
>>>>> and
>>>>> how they operate is unfortunately unknown.
>>>>
>>>>
>>>>
>>>> Laurent, thank you for your input on this. I thought it was a bit weird
>>>> that
>>>> the cam on my HP X2 only had what appears to be the debug controls, so I
>>>> opened it up and as I suspect (after your analysis) it is using a USB
>>>> module
>>>> for the front camera, but the back camera is a sensor directly hooked
>>>> with
>>>> its
>>>> CSI/MIPI bus to the PCB, so very likely it is using the ATOMISP stuff.
>>>>
>>>> So I think that we can consider this "solved" for my 2-in-1.
>>>>
>>>> Carlos, your Acer is using a Core CPU (not an Atom) right ? And the front
>>>
>>>
>>> Indeed, it is an i5...
>>>
>>>> and
>>>> rear cams are both centered at the same edge I guess ? (mine had one in
>>>> the
>>>> corner and the other centered which already was a hint)
>>>
>>>
>>> ...but now that you mention this, I have front camera centered and
>>> rear camera on a corner too. Is there any other info I may need to
>>> fetch? I assume ATOMISP is irrelevant here.
>>
>>
>> Skylake and kabylake also have an ATOMISP like device. What is the
>> output of lspci ? And what is your CPU model number? (cat /proc/cpuinfo)
>
> Oh I see, this is Skylake indeed, so I guess the issue is similar.
I think that your CPU does have integrated camera support, but that does
not necessarily mean it is used. If it is used it should show up in
lspci.
Can you provide lspci output ? And is there any output for:
lsmod | grep ipu3
Regards,
Hans
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Devices with a front and back webcam represented as a single UVC device
2018-07-11 12:41 ` Hans de Goede
2018-07-11 16:07 ` Carlos Garnacho
@ 2018-07-12 13:01 ` Laurent Pinchart
2018-07-24 12:35 ` Javier Martinez Canillas
1 sibling, 1 reply; 15+ messages in thread
From: Laurent Pinchart @ 2018-07-12 13:01 UTC (permalink / raw)
To: Hans de Goede; +Cc: Carlos Garnacho, Linux Media Mailing List
Hi Hans,
On Wednesday, 11 July 2018 15:41:10 EEST Hans de Goede wrote:
> On 11-07-18 14:08, Laurent Pinchart wrote:
> > On Wednesday, 11 July 2018 14:36:48 EEST Carlos Garnacho wrote:
> >> On Wed, Jul 11, 2018 at 1:00 PM, Laurent Pinchart wrote:
> >>> On Wednesday, 11 July 2018 11:37:14 EEST Hans de Goede wrote:
> >>>> Hi Laurent,
> >>>>
> >>>> At Guadec Carlos (in the Cc) told me that on his Acer 2-in-1 only
> >>>> the frontcam is working and it seems both are represented by a
> >>>> single UVC USB device. I've told him to check for some v4l control
> >>>> to flip between front and back.
> >>>>
> >>>> Carlos, as I mentioned you can try gtk-v4l
> >>>> ("sudo dnf install gtk-v4l") or qv4l2
> >>>> ("sudo dnf install qv4l2") these will both show
> >>>> you various controls for the camera. One of those might do the trick.
> >>>>
> >>>> But I recently bought a 2nd second hand Cherry Trail based HP
> >>>> X2 2-in-1 and much to my surprise that is actually using an UVC
> >>>> cam, rather then the usual ATOMISP crap and it has the same issue.
> >>>>
> >>>> This device does not seem to have a control to flip between the
> >>>> 2 cams, instead it registers 2 /dev/video? nodes but the second
> >>>> node does not work
> >>>
> >>> The second node is there to expose metadata to userspace, not image
> >>> data. That's a recent addition to the uvcvideo driver.
> >>>
> >>>> and dmesg contains:
> >>>>
> >>>> [ 26.079868] uvcvideo: Found UVC 1.00 device HP TrueVision HD
> >>>> (05c8:03a3)
> >>>> [ 26.095485] uvcvideo 1-4.2:1.0: Entity type for entity Extension 4
> >>>> was not initialized!
> >>>> [ 26.095492] uvcvideo 1-4.2:1.0: Entity type for entity Processing 2
> >>>> was not initialized!
> >>>> [ 26.095496] uvcvideo 1-4.2:1.0: Entity type for entity Camera 1 was
> >>>> not initialized!
> >>>
> >>> You can safely ignore those messages. I need to submit a patch to get
> >>> rid of them.
> >>>
> >>>> Laurent, I've attached lsusb -v output so that you can check the
> >>>> descriptors.
> >>>
> >>> Thank you.
> >>>
> >>> It's funny how UVC specifies a standard way to describe a device with
> >>> two camera sensors with dynamic selection of one of them at runtime, and
> >>> vendors instead implement vendor-specific crap :-(
> >>>
> >>> The interesting part in the descriptors is
> >>>
> >>> VideoControl Interface Descriptor:
> >>> bLength 27
> >>> bDescriptorType 36
> >>> bDescriptorSubtype 6 (EXTENSION_UNIT)
> >>> bUnitID 4
> >>> guidExtensionCode
> >>> {1229a78c-47b4-4094-b0ce-db07386fb938}
> >>> bNumControl 2
> >>> bNrPins 1
> >>> baSourceID( 0) 2
> >>> bControlSize 2
> >>> bmControls( 0) 0x00
> >>> bmControls( 1) 0x06
> >>> iExtension 0
> >>>
> >>> The extension unit exposes two controls (bmControls is a bitmask). They
> >>> can be accessed from userspace through the UVCIOC_CTRL_QUERY ioctl, or
> >>> mapped to V4L2 controls through the UVCIOC_CTRL_MAP ioctl, in which case
> >>> they will be exposed to standard V4L2 applications.
> >>>
> >>> If you want to experiment with this, I would advise querying both
> >>> controls with UVCIOC_CTRL_QUERY. You can use the UVC_GET_CUR,
> >>> UVC_GET_MIN, UVC_GET_MAX, UVC_GET_DEF and UVC_GET_RES requests to get
> >>> the control current, minimum, maximum, default and resolution values,
> >>> and UVC_GET_LEN and UVC_GET_INFO to get the control size (in bytes) and
> >>> flags. Based on that you can start experimenting with UVC_SET_CUR to set
> >>> semi-random values.
> >>>
> >>> I'm however worried that those two controls would be a register address
> >>> and a register value, for indirect access to all hardware registers in
> >>> the device. In that case, you would likely need information from the
> >>> device vendor, or possibly a USB traffic dump from a Windows machine
> >>> when switching between the front and back cameras.
> >>>
> >>>> Carlos, it might be good to get Laurent your descriptors too, to do
> >>>> this do "lsusb", note what is the <vid>:<pid> for your camera and then
> >>>> run:
> >>>>
> >>>> sudo lsusb -v -d <vid>:<pid> > lsusb.log
> >>>>
> >>>> And send Laurent a mail with the generated lsusb
> >>>
> >>> That would be appreciated, but I expect the same issue :-(
> >>
> >> Please find it attached. IIUC your last email, it might not be the
> >> exact same issue, but you can definitely judge better.
> >
> > Your device is similar in the sense that it doesn't use the standard UVC
> >
> > support for multiple camera sensors. It instead exposes two extension
> > units:
> > VideoControl Interface Descriptor:
> > bLength 27
> > bDescriptorType 36
> > bDescriptorSubtype 6 (EXTENSION_UNIT)
> > bUnitID 4
> > guidExtensionCode {1229a78c-47b4-4094-b0ce-db07386fb938}
> > bNumControl 2
> > bNrPins 1
> > baSourceID( 0) 2
> > bControlSize 2
> > bmControls( 0) 0x00
> > bmControls( 1) 0x06
> > iExtension 0
> >
> > VideoControl Interface Descriptor:
> > bLength 29
> > bDescriptorType 36
> > bDescriptorSubtype 6 (EXTENSION_UNIT)
> > bUnitID 6
> > guidExtensionCode {26b8105a-0713-4870-979d-da79444bb68e}
> > bNumControl 9
> > bNrPins 1
> > baSourceID( 0) 4
> > bControlSize 4
> > bmControls( 0) 0x1f
> > bmControls( 1) 0x01
> > bmControls( 2) 0x38
> > bmControls( 3) 0x00
> > iExtension 6 Realtek Extended Controls Unit
> >
> > The first one is identical to Hans', and I expect it to offer indirect
> > access to internal device registers. The second one exposes 9 controls,
> > and I expect at least some of those to have direct effects on the device.
> > What they do and how they operate is unfortunately unknown.
>
> Laurent, thank you for your input on this. I thought it was a bit weird that
> the cam on my HP X2 only had what appears to be the debug controls, so I
> opened it up and as I suspect (after your analysis) it is using a USB
> module for the front camera, but the back camera is a sensor directly
> hooked with its CSI/MIPI bus to the PCB, so very likely it is using the
> ATOMISP stuff.
>
> So I think that we can consider this "solved" for my 2-in-1.
Great, I'll add you to the list of potential testers for an ATOMISP solution
:-)
> Carlos, your Acer is using a Core CPU (not an Atom) right ? And the front
> and rear cams are both centered at the same edge I guess ? (mine had one
> in the corner and the other centered which already was a hint)
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Devices with a front and back webcam represented as a single UVC device
2018-07-11 19:51 ` Hans de Goede
@ 2018-07-18 11:53 ` Carlos Garnacho
2018-07-18 13:00 ` Hans de Goede
0 siblings, 1 reply; 15+ messages in thread
From: Carlos Garnacho @ 2018-07-18 11:53 UTC (permalink / raw)
To: Hans de Goede; +Cc: Carlos Garnacho, Laurent Pinchart, Linux Media Mailing List
[-- Attachment #1: Type: text/plain, Size: 9785 bytes --]
Hey,
On Wed, Jul 11, 2018 at 9:51 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> Hi,
>
>
> On 11-07-18 20:26, Carlos Garnacho wrote:
>>
>> Hi!,
>>
>> On Wed, Jul 11, 2018 at 7:41 PM, Hans de Goede <hdegoede@redhat.com>
>> wrote:
>>>
>>> Hi,
>>>
>>>
>>> On 11-07-18 18:07, Carlos Garnacho wrote:
>>>>
>>>>
>>>> Hi!,
>>>>
>>>> On Wed, Jul 11, 2018 at 2:41 PM, Hans de Goede <hdegoede@redhat.com>
>>>> wrote:
>>>>>
>>>>>
>>>>> HI,
>>>>>
>>>>>
>>>>> On 11-07-18 14:08, Laurent Pinchart wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi Carlos,
>>>>>>
>>>>>> On Wednesday, 11 July 2018 14:36:48 EEST Carlos Garnacho wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jul 11, 2018 at 1:00 PM, Laurent Pinchart wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wednesday, 11 July 2018 11:37:14 EEST Hans de Goede wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Hi Laurent,
>>>>>>>>>
>>>>>>>>> At Guadec Carlos (in the Cc) told me that on his Acer 2-in-1 only
>>>>>>>>> the frontcam is working and it seems both are represented by a
>>>>>>>>> single UVC USB device. I've told him to check for some v4l control
>>>>>>>>> to flip between front and back.
>>>>>>>>>
>>>>>>>>> Carlos, as I mentioned you can try gtk-v4l
>>>>>>>>> ("sudo dnf install gtk-v4l") or qv4l2
>>>>>>>>> ("sudo dnf install qv4l2") these will both show
>>>>>>>>> you various controls for the camera. One of those might do the
>>>>>>>>> trick.
>>>>>>>>>
>>>>>>>>> But I recently bought a 2nd second hand Cherry Trail based HP
>>>>>>>>> X2 2-in-1 and much to my surprise that is actually using an UVC
>>>>>>>>> cam, rather then the usual ATOMISP crap and it has the same issue.
>>>>>>>>>
>>>>>>>>> This device does not seem to have a control to flip between the
>>>>>>>>> 2 cams, instead it registers 2 /dev/video? nodes but the second
>>>>>>>>> node does not work
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> The second node is there to expose metadata to userspace, not image
>>>>>>>> data.
>>>>>>>> That's a recent addition to the uvcvideo driver.
>>>>>>>>
>>>>>>>>> and dmesg contains:
>>>>>>>>>
>>>>>>>>> [ 26.079868] uvcvideo: Found UVC 1.00 device HP TrueVision HD
>>>>>>>>> (05c8:03a3)
>>>>>>>>> [ 26.095485] uvcvideo 1-4.2:1.0: Entity type for entity Extension
>>>>>>>>> 4
>>>>>>>>> was
>>>>>>>>> not initialized!
>>>>>>>>> [ 26.095492] uvcvideo 1-4.2:1.0: Entity type for entity
>>>>>>>>> Processing
>>>>>>>>> 2
>>>>>>>>> was
>>>>>>>>> not initialized!
>>>>>>>>> [ 26.095496] uvcvideo 1-4.2:1.0: Entity type for entity Camera 1
>>>>>>>>> was
>>>>>>>>> not
>>>>>>>>> initialized!
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> You can safely ignore those messages. I need to submit a patch to
>>>>>>>> get
>>>>>>>> rid
>>>>>>>> of them.
>>>>>>>>
>>>>>>>>> Laurent, I've attached lsusb -v output so that you can check the
>>>>>>>>> descriptors.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Thank you.
>>>>>>>>
>>>>>>>> It's funny how UVC specifies a standard way to describe a device
>>>>>>>> with
>>>>>>>> two
>>>>>>>> camera sensors with dynamic selection of one of them at runtime, and
>>>>>>>> vendors instead implement vendor-specific crap :-(
>>>>>>>>
>>>>>>>> The interesting part in the descriptors is
>>>>>>>>
>>>>>>>> VideoControl Interface Descriptor:
>>>>>>>> bLength 27
>>>>>>>> bDescriptorType 36
>>>>>>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>>>>>>> bUnitID 4
>>>>>>>> guidExtensionCode
>>>>>>>> {1229a78c-47b4-4094-b0ce-db07386fb938}
>>>>>>>> bNumControl 2
>>>>>>>> bNrPins 1
>>>>>>>> baSourceID( 0) 2
>>>>>>>> bControlSize 2
>>>>>>>> bmControls( 0) 0x00
>>>>>>>> bmControls( 1) 0x06
>>>>>>>> iExtension 0
>>>>>>>>
>>>>>>>> The extension unit exposes two controls (bmControls is a bitmask).
>>>>>>>> They
>>>>>>>> can be accessed from userspace through the UVCIOC_CTRL_QUERY ioctl,
>>>>>>>> or
>>>>>>>> mapped to V4L2 controls through the UVCIOC_CTRL_MAP ioctl, in which
>>>>>>>> case
>>>>>>>> they will be exposed to standard V4L2 applications.
>>>>>>>>
>>>>>>>> If you want to experiment with this, I would advise querying both
>>>>>>>> controls
>>>>>>>> with UVCIOC_CTRL_QUERY. You can use the UVC_GET_CUR, UVC_GET_MIN,
>>>>>>>> UVC_GET_MAX, UVC_GET_DEF and UVC_GET_RES requests to get the control
>>>>>>>> current, minimum, maximum, default and resolution values, and
>>>>>>>> UVC_GET_LEN
>>>>>>>> and UVC_GET_INFO to get the control size (in bytes) and flags. Based
>>>>>>>> on
>>>>>>>> that you can start experimenting with UVC_SET_CUR to set semi-random
>>>>>>>> values.
>>>>>>>>
>>>>>>>> I'm however worried that those two controls would be a register
>>>>>>>> address
>>>>>>>> and a register value, for indirect access to all hardware registers
>>>>>>>> in
>>>>>>>> the device. In that case, you would likely need information from the
>>>>>>>> device vendor, or possibly a USB traffic dump from a Windows machine
>>>>>>>> when
>>>>>>>> switching between the front and back cameras.
>>>>>>>>
>>>>>>>>> Carlos, it might be good to get Laurent your descriptors too, to do
>>>>>>>>> this do "lsusb", note what is the <vid>:<pid> for your camera and
>>>>>>>>> then
>>>>>>>>> run:
>>>>>>>>>
>>>>>>>>> sudo lsusb -v -d <vid>:<pid> > lsusb.log
>>>>>>>>>
>>>>>>>>> And send Laurent a mail with the generated lsusb
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> That would be appreciated, but I expect the same issue :-(
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Please find it attached. IIUC your last email, it might not be the
>>>>>>> exact same issue, but you can definitely judge better.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Your device is similar in the sense that it doesn't use the standard
>>>>>> UVC
>>>>>> support for multiple camera sensors. It instead exposes two extension
>>>>>> units:
>>>>>>
>>>>>> VideoControl Interface Descriptor:
>>>>>> bLength 27
>>>>>> bDescriptorType 36
>>>>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>>>>> bUnitID 4
>>>>>> guidExtensionCode
>>>>>> {1229a78c-47b4-4094-b0ce-db07386fb938}
>>>>>> bNumControl 2
>>>>>> bNrPins 1
>>>>>> baSourceID( 0) 2
>>>>>> bControlSize 2
>>>>>> bmControls( 0) 0x00
>>>>>> bmControls( 1) 0x06
>>>>>> iExtension 0
>>>>>> VideoControl Interface Descriptor:
>>>>>> bLength 29
>>>>>> bDescriptorType 36
>>>>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>>>>> bUnitID 6
>>>>>> guidExtensionCode
>>>>>> {26b8105a-0713-4870-979d-da79444bb68e}
>>>>>> bNumControl 9
>>>>>> bNrPins 1
>>>>>> baSourceID( 0) 4
>>>>>> bControlSize 4
>>>>>> bmControls( 0) 0x1f
>>>>>> bmControls( 1) 0x01
>>>>>> bmControls( 2) 0x38
>>>>>> bmControls( 3) 0x00
>>>>>> iExtension 6 Realtek Extended Controls Unit
>>>>>>
>>>>>> The first one is identical to Hans', and I expect it to offer indirect
>>>>>> access
>>>>>> to internal device registers. The second one exposes 9 controls, and I
>>>>>> expect
>>>>>> at least some of those to have direct effects on the device. What they
>>>>>> do
>>>>>> and
>>>>>> how they operate is unfortunately unknown.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Laurent, thank you for your input on this. I thought it was a bit weird
>>>>> that
>>>>> the cam on my HP X2 only had what appears to be the debug controls, so
>>>>> I
>>>>> opened it up and as I suspect (after your analysis) it is using a USB
>>>>> module
>>>>> for the front camera, but the back camera is a sensor directly hooked
>>>>> with
>>>>> its
>>>>> CSI/MIPI bus to the PCB, so very likely it is using the ATOMISP stuff.
>>>>>
>>>>> So I think that we can consider this "solved" for my 2-in-1.
>>>>>
>>>>> Carlos, your Acer is using a Core CPU (not an Atom) right ? And the
>>>>> front
>>>>
>>>>
>>>>
>>>> Indeed, it is an i5...
>>>>
>>>>> and
>>>>> rear cams are both centered at the same edge I guess ? (mine had one
>>>>> in
>>>>> the
>>>>> corner and the other centered which already was a hint)
>>>>
>>>>
>>>>
>>>> ...but now that you mention this, I have front camera centered and
>>>> rear camera on a corner too. Is there any other info I may need to
>>>> fetch? I assume ATOMISP is irrelevant here.
>>>
>>>
>>>
>>> Skylake and kabylake also have an ATOMISP like device. What is the
>>> output of lspci ? And what is your CPU model number? (cat /proc/cpuinfo)
>>
>>
>> Oh I see, this is Skylake indeed, so I guess the issue is similar.
>
>
> I think that your CPU does have integrated camera support, but that does
> not necessarily mean it is used. If it is used it should show up in
> lspci.
>
> Can you provide lspci output ? And is there any output for:
Sorry for the late reply. lspci -vvv output is attached.
>
> lsmod | grep ipu3
There indeed is:
$ lsmod |grep ipu3
ipu3_cio2 36864 0
v4l2_fwnode 20480 1 ipu3_cio2
videobuf2_dma_sg 16384 1 ipu3_cio2
videobuf2_v4l2 28672 2 uvcvideo,ipu3_cio2
videobuf2_common 53248 3 uvcvideo,ipu3_cio2,videobuf2_v4l2
videodev 208896 5
v4l2_fwnode,uvcvideo,videobuf2_common,ipu3_cio2,videobuf2_v4l2
media 45056 3 uvcvideo,videodev,ipu3_cio2
In lspci output I seem to see "Device 9d32" used by ipu3_cio2, you
probably mean that one?
Thanks,
Carlos
[-- Attachment #2: lspci.log --]
[-- Type: text/x-log, Size: 22119 bytes --]
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Capabilities: [e0] Vendor Specific Information: Len=10 <?>
Kernel driver in use: skl_uncore
00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07) (prog-if 00 [VGA controller])
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 125
Region 0: Memory at b0000000 (64-bit, non-prefetchable) [size=16M]
Region 2: Memory at a0000000 (64-bit, prefetchable) [size=256M]
Region 4: I/O ports at 3000 [size=64]
[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: [40] Vendor Specific Information: Len=0c <?>
Capabilities: [70] Express (v2) Root Complex Integrated Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0
ExtTag- RBE+
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
DevCap2: Completion Timeout: Not Supported, TimeoutDis-, LTR-, OBFF Not Supported
AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
AtomicOpsCtl: ReqEn-
Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
Address: fee00018 Data: 0000
Capabilities: [d0] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [100 v1] Process Address Space ID (PASID)
PASIDCap: Exec+ Priv-, Max PASID Width: 14
PASIDCtl: Enable- Exec- Priv-
Capabilities: [200 v1] Address Translation Service (ATS)
ATSCap: Invalidate Queue Depth: 00
ATSCtl: Enable-, Smallest Translation Unit: 00
Capabilities: [300 v1] Page Request Interface (PRI)
PRICtl: Enable- Reset-
PRISta: RF- UPRGI- Stopped-
Page Request Capacity: 00008000, Page Request Allocation: 00000000
Kernel driver in use: i915
Kernel modules: i915
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 08)
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 16
Region 0: Memory at b1630000 (64-bit, non-prefetchable) [size=32K]
Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit-
Address: 00000000 Data: 0000
Capabilities: [d0] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [e0] Vendor Specific Information: Len=0c <?>
Kernel driver in use: proc_thermal
Kernel modules: processor_thermal_device
00:05.0 Multimedia controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Imaging Unit (rev 01)
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 255
Region 0: Memory at b1000000 (64-bit, non-prefetchable) [size=4M]
Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [a0] PCI Advanced Features
AFCap: TP+ FLR+
AFCtrl: FLR-
AFStatus: TP-
Capabilities: [d0] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
00:13.0 Non-VGA unclassified device: Intel Corporation Sunrise Point-LP Integrated Sensor Hub (rev 21)
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 20
Region 0: Memory at b1642000 (64-bit, non-prefetchable) [size=4K]
Capabilities: [80] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Kernel driver in use: intel_ish_ipc
Kernel modules: intel_ish_ipc
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21) (prog-if 30 [XHCI])
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 124
Region 0: Memory at b1600000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [70] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
Address: 00000000fee00278 Data: 0000
Kernel driver in use: xhci_hcd
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin C routed to IRQ 18
Region 0: Memory at b1643000 (64-bit, non-prefetchable) [size=4K]
Capabilities: [50] Power Management version 3
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
Address: 00000000 Data: 0000
Kernel driver in use: intel_pch_thermal
Kernel modules: intel_pch_thermal
00:14.3 Multimedia controller: Intel Corporation Device 9d32 (rev 01)
Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 16
Region 0: Memory at b1610000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [d0] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Kernel modules: ipu3_cio2
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 16
Region 0: Memory at b1644000 (64-bit, non-prefetchable) [size=4K]
Capabilities: [80] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [90] Vendor Specific Information: Len=14 <?>
Kernel driver in use: intel-lpss
Kernel modules: intel_lpss_pci
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21)
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin B routed to IRQ 17
Region 0: Memory at b1645000 (64-bit, non-prefetchable) [size=4K]
Capabilities: [80] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [90] Vendor Specific Information: Len=14 <?>
Kernel driver in use: intel-lpss
Kernel modules: intel_lpss_pci
00:15.2 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #2 (rev 21)
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin C routed to IRQ 18
Region 0: Memory at b1646000 (64-bit, non-prefetchable) [size=4K]
Capabilities: [80] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [90] Vendor Specific Information: Len=14 <?>
Kernel driver in use: intel-lpss
Kernel modules: intel_lpss_pci
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 150
Region 0: Memory at b1647000 (64-bit, non-prefetchable) [size=4K]
Capabilities: [50] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [8c] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee002f8 Data: 0000
Kernel driver in use: mei_me
Kernel modules: mei_me
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21) (prog-if 01 [AHCI 1.0])
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 123
Region 0: Memory at b1640000 (32-bit, non-prefetchable) [size=8K]
Region 1: Memory at b164a000 (32-bit, non-prefetchable) [size=256]
Region 2: I/O ports at 3080 [size=8]
Region 3: I/O ports at 3088 [size=4]
Region 4: I/O ports at 3060 [size=32]
Region 5: Memory at b1648000 (32-bit, non-prefetchable) [size=2K]
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Address: fee00258 Data: 0000
Capabilities: [70] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [a8] SATA HBA v1.0 BAR4 Offset=00000004
Kernel driver in use: ahci
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 122
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 0000f000-00000fff [empty]
Memory behind bridge: b1400000-b15fffff [size=2M]
Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [empty]
Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0
ExtTag- RBE+
DevCtl: Report errors: Correctable+ Non-Fatal+ Fatal+ Unsupported+
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 256 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #9, Speed 8GT/s, Width x1, ASPM L1, Exit Latency L1 <16us
ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
Slot #8, PowerLimit 10.000W; Interlock- NoCompl+
SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
Changed: MRL- PresDet+ LinkState+
RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible-
RootCap: CRSVisible-
RootSta: PME ReqID 0000, PMEStatus- PMEPending-
DevCap2: Completion Timeout: Range ABC, TimeoutDis+, LTR+, OBFF Not Supported ARIFwd+
AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF Disabled ARIFwd-
AtomicOpsCtl: ReqEn- EgressBlck-
LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Address: fee00238 Data: 0000
Capabilities: [90] Subsystem: Acer Incorporated [ALI] Device 111e
Capabilities: [a0] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt+ RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
HeaderLog: 00000000 00000000 00000000 00000000
RootCmd: CERptEn- NFERptEn- FERptEn-
RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd-
FirstFatal- NonFatalMsg- FatalMsg- IntMsg 0
ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000
Capabilities: [140 v1] Access Control Services
ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd- EgressCtrl- DirectTrans-
ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans-
Capabilities: [200 v1] L1 PM Substates
L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
PortCommonModeRestoreTime=40us PortTPowerOnTime=10us
L1SubCtl1: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+
T_CommonMode=50us LTR1.2_Threshold=163840ns
L1SubCtl2: T_PwrOn=10us
Capabilities: [220 v1] #19
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Region 0: Memory at b163c000 (32-bit, non-prefetchable) [size=16K]
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 32, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 151
Region 0: Memory at b1638000 (64-bit, non-prefetchable) [size=16K]
Region 4: Memory at b1620000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [50] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee00318 Data: 0000
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel, snd_soc_skl
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
Subsystem: Acer Incorporated [ALI] Device 111e
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 16
Region 0: Memory at b1649000 (64-bit, non-prefetchable) [size=256]
Region 4: I/O ports at 3040 [size=32]
Kernel driver in use: i801_smbus
Kernel modules: i2c_i801
01:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
Subsystem: Lite-On Communications Inc Device 0807
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 152
Region 0: Memory at b1400000 (64-bit, non-prefetchable) [size=2M]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable+ Count=1/8 Maskable+ 64bit-
Address: fee00338 Data: 0000
Masking: 000000fe Pending: 00000000
Capabilities: [70] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 <64us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 10.000W
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 256 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 <64us
ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR+, OBFF Via message
AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF Disabled
AtomicOpsCtl: ReqEn-
LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
Capabilities: [100 v2] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP+ Rollover- Timeout- NonFatalErr-
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
HeaderLog: 00000000 00000000 00000000 00000000
Capabilities: [148 v1] Virtual Channel
Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
Arb: Fixed- WRR32- WRR64- WRR128-
Ctrl: ArbSelect=Fixed
Status: InProgress-
VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
Status: NegoPending- InProgress-
Capabilities: [168 v1] Device Serial Number 00-00-00-00-00-00-00-00
Capabilities: [178 v1] Latency Tolerance Reporting
Max snoop latency: 3145728ns
Max no snoop latency: 3145728ns
Capabilities: [180 v1] L1 PM Substates
L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
PortCommonModeRestoreTime=50us PortTPowerOnTime=10us
L1SubCtl1: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+
T_CommonMode=0us LTR1.2_Threshold=163840ns
L1SubCtl2: T_PwrOn=10us
Kernel driver in use: ath10k_pci
Kernel modules: ath10k_pci, wl
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Devices with a front and back webcam represented as a single UVC device
2018-07-18 11:53 ` Carlos Garnacho
@ 2018-07-18 13:00 ` Hans de Goede
0 siblings, 0 replies; 15+ messages in thread
From: Hans de Goede @ 2018-07-18 13:00 UTC (permalink / raw)
To: Carlos Garnacho; +Cc: Laurent Pinchart, Linux Media Mailing List
Hi,
On 18-07-18 13:53, Carlos Garnacho wrote:
> Hey,
>
> On Wed, Jul 11, 2018 at 9:51 PM, Hans de Goede <hdegoede@redhat.com> wrote:
>> Hi,
>>
>>
>> On 11-07-18 20:26, Carlos Garnacho wrote:
>>>
>>> Hi!,
>>>
>>> On Wed, Jul 11, 2018 at 7:41 PM, Hans de Goede <hdegoede@redhat.com>
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>>
>>>> On 11-07-18 18:07, Carlos Garnacho wrote:
>>>>>
>>>>>
>>>>> Hi!,
>>>>>
>>>>> On Wed, Jul 11, 2018 at 2:41 PM, Hans de Goede <hdegoede@redhat.com>
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> HI,
>>>>>>
>>>>>>
>>>>>> On 11-07-18 14:08, Laurent Pinchart wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Hi Carlos,
>>>>>>>
>>>>>>> On Wednesday, 11 July 2018 14:36:48 EEST Carlos Garnacho wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Jul 11, 2018 at 1:00 PM, Laurent Pinchart wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wednesday, 11 July 2018 11:37:14 EEST Hans de Goede wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Hi Laurent,
>>>>>>>>>>
>>>>>>>>>> At Guadec Carlos (in the Cc) told me that on his Acer 2-in-1 only
>>>>>>>>>> the frontcam is working and it seems both are represented by a
>>>>>>>>>> single UVC USB device. I've told him to check for some v4l control
>>>>>>>>>> to flip between front and back.
>>>>>>>>>>
>>>>>>>>>> Carlos, as I mentioned you can try gtk-v4l
>>>>>>>>>> ("sudo dnf install gtk-v4l") or qv4l2
>>>>>>>>>> ("sudo dnf install qv4l2") these will both show
>>>>>>>>>> you various controls for the camera. One of those might do the
>>>>>>>>>> trick.
>>>>>>>>>>
>>>>>>>>>> But I recently bought a 2nd second hand Cherry Trail based HP
>>>>>>>>>> X2 2-in-1 and much to my surprise that is actually using an UVC
>>>>>>>>>> cam, rather then the usual ATOMISP crap and it has the same issue.
>>>>>>>>>>
>>>>>>>>>> This device does not seem to have a control to flip between the
>>>>>>>>>> 2 cams, instead it registers 2 /dev/video? nodes but the second
>>>>>>>>>> node does not work
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> The second node is there to expose metadata to userspace, not image
>>>>>>>>> data.
>>>>>>>>> That's a recent addition to the uvcvideo driver.
>>>>>>>>>
>>>>>>>>>> and dmesg contains:
>>>>>>>>>>
>>>>>>>>>> [ 26.079868] uvcvideo: Found UVC 1.00 device HP TrueVision HD
>>>>>>>>>> (05c8:03a3)
>>>>>>>>>> [ 26.095485] uvcvideo 1-4.2:1.0: Entity type for entity Extension
>>>>>>>>>> 4
>>>>>>>>>> was
>>>>>>>>>> not initialized!
>>>>>>>>>> [ 26.095492] uvcvideo 1-4.2:1.0: Entity type for entity
>>>>>>>>>> Processing
>>>>>>>>>> 2
>>>>>>>>>> was
>>>>>>>>>> not initialized!
>>>>>>>>>> [ 26.095496] uvcvideo 1-4.2:1.0: Entity type for entity Camera 1
>>>>>>>>>> was
>>>>>>>>>> not
>>>>>>>>>> initialized!
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> You can safely ignore those messages. I need to submit a patch to
>>>>>>>>> get
>>>>>>>>> rid
>>>>>>>>> of them.
>>>>>>>>>
>>>>>>>>>> Laurent, I've attached lsusb -v output so that you can check the
>>>>>>>>>> descriptors.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thank you.
>>>>>>>>>
>>>>>>>>> It's funny how UVC specifies a standard way to describe a device
>>>>>>>>> with
>>>>>>>>> two
>>>>>>>>> camera sensors with dynamic selection of one of them at runtime, and
>>>>>>>>> vendors instead implement vendor-specific crap :-(
>>>>>>>>>
>>>>>>>>> The interesting part in the descriptors is
>>>>>>>>>
>>>>>>>>> VideoControl Interface Descriptor:
>>>>>>>>> bLength 27
>>>>>>>>> bDescriptorType 36
>>>>>>>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>>>>>>>> bUnitID 4
>>>>>>>>> guidExtensionCode
>>>>>>>>> {1229a78c-47b4-4094-b0ce-db07386fb938}
>>>>>>>>> bNumControl 2
>>>>>>>>> bNrPins 1
>>>>>>>>> baSourceID( 0) 2
>>>>>>>>> bControlSize 2
>>>>>>>>> bmControls( 0) 0x00
>>>>>>>>> bmControls( 1) 0x06
>>>>>>>>> iExtension 0
>>>>>>>>>
>>>>>>>>> The extension unit exposes two controls (bmControls is a bitmask).
>>>>>>>>> They
>>>>>>>>> can be accessed from userspace through the UVCIOC_CTRL_QUERY ioctl,
>>>>>>>>> or
>>>>>>>>> mapped to V4L2 controls through the UVCIOC_CTRL_MAP ioctl, in which
>>>>>>>>> case
>>>>>>>>> they will be exposed to standard V4L2 applications.
>>>>>>>>>
>>>>>>>>> If you want to experiment with this, I would advise querying both
>>>>>>>>> controls
>>>>>>>>> with UVCIOC_CTRL_QUERY. You can use the UVC_GET_CUR, UVC_GET_MIN,
>>>>>>>>> UVC_GET_MAX, UVC_GET_DEF and UVC_GET_RES requests to get the control
>>>>>>>>> current, minimum, maximum, default and resolution values, and
>>>>>>>>> UVC_GET_LEN
>>>>>>>>> and UVC_GET_INFO to get the control size (in bytes) and flags. Based
>>>>>>>>> on
>>>>>>>>> that you can start experimenting with UVC_SET_CUR to set semi-random
>>>>>>>>> values.
>>>>>>>>>
>>>>>>>>> I'm however worried that those two controls would be a register
>>>>>>>>> address
>>>>>>>>> and a register value, for indirect access to all hardware registers
>>>>>>>>> in
>>>>>>>>> the device. In that case, you would likely need information from the
>>>>>>>>> device vendor, or possibly a USB traffic dump from a Windows machine
>>>>>>>>> when
>>>>>>>>> switching between the front and back cameras.
>>>>>>>>>
>>>>>>>>>> Carlos, it might be good to get Laurent your descriptors too, to do
>>>>>>>>>> this do "lsusb", note what is the <vid>:<pid> for your camera and
>>>>>>>>>> then
>>>>>>>>>> run:
>>>>>>>>>>
>>>>>>>>>> sudo lsusb -v -d <vid>:<pid> > lsusb.log
>>>>>>>>>>
>>>>>>>>>> And send Laurent a mail with the generated lsusb
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> That would be appreciated, but I expect the same issue :-(
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Please find it attached. IIUC your last email, it might not be the
>>>>>>>> exact same issue, but you can definitely judge better.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Your device is similar in the sense that it doesn't use the standard
>>>>>>> UVC
>>>>>>> support for multiple camera sensors. It instead exposes two extension
>>>>>>> units:
>>>>>>>
>>>>>>> VideoControl Interface Descriptor:
>>>>>>> bLength 27
>>>>>>> bDescriptorType 36
>>>>>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>>>>>> bUnitID 4
>>>>>>> guidExtensionCode
>>>>>>> {1229a78c-47b4-4094-b0ce-db07386fb938}
>>>>>>> bNumControl 2
>>>>>>> bNrPins 1
>>>>>>> baSourceID( 0) 2
>>>>>>> bControlSize 2
>>>>>>> bmControls( 0) 0x00
>>>>>>> bmControls( 1) 0x06
>>>>>>> iExtension 0
>>>>>>> VideoControl Interface Descriptor:
>>>>>>> bLength 29
>>>>>>> bDescriptorType 36
>>>>>>> bDescriptorSubtype 6 (EXTENSION_UNIT)
>>>>>>> bUnitID 6
>>>>>>> guidExtensionCode
>>>>>>> {26b8105a-0713-4870-979d-da79444bb68e}
>>>>>>> bNumControl 9
>>>>>>> bNrPins 1
>>>>>>> baSourceID( 0) 4
>>>>>>> bControlSize 4
>>>>>>> bmControls( 0) 0x1f
>>>>>>> bmControls( 1) 0x01
>>>>>>> bmControls( 2) 0x38
>>>>>>> bmControls( 3) 0x00
>>>>>>> iExtension 6 Realtek Extended Controls Unit
>>>>>>>
>>>>>>> The first one is identical to Hans', and I expect it to offer indirect
>>>>>>> access
>>>>>>> to internal device registers. The second one exposes 9 controls, and I
>>>>>>> expect
>>>>>>> at least some of those to have direct effects on the device. What they
>>>>>>> do
>>>>>>> and
>>>>>>> how they operate is unfortunately unknown.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Laurent, thank you for your input on this. I thought it was a bit weird
>>>>>> that
>>>>>> the cam on my HP X2 only had what appears to be the debug controls, so
>>>>>> I
>>>>>> opened it up and as I suspect (after your analysis) it is using a USB
>>>>>> module
>>>>>> for the front camera, but the back camera is a sensor directly hooked
>>>>>> with
>>>>>> its
>>>>>> CSI/MIPI bus to the PCB, so very likely it is using the ATOMISP stuff.
>>>>>>
>>>>>> So I think that we can consider this "solved" for my 2-in-1.
>>>>>>
>>>>>> Carlos, your Acer is using a Core CPU (not an Atom) right ? And the
>>>>>> front
>>>>>
>>>>>
>>>>>
>>>>> Indeed, it is an i5...
>>>>>
>>>>>> and
>>>>>> rear cams are both centered at the same edge I guess ? (mine had one
>>>>>> in
>>>>>> the
>>>>>> corner and the other centered which already was a hint)
>>>>>
>>>>>
>>>>>
>>>>> ...but now that you mention this, I have front camera centered and
>>>>> rear camera on a corner too. Is there any other info I may need to
>>>>> fetch? I assume ATOMISP is irrelevant here.
>>>>
>>>>
>>>>
>>>> Skylake and kabylake also have an ATOMISP like device. What is the
>>>> output of lspci ? And what is your CPU model number? (cat /proc/cpuinfo)
>>>
>>>
>>> Oh I see, this is Skylake indeed, so I guess the issue is similar.
>>
>>
>> I think that your CPU does have integrated camera support, but that does
>> not necessarily mean it is used. If it is used it should show up in
>> lspci.
>>
>> Can you provide lspci output ? And is there any output for:
>
> Sorry for the late reply. lspci -vvv output is attached.
>
>>
>> lsmod | grep ipu3
>
> There indeed is:
>
> $ lsmod |grep ipu3
> ipu3_cio2 36864 0
> v4l2_fwnode 20480 1 ipu3_cio2
> videobuf2_dma_sg 16384 1 ipu3_cio2
> videobuf2_v4l2 28672 2 uvcvideo,ipu3_cio2
> videobuf2_common 53248 3 uvcvideo,ipu3_cio2,videobuf2_v4l2
> videodev 208896 5
> v4l2_fwnode,uvcvideo,videobuf2_common,ipu3_cio2,videobuf2_v4l2
> media 45056 3 uvcvideo,videodev,ipu3_cio2
>
> In lspci output I seem to see "Device 9d32" used by ipu3_cio2, you
> probably mean that one?
Yes, so that means that your device also uses one UVC camera
+ one connected directly to the SoC.
The ipu3_cio2 support is in slightly better state then the
ATOMISP support, but still it will not work out of the box.
Regards,
Hans
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Devices with a front and back webcam represented as a single UVC device
2018-07-12 13:01 ` Laurent Pinchart
@ 2018-07-24 12:35 ` Javier Martinez Canillas
2018-07-25 23:06 ` Laurent Pinchart
0 siblings, 1 reply; 15+ messages in thread
From: Javier Martinez Canillas @ 2018-07-24 12:35 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: Hans de Goede, Carlos Garnacho, Linux Media Mailing List
Hi Laurent,
On Thu, Jul 12, 2018 at 3:01 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
[snip]
>>
>> Laurent, thank you for your input on this. I thought it was a bit weird that
>> the cam on my HP X2 only had what appears to be the debug controls, so I
>> opened it up and as I suspect (after your analysis) it is using a USB
>> module for the front camera, but the back camera is a sensor directly
>> hooked with its CSI/MIPI bus to the PCB, so very likely it is using the
>> ATOMISP stuff.
>>
>> So I think that we can consider this "solved" for my 2-in-1.
>
> Great, I'll add you to the list of potential testers for an ATOMISP solution
> :-)
>
The ATOMISP driver was removed from staging by commit 51b8dc5163d
("media: staging: atomisp: Remove driver"). Do you mean that there's a
plan to bring that driver back?
Best regards,
Javier
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Devices with a front and back webcam represented as a single UVC device
2018-07-24 12:35 ` Javier Martinez Canillas
@ 2018-07-25 23:06 ` Laurent Pinchart
0 siblings, 0 replies; 15+ messages in thread
From: Laurent Pinchart @ 2018-07-25 23:06 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: Hans de Goede, Carlos Garnacho, Linux Media Mailing List
Hi Javier,
On Tuesday, 24 July 2018 15:35:17 EEST Javier Martinez Canillas wrote:
> On Thu, Jul 12, 2018 at 3:01 PM, Laurent Pinchart wrote:
>
> [snip]
>
> >> Laurent, thank you for your input on this. I thought it was a bit weird
> >> that the cam on my HP X2 only had what appears to be the debug controls,
> >> so I opened it up and as I suspect (after your analysis) it is using a
> >> USB module for the front camera, but the back camera is a sensor
> >> directly hooked with its CSI/MIPI bus to the PCB, so very likely it is
> >> using the ATOMISP stuff.
> >>
> >> So I think that we can consider this "solved" for my 2-in-1.
> >
> > Great, I'll add you to the list of potential testers for an ATOMISP
> > solution :-)
>
> The ATOMISP driver was removed from staging by commit 51b8dc5163d
> ("media: staging: atomisp: Remove driver"). Do you mean that there's a
> plan to bring that driver back?
I don't think so, unless someone is willing to invest the time it would need
to bring it back.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2018-07-26 0:19 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-11 8:37 Devices with a front and back webcam represented as a single UVC device Hans de Goede
2018-07-11 11:00 ` Laurent Pinchart
2018-07-11 11:03 ` Laurent Pinchart
2018-07-11 11:36 ` Carlos Garnacho
2018-07-11 12:08 ` Laurent Pinchart
2018-07-11 12:41 ` Hans de Goede
2018-07-11 16:07 ` Carlos Garnacho
2018-07-11 17:41 ` Hans de Goede
2018-07-11 18:26 ` Carlos Garnacho
2018-07-11 19:51 ` Hans de Goede
2018-07-18 11:53 ` Carlos Garnacho
2018-07-18 13:00 ` Hans de Goede
2018-07-12 13:01 ` Laurent Pinchart
2018-07-24 12:35 ` Javier Martinez Canillas
2018-07-25 23:06 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).