You are not logged in.

#1 2018-03-24 17:23:17

shadock
Member
Registered: 2018-03-24
Posts: 4

DELL xps13 9370 - webcam support

Hi,
This thread is a follow-up of the dell forum here: https://www.dell.com/community/Linux-Ge … -p/6032049
which seems to indicates that:
- multiple problem with webcam for this new laptop
- the webcam support problem may be a hardware problem

but I don't think so.

So my 9370's webcam does not work out of the box either.
But as describerd in dell forum, the webcam is correctly tested in the bios tests (and the 'activation' light is correctly on when the test is running).

Here is my dmesg output:

uvcvideo: Found UVC 1.50 device Integrated_Webcam_HD (0bda:58f4)
uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
uvcvideo: Failed to query (129) UVC probe control : -75 (exp. 34).
uvcvideo: Failed to initialize the device (-5).
uvcvideo: Unknown video format 00000032-0002-0010-8000-00aa00389b71
uvcvideo: Found UVC 1.50 device Integrated_Webcam_HD (0bda:58f4)
uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
uvcvideo: Failed to query (129) UVC probe control : -75 (exp. 34).
uvcvideo: Failed to initialize the device (-5).
usbcore: registered new interface driver uvcvideo

2) here is here an intersting discussion from kernel guys about the "unknown video format error":

https://www.mail-archive.com/linux-medi … 27992.html

Not the same problem (their cam seems to work), but what I find interesting here is their dmesg output: it shows:

uvcvideo: Found UVC 1.00 device Integrated_Webcam_HD (0bda:58f4)

=> 1.00 device instead of 1.50 device in my case.

3) the 'failed to query error' comes from drivers/media/usb/uvc/uvc_video.c,
in uvc_get_video_ctrl when quering for UVC_GET_CUR (0x81 aka 129),
after tried to query for UVC_GET_DEF who failed (we can see this in our dmesg output)

In both cases, the failed query cause is a comparaison between the return of the query
and the 'size' which is dependent of the device version !
(size = stream->dev->uvc_version >= 0x0110 ? 34 : 26;)

So, why some 0bda:58f4 devices are detected as 1.00 devices and other 0bda:58f4 (same) devices
are detected as 1.50 devices ?

(for now I did not found why)

below is the lsusb -v output, it can be good to compare it with guys havind a 1.00 device detected.

4) If found also another possiblity here:

https://github.com/Dunedan/mbp-2016-linux/issues/4

Not the same cam, but the symptoms are nearly the same.
And their solutions is interesting: if the device need some kind of initialisation,
perhaps some of us did not initialize it and some other did.
(in my case, I certainly did not: I received the ubuntu edition yesterday and directly wipe all partitions
and install archlinux from scratch, without even terminate the ubuntu welcome process)

Regards,
Tom.

below my lsusb output [beggining of lsusb...]

Bus 001 Device 002: ID 0bda:58f4 Realtek Semiconductor Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.01
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x0bda Realtek Semiconductor Corp.
  idProduct          0x58f4
  bcdDevice           72.79
  iManufacturer           3 CN0FFMHCLOG00823BCFAA01
  iProduct                1 Integrated_Webcam_HD
  iSerial                 2 200901010001
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength         1088
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          4 USB Camera
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    ** UNRECOGNIZED:  28 ff 42 49 53 54 00 01 06 07 10 00 00 00 00 00 01 08 f4 01 02 09 f4 01 03 0a f4 01 04 0b f4 01 05 0c f4 01 06 0d e8 03
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0
      iFunction               5 Integrated Webcam
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      1
      iInterface              5 Integrated Webcam
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.50
        wTotalLength          138
        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                13
        bDescriptorType        36
        bDescriptorSubtype      5 (PROCESSING_UNIT)
        bUnitID                 2
        bSourceID               1
        wMaxMultiplier          0
        bControlSize            3
        bmControls     0x0000177f
          Brightness
          Contrast
          Hue
          Saturation
          Sharpness
          Gamma
          
          White Balance Temperature
          Backlight Compensation
          Gain
          Power Line Frequency
          White Balance Temperature, Auto
        iProcessing             0
        bmVideoStandards     0x00
      VideoControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             3
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               6
        iTerminal               0

