public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Hans Petter Selasky <hps@bitfrost.no>, linux-media@vger.kernel.org
Subject: Re: [APP-BUG] UVC camera not working with skype
Date: Sun, 23 Feb 2014 14:51:41 +0100	[thread overview]
Message-ID: <5309FCED.2080203@redhat.com> (raw)
In-Reply-To: <5309E460.6020301@bitfrost.no>

Hi,

On 02/23/2014 01:06 PM, Hans Petter Selasky wrote:
> Hi,
> 
> I have debugged why a USB video class camera doesn't work with skype.
> 
> Skype finds the device and opens /dev/video0.
> 
> Skype tries to enumerate the device, but apparently does not care about the return value from the VIDIOC_ENUM_FRAMEINTERVALS. It finds the correct resolution and so on, but I suspect the FPS value is not matching what it expects.
> 
> drivers/media/usb/uvc/uvc_v4l2.c:
> 
>         case VIDIOC_ENUM_FRAMEINTERVALS:
>         {
> 
> struct v4l2_frmivalenum *fival = arg;
> 
>                 if (frame->bFrameIntervalType) {
>                         if (fival->index >= frame->bFrameIntervalType)
>                                 return -EINVAL;    // CPU goes here
> 
>                         fival->type = V4L2_FRMIVAL_TYPE_DISCRETE;
>                         fival->discrete.numerator =
> 
> I see "fival->index" goes far beyond "frame->bFrameIntervalType" leading me to believe that skype tries to search for a specific setting, and if it doesn't find that it simply while's one.
> 
> Using another UVC based camera with skype works fine. I've attached the USB descriptor dump for the non-working USB camera.
> 
> I can test suggestions and patches.
> 
> Solution:
> 
> Possibly the UVC driver should provide some standard settings regardless of what the USB descriptors say. Might also be task for libv4l, Hans CC'ed.

Ugh, if we add special code to libv4l for this the amount of libv4l skype specific
fixes is going to become ridiculous (we also fake all cams doing 320x240 for skype).
Have you tried contacting skype about this ?

Please first try to get skype to "fix their shit", if that does not work I'm
willing to review a patch to work around this in libv4l. No promises I'll
actually apply it, but if it is sane enough I probably will, skype is used
by too much people, now if only it was not so totally completely broken in
how it uses the v4l2 API :|

Regards,

Hans

  parent reply	other threads:[~2014-02-23 13:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-23 12:06 [APP-BUG] UVC camera not working with skype Hans Petter Selasky
2014-02-23 12:08 ` Hans Petter Selasky
2014-02-23 13:51 ` Hans de Goede [this message]
2014-02-23 17:16   ` Hans Petter Selasky
2014-02-23 20:13     ` Hans de Goede

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=5309FCED.2080203@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=hps@bitfrost.no \
    --cc=linux-media@vger.kernel.org \
    /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