diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-01-10 13:14:46 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-16 11:08:57 -0200 |
commit | 938d5b9e7c2e20a7e609ad5874c6e7d8d391e6e9 (patch) | |
tree | ccd8b97d63894834c3ee7778ce10491ca27edffc /drivers/media/video/pwc/pwc-if.c | |
parent | d167a85c5fb45b1ecdacdb9b7733833a9af78da8 (diff) | |
download | op-kernel-dev-938d5b9e7c2e20a7e609ad5874c6e7d8d391e6e9.zip op-kernel-dev-938d5b9e7c2e20a7e609ad5874c6e7d8d391e6e9.tar.gz |
[media] pwc: Avoid sending mode info to the camera when it is not needed
Since we always do a set_video_mode on stream start, there is no need
to actually send the mode info to the device on a s_fmt / s_parm ioctl.
Not doing this saves us doing (slow) usb io.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pwc/pwc-if.c')
-rw-r--r-- | drivers/media/video/pwc/pwc-if.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index 1f3386d..23eacee 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c @@ -385,8 +385,8 @@ static int pwc_isoc_init(struct pwc_device *pdev) retry: /* We first try with low compression and then retry with a higher compression setting if there is not enough bandwidth. */ - ret = pwc_set_video_mode(pdev, pdev->width, pdev->height, - pdev->pixfmt, pdev->vframes, &compression); + ret = pwc_set_video_mode(pdev, pdev->width, pdev->height, pdev->pixfmt, + pdev->vframes, &compression, 1); /* Get the current alternate interface, adjust packet size */ intf = usb_ifnum_to_if(udev, 0); @@ -1129,7 +1129,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id /* Setup intial videomode */ rc = pwc_set_video_mode(pdev, MAX_WIDTH, MAX_HEIGHT, - V4L2_PIX_FMT_YUV420, 30, &compression); + V4L2_PIX_FMT_YUV420, 30, &compression, 1); if (rc) goto err_free_mem; |