Last edited by shadock (2018-03-24 17:41:41)

Offline

#2 2018-03-24 17:34:58

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 2,869

Re: DELL xps13 9370 - webcam support

Welcome to the forums shadock smile

Please use [code⁣] tags, not [quote⁣] tags when pasting logs/command outputs.
CoC - Pasting pictures and code


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2018-03-24 18:05:40

shadock
Member
Registered: 2018-03-24
Posts: 4

Re: DELL xps13 9370 - webcam support

Thanks, done.

Here is a first follow-up of my ongoing investigations:

the -75 return code is an error code from __uvc_query_ctrl which calls usb_control_msg

Negative return is error, found in errno.h:

#define EOVERFLOW   75  /* Value too large for defined data type */

Which may not be a good news according to linux doc:
https://www.kernel.org/doc/html/v4.12/d … es.html#f1

Error codes like -EPROTO, -EILSEQ and -EOVERFLOW normally indicate hardware problems such as bad devices (including firmware) or cables.

It does not quite explain the 1.00 vs 1.50 diffence thus.

So if you own the new 9370, could you please paste here the first part of your lsusb -v -d 0bda:58f4 ??

Thanks,
Tom.

Offline

#4 2018-03-26 03:25:04

toddejohnson
Member
Registered: 2015-07-28
Posts: 1

Re: DELL xps13 9370 - webcam support

I have one that is having this issue too:

[    6.421145] uvcvideo: Found UVC 1.50 device Integrated_Webcam_HD (0bda:58f4)
[    6.421724] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
[    6.422050] uvcvideo: Failed to query (129) UVC probe control : -75 (exp. 34).
[    6.422089] uvcvideo: Failed to initialize the device (-5).
[    6.422635] uvcvideo: Unknown video format 00000032-0002-0010-8000-00aa00389b71
[    6.422640] uvcvideo: Found UVC 1.50 device Integrated_Webcam_HD (0bda:58f4)
[    6.423212] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
[    6.423514] uvcvideo: Failed to query (129) UVC probe control : -75 (exp. 34).
[    6.423536] uvcvideo: Failed to initialize the device (-5).
[    6.423570] usbcore: registered new interface driver uvcvideo

https://pastebin.com/HA8iJG9g

Offline

#5 2018-03-26 08:07:06

shadock
Member
Registered: 2018-03-24
Posts: 4

Re: DELL xps13 9370 - webcam support

Here are some news:

