aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/pwc/pwc-if.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-01-10 13:01:41 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-16 11:08:26 -0200
commitd167a85c5fb45b1ecdacdb9b7733833a9af78da8 (patch)
treebc04587bbd8d77b7a7d4eeea3e8ebb9007ae6e75 /drivers/media/video/pwc/pwc-if.c
parent56ae24aad8f9e25dfef995c3e898e5f394cf0beb (diff)
[media] pwc: Fix pixfmt handling
Before this patch various code in the mode setting patch checked pdev->pixfmt, but that was not set until the mode setting succeeded, so it was looking at the old pixfmt! This patch fixes this by making the pixfmt a parameter to set_video_mode, and setting it from set_video_mode on success. 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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 250ad4c3e9d..1f3386da05f 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -386,7 +386,7 @@ 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->vframes, &compression);
+ pdev->pixfmt, pdev->vframes, &compression);
/* Get the current alternate interface, adjust packet size */
intf = usb_ifnum_to_if(udev, 0);
@@ -1128,7 +1128,8 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
pwc_set_leds(pdev, 0, 0);
/* Setup intial videomode */
- rc = pwc_set_video_mode(pdev, MAX_WIDTH, MAX_HEIGHT, 30, &compression);
+ rc = pwc_set_video_mode(pdev, MAX_WIDTH, MAX_HEIGHT,
+ V4L2_PIX_FMT_YUV420, 30, &compression);
if (rc)
goto err_free_mem;