The patch number 11026 was added via Guennadi Liakhovetski 
<[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <[email protected]>

------

From: Guennadi Liakhovetski  <[email protected]>
sh-mobile-ceu-camera: set field to the value, configured at open()

For the case, that we have to capture with a default format, i.e., when the
user doesn't call S_FMT, we have to use the field value according to the
default, configured at open() time.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
---
 drivers/media/video/sh_mobile_ceu_camera.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)


---

 linux/drivers/media/video/sh_mobile_ceu_camera.c |   17 +++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff -r 68f1dd4c2dab -r ed3e17bfb375 
linux/drivers/media/video/sh_mobile_ceu_camera.c
--- a/linux/drivers/media/video/sh_mobile_ceu_camera.c  Fri Mar 13 10:08:20 
2009 +0100
+++ b/linux/drivers/media/video/sh_mobile_ceu_camera.c  Fri Mar 13 10:08:20 
2009 +0100
@@ -95,7 +95,7 @@ struct sh_mobile_ceu_dev {
        spinlock_t lock;
        struct list_head capture;
        struct videobuf_buffer *active;
-       int is_interlace;
+       int is_interlaced;
 
        struct sh_mobile_ceu_info *pdata;
 
@@ -206,7 +206,7 @@ static void sh_mobile_ceu_capture(struct
 
        phys_addr_top = videobuf_to_dma_contig(pcdev->active);
        ceu_write(pcdev, CDAYR, phys_addr_top);
-       if (pcdev->is_interlace) {
+       if (pcdev->is_interlaced) {
                phys_addr_bottom = phys_addr_top + icd->width;
                ceu_write(pcdev, CDBYR, phys_addr_bottom);
        }
@@ -218,7 +218,7 @@ static void sh_mobile_ceu_capture(struct
        case V4L2_PIX_FMT_NV61:
                phys_addr_top += icd->width * icd->height;
                ceu_write(pcdev, CDACR, phys_addr_top);
-               if (pcdev->is_interlace) {
+               if (pcdev->is_interlaced) {
                        phys_addr_bottom = phys_addr_top + icd->width;
                        ceu_write(pcdev, CDBCR, phys_addr_bottom);
                }
@@ -482,7 +482,7 @@ static int sh_mobile_ceu_set_bus_param(s
        ceu_write(pcdev, CAMCR, value);
 
        ceu_write(pcdev, CAPCR, 0x00300000);
-       ceu_write(pcdev, CAIFR, (pcdev->is_interlace) ? 0x101 : 0);
+       ceu_write(pcdev, CAIFR, pcdev->is_interlaced ? 0x101 : 0);
 
        mdelay(1);
 
@@ -498,7 +498,7 @@ static int sh_mobile_ceu_set_bus_param(s
        }
 
        height = icd->height;
-       if (pcdev->is_interlace) {
+       if (pcdev->is_interlaced) {
                height /= 2;
                cdwdr_width *= 2;
        }
@@ -712,13 +712,13 @@ static int sh_mobile_ceu_try_fmt(struct 
 
        switch (f->fmt.pix.field) {
        case V4L2_FIELD_INTERLACED:
-               pcdev->is_interlace = 1;
+               pcdev->is_interlaced = 1;
                break;
        case V4L2_FIELD_ANY:
                f->fmt.pix.field = V4L2_FIELD_NONE;
                /* fall-through */
        case V4L2_FIELD_NONE:
-               pcdev->is_interlace = 0;
+               pcdev->is_interlaced = 0;
                break;
        default:
                ret = -EINVAL;
@@ -784,7 +784,8 @@ static void sh_mobile_ceu_init_videobuf(
                                       &sh_mobile_ceu_videobuf_ops,
                                       &ici->dev, &pcdev->lock,
                                       V4L2_BUF_TYPE_VIDEO_CAPTURE,
-                                      V4L2_FIELD_ANY,
+                                      pcdev->is_interlaced ?
+                                      V4L2_FIELD_INTERLACED : V4L2_FIELD_NONE,
                                       sizeof(struct sh_mobile_ceu_buffer),
                                       icd);
 }


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/ed3e17bfb3758616767e65e0194e4e2cab580bab

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to