- a colleague brought this laptop at the same time, and also received it friday and also directly installed arch and he has exactly the same problem under arch, but he tried a windows VM and the webcam is working under the the VM.
So it's definitely not a hardware problem.
After the VM test, he retried to modprobe under linux, but same problem (so it's not the same isight 'initialisation' problem).

- a guy posted a dmesg and lsusb under dell forum, it shows some interesting differences (including the 1.00 vs 1.50 difference):

diff /tmp/mylsusb.txt lsusb.txt 
6c6
<   bcdUSB               2.01
---
>   bcdUSB               2.10
8c8
<   bDeviceSubClass         2 
---
>   bDeviceSubClass         2 ?
13,16c13,16
<   bcdDevice           72.79
<   iManufacturer           3 CN0FFMHCLOG00823BCFAA01
<   iProduct                1 Integrated_Webcam_HD
<   iSerial                 2 200901010001
---
>   bcdDevice           76.05
>   iManufacturer           3 
>   iProduct                1 
>   iSerial                 2 
21c21
<     wTotalLength         1088
---
>     wTotalLength         1047
24c24
<     iConfiguration          4 USB Camera
---
>     iConfiguration          4 
37c37
<       iFunction               5 Integrated Webcam
---
>       iFunction               5 
46,47c46,47
<       bInterfaceProtocol      1 
<       iInterface              5 Integrated Webcam
---
>       bInterfaceProtocol      0 
>       iInterface              5 
52,53c52,53
<         bcdUVC               1.50
<         wTotalLength          138
---
>         bcdUVC               1.00
>         wTotalLength          107
74c74

(...)

We are indeed certainly missing some camera firmware update.

Offline

#6 2018-03-30 17:48:38

elParaguayo
Member
Registered: 2018-03-30
Posts: 4

Re: DELL xps13 9370 - webcam support

I'm new to Arch but I've just noticed this problem too on my XPS 13 (9350). Funny thing is, I could have sworn the webcam was working when I first installed Arch a month or so ago and it was definitely working on Ubuntu 16.04 before I removed that...

My dmesg extract is as follows

[    2.247567] uvcvideo: Found UVC 1.00 device Integrated_Webcam_HD (0c45:670c)
[    2.286915] uvcvideo 1-5:1.0: Entity type for entity Extension 4 was not initialized!
[    2.286921] uvcvideo 1-5:1.0: Entity type for entity Extension 3 was not initialized!
[    2.286926] uvcvideo 1-5:1.0: Entity type for entity Processing 2 was not initialized!
[    2.286931] uvcvideo 1-5:1.0: Entity type for entity Camera 1 was not initialized!
[    2.288825] usbcore: registered new interface driver uvcvideo

uname -a

Linux elParaguayo-laptop 4.15.13-1-ARCH #1 SMP PREEMPT Sun Mar 25 11:27:57 UTC 2018 x86_64 GNU/Linux

lsusb output

Bus 001 Device 003: ID 0c45:670c Microdia 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.01
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x0c45 Microdia
  idProduct          0x670c 
  bcdDevice           56.26
  iManufacturer           2 CN09GTFM7248763KB7B4A01
  iProduct                1 Integrated_Webcam_HD
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          532
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    ** UNRECOGNIZED:  28 ff 42 49 53 54 00 01 06 01 10 00 00 00 00 00 d1 10 f4 01 d2 11 f4 01 d3 12 f4 01 d4 13 f4 01 d5 14 f4 01 d6 15 f4 01
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0 
      iFunction               5 Integrated Webcam
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0 
      iInterface              5 Integrated Webcam
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.00
        wTotalLength          103
        dwClockFrequency       15.000000MHz
        bInCollection           1
        baInterfaceNr( 0)       1
      VideoControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             5
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               4
        iTerminal               0 
      VideoControl Interface Descriptor:
        bLength                26
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 3
        guidExtensionCode         {28f03370-6311-4a2e-ba2c-6890eb334016}
        bNumControl             8
        bNrPins                 1
        baSourceID( 0)          2
        bControlSize            1
        bmControls( 0)       0x1f
        iExtension              0 
      VideoControl Interface Descriptor:
        bLength                26
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 4
        guidExtensionCode         {0fb885c3-68c2-4547-90f7-8f47579d95fc}
        bNumControl             8
        bNrPins                 1
        baSourceID( 0)          3
        bControlSize            1
        bmControls( 0)       0x0f
        iExtension              0 
      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           0x0000000a
          Auto-Exposure Mode
          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     0x00
      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           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              5 Integrated Webcam
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
        INTERFACE CLASS:  0f 24 01 02 4f 01 82 00 05 00 00 00 01 00 00
        INTERFACE CLASS:  0b 24 06 01 03 00 01 00 00 00 00
        INTERFACE CLASS:  1e 24 07 01 00 00 05 d0 02 30 28 60 1a 30 28 60 1a 4d 22 1c 00 15 16 05 00 01 15 16 05 00
        INTERFACE CLASS:  1e 24 07 02 00 c0 03 1c 02 30 08 d7 0e 30 08 d7 0e 4d d4 0f 00 15 16 05 00 01 15 16 05 00
        INTERFACE CLASS:  1e 24 07 03 00 50 03 e0 01 30 68 a7 0b 30 68 a7 0b 4d 6e 0c 00 15 16 05 00 01 15 16 05 00
        INTERFACE CLASS:  06 24 0d 01 01 04
        INTERFACE CLASS:  1b 24 04 02 06 59 55 59 32 00 00 10 00 80 00 00 aa 00 38 9b 71 10 01 00 00 00 00
        INTERFACE CLASS:  1e 24 05 01 00 80 02 e0 01 00 00 ca 08 00 00 ca 08 00 60 09 00 15 16 05 00 01 15 16 05 00
        INTERFACE CLASS:  1e 24 05 02 00 80 02 68 01 00 80 97 06 00 80 97 06 00 08 07 00 15 16 05 00 01 15 16 05 00
        INTERFACE CLASS:  1e 24 05 03 00 a8 01 f0 00 00 50 e9 02 00 50 e9 02 00 1b 03 00 15 16 05 00 01 15 16 05 00
        INTERFACE CLASS:  1e 24 05 04 00 40 01 f0 00 00 80 32 02 00 80 32 02 00 58 02 00 15 16 05 00 01 15 16 05 00
        INTERFACE CLASS:  1e 24 05 05 00 40 01 b4 00 00 e0 a5 01 00 e0 a5 01 00 c2 01 00 15 16 05 00 01 15 16 05 00
        INTERFACE CLASS:  1e 24 05 06 00 a0 00 78 00 00 a0 8c 00 00 a0 8c 00 00 96 00 00 15 16 05 00 01 15 16 05 00
        INTERFACE CLASS:  06 24 0d 01 01 04
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           12
  bNumDeviceCaps          1
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      HIRD Link Power Management (LPM) Supported
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0002
  (Bus Powered)
  Remote Wakeup Enabled

Offline

#7 2018-03-30 18:13:06

elParaguayo
Member
Registered: 2018-03-30
Posts: 4

Re: DELL xps13 9370 - webcam support

Maybe my issue is something else. I have a "/dev/video0" device listed but neither cheese nor fswebcam seem to be working. However guvcview does enable the camera.

Offline

#8 2018-04-01 09:05:10

shadock
Member
Registered: 2018-03-24
Posts: 4

Re: DELL xps13 9370 - webcam support

Yes, certainly another problem in your 9350.

Some updates about the 9370 cam problem:

- i've tested unded a Win10 VM and inside the VM, the webcam works fine ! (my colleague tested also and it's also working fine in his 9370)

