[media] via-camera: pass correct format settings to sensor
authorDaniel Drake <dsd@laptop.org>
Sun, 15 Jul 2012 20:23:05 +0000 (17:23 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 31 Jul 2012 01:01:08 +0000 (22:01 -0300)
The code attempts to maintain a "user format" and a "sensor format",
but in this case it looks like a typo is passing the user format down
to the sensor.

This was preventing display of video at anything other than 640x480.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/via-camera.c

index 308e150a39bca34b439cc99a413ad7c43f1c3a18..eb404c2ce27043489a80ebfe1cbff114f55438ae 100644 (file)
@@ -963,7 +963,7 @@ static int viacam_do_try_fmt(struct via_camera *cam,
 
        upix->pixelformat = f->pixelformat;
        viacam_fmt_pre(upix, spix);
-       v4l2_fill_mbus_format(&mbus_fmt, upix, f->mbus_code);
+       v4l2_fill_mbus_format(&mbus_fmt, spix, f->mbus_code);
        ret = sensor_call(cam, video, try_mbus_fmt, &mbus_fmt);
        v4l2_fill_pix_format(spix, &mbus_fmt);
        viacam_fmt_post(upix, spix);