mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Josef Šimánek" <josef.simanek@gmail.com>
To: ming_qian@realsil.com.cn
Cc: linux-kernel@vger.kernel.org, "Josef Šimánek" <josef.simanek@gmail.com>
Subject: RE: media: uvcvideo: Support realtek's UVC 1.5 device
Date: Mon, 14 May 2018 19:28:49 +0200	[thread overview]
Message-ID: <20180514172849.27224-1-josef.simanek@gmail.com> (raw)
In-Reply-To: <1525831988-32017-1-git-send-email-ming_qian@realsil.com.cn>

> The length of UVC 1.5 video control is 48, and it id 34 for UVC 1.1.
> Change it to 48 for UVC 1.5 device,
> and the UVC 1.5 device can be recognized.
> 
> More changes to the driver are needed for full UVC 1.5 compatibility.
> However, at least the UVC 1.5 Realtek RTS5847/RTS5852 cameras have
> been reported to work well.
> 
> Signed-off-by: ming_qian <ming_qian@realsil.com.cn>
> Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Hello! I have sucessfully tested this patch on Kernel 4.16.1 (Fedora 28) with Dell XPS 9370
using following device (output from lsusb):

Bus 001 Device 002: ID 0bda:58f4 Realtek Semiconductor Corp.

You can also find related dmesg output at https://bugs.launchpad.net/dell-sputnik/+bug/1763748/comments/35

Tested-by: Josef Šimánek <josef.simanek@gmail.com>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/media/usb/uvc/uvc_video.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
> index aa0082f..32dfb32 100644
> --- a/drivers/media/usb/uvc/uvc_video.c
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -171,6 +171,8 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,
>  	int ret;
>  
>  	size = stream->dev->uvc_version >= 0x0110 ? 34 : 26;
> +	if (stream->dev->uvc_version >= 0x0150)
> +		size = 48;
>  	if ((stream->dev->quirks & UVC_QUIRK_PROBE_DEF) &&
>  			query == UVC_GET_DEF)
>  		return -EIO;
> @@ -259,6 +261,8 @@ static int uvc_set_video_ctrl(struct uvc_streaming *stream,
>  	int ret;
>  
>  	size = stream->dev->uvc_version >= 0x0110 ? 34 : 26;
> +	if (stream->dev->uvc_version >= 0x0150)
> +		size = 48;
>  	data = kzalloc(size, GFP_KERNEL);
>  	if (data == NULL)
>  		return -ENOMEM;

  parent reply	other threads:[~2018-05-14 17:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09  2:13 [PATCH] " ming_qian
2018-05-10 15:05 ` Kai-Heng Feng
2018-05-10 15:38 ` Hans de Goede
2018-05-14 17:28 ` Josef Šimánek [this message]
2018-05-14 17:38   ` Josef Šimánek
2018-05-18 14:04 ` Ana Guerrero Lopez
2018-05-25  1:05   ` Darren Hart
2018-05-22 20:32 ` [PATCH] " Laurent Pinchart
2018-05-23  5:42   ` Kai Heng Feng
2018-05-23  9:41     ` Ana Guerrero Lopez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180514172849.27224-1-josef.simanek@gmail.com \
    --to=josef.simanek@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming_qian@realsil.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®