So it's now certain, it's not a hardware problem. it seems that dell currently solves this problem by replacing the screen, but certainly in order to install a cam with an updated firmware.
There is two questions  / possibility now:

1) how can we upgrade the firmware to make it work on linux ? (i've tried all the upgrade available on dell site to date, without success and tryied to find something in the realtek site but I did not found anything (perhaps because their list of sofware is so messy).

2) if the cam is working fine under windows with the current firmware, why is it not working under linux ? There is perharps some update to do in the uvcvideo module to make it work. Did not find anything for now, but I did not clearly understand yet why it's crashing. (i've also tested all the quirks for this module, without success [did not try all the quirks combinations, only each quirk one by one])

Offline

#9 2018-04-09 18:59:02

kang
Member
Registered: 2010-08-07
Posts: 82

Re: DELL xps13 9370 - webcam support

edit: all of this is already in the thread now

Last edited by kang (2018-04-16 06:02:21)

Offline

#10 2018-05-31 00:52:47

kang
Member
Registered: 2010-08-07
Posts: 82

Re: DELL xps13 9370 - webcam support

note, the latest patches on lkml fix this

Offline

#11 2018-06-04 09:18:20

majella
Member
Registered: 2018-06-04
Posts: 1

Re: DELL xps13 9370 - webcam support

kang wrote:

note, the latest patches on lkml fix this

Hi, I've tried both 4.17.00 and 4.16.13 but I still get this:

$ dmesg | grep video
[    5.975202] Linux video capture interface: v2.00
[    6.125626] uvcvideo: Found UVC 1.50 device Integrated_Webcam_HD (0bda:58f4)
[    6.130816] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
[    6.131140] uvcvideo: Failed to query (129) UVC probe control : -75 (exp. 34).
[    6.131143] uvcvideo: Failed to initialize the device (-5).
[    6.131687] uvcvideo: Unknown video format 00000032-0002-0010-8000-00aa00389b71
[    6.131692] uvcvideo: Found UVC 1.50 device Integrated_Webcam_HD (0bda:58f4)
[    6.132381] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
[    6.132694] uvcvideo: Failed to query (129) UVC probe control : -75 (exp. 34).
[    6.132696] uvcvideo: Failed to initialize the device (-5).
[    6.132718] usbcore: registered new interface driver uvcvideo

Can you point a build that solves the issue? Thanks

Offline

#12 2018-06-13 05:40:14

Deciare
Member
From: UTC -8:00
Registered: 2005-05-05
Posts: 79

Re: DELL xps13 9370 - webcam support

The issue with UVC firmware version 1.5 was reported to the Dell forum a while back. There's a proposed solution here: https://www.dell.com/community/Linux-Ge … rue#M16104

Following that thread leads to this patch: https://lkml.org/lkml/2018/5/22/975
Based on what's written in the thread, the patch may make it into kernel 4.20; I haven't followed what happened with it since, so I don't know if that's still the case.

The patch does not apply cleanly to kernel 4.16.13, so I made some edits. Here's the updated patch:

diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index eb9e04a59427..285b0e813b9d 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -207,14 +207,27 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming *stream,
 	}
 }
 
+static size_t uvc_video_ctrl_size(struct uvc_streaming *stream)
+{
+	/*
+	 * Return the size of the video probe and commit controls, which depends
+	 * on the protocol version.
+	 */
+	if (stream->dev->uvc_version < 0x0110)
+		return 26;
+	else if (stream->dev->uvc_version < 0x0150)
+		return 34;
+	else
+		return 48;
+}
+
 static int uvc_get_video_ctrl(struct uvc_streaming *stream,
 	struct uvc_streaming_control *ctrl, int probe, __u8 query)
 {
+	__u16 size = uvc_video_ctrl_size(stream);
 	__u8 *data;
-	__u16 size;
 	int ret;
 
-	size = stream->dev->uvc_version >= 0x0110 ? 34 : 26;
 	if ((stream->dev->quirks & UVC_QUIRK_PROBE_DEF) &&
 			query == UVC_GET_DEF)
 		return -EIO;
@@ -271,7 +284,7 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,
 	ctrl->dwMaxVideoFrameSize = get_unaligned_le32(&data[18]);
 	ctrl->dwMaxPayloadTransferSize = get_unaligned_le32(&data[22]);
 
-	if (size == 34) {
+	if (size >= 34) {
 		ctrl->dwClockFrequency = get_unaligned_le32(&data[26]);
 		ctrl->bmFramingInfo = data[30];
 		ctrl->bPreferedVersion = data[31];
@@ -300,11 +313,10 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,
 static int uvc_set_video_ctrl(struct uvc_streaming *stream,
 	struct uvc_streaming_control *ctrl, int probe)
 {
+	__u16 size = uvc_video_ctrl_size(stream);
 	__u8 *data;
-	__u16 size;
 	int ret;
 
-	size = stream->dev->uvc_version >= 0x0110 ? 34 : 26;
 	data = kzalloc(size, GFP_KERNEL);
 	if (data == NULL)
 		return -ENOMEM;
@@ -321,7 +333,7 @@ static int uvc_set_video_ctrl(struct uvc_streaming *stream,
 	put_unaligned_le32(ctrl->dwMaxVideoFrameSize, &data[18]);
 	put_unaligned_le32(ctrl->dwMaxPayloadTransferSize, &data[22]);
 
-	if (size == 34) {
+	if (size >= 34) {
 		put_unaligned_le32(ctrl->dwClockFrequency, &data[26]);
 		data[30] = ctrl->bmFramingInfo;
 		data[31] = ctrl->bPreferedVersion;

I used asp to download the sources for Arch's linux package, then edited PKGBUILD to include the patch just before the config step. Then just

makepkg -si

to build and install the modified package.

There's hypothetically a way to build just the uvcvideo module without needing to build the entire kernel, but I don't know enough about the kernel build process to make that work.

Offline

#13 2018-06-25 20:27:04

gersondev
Member
Registered: 2018-06-25
Posts: 1

Re: DELL xps13 9370 - webcam support

Hi,

I was able to compile just the specific module following the Arch Linux guide to do so

Just get the patch file from https://lkml.org/lkml/diff/2018/5/22/975/1 (In the current kernel version 4.17.2 the patch can be applied directly)
Follow the steps on that page and in the actual module compilation use

$ make M=drivers/media/usb/uvc

Then to install the module from the linux source code directory

$ xz drivers/media/usb/uvc/uvcvideo.ko
# cp -f drivers/media/usb/uvc/uvcvideo.ko.xz /usr/lib/modules/`uname -r`/kernel/drivers/media/usb/uvc/

And last generate the linux image and reboot

$ mkinitcpio -p linux

Offline

Board footer

Powered by FluxBB