Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c812b67ca4ed13fa5ec60f06c4ed8f648722a186
Commit:     c812b67ca4ed13fa5ec60f06c4ed8f648722a186
Parent:     9c837fb692b005203765d8a569a2fe43fdff9df1
Author:     Trent Piepho <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 18:29:42 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Mon Jul 30 16:26:23 2007 -0300

    V4L/DVB (5886): zr36067: Fix problem setting norms
    
    The zr36067 driver doesn't make a distinction between the different 
sub-types
    of NTSC, PAL, or SECAM norms.  For example, when the enum std ioctl returns
    the PAL standard it returns PAL_BG|PAL_DK|PAL_H|PAL_I.
    
    When setting the norm, it required the bitmask to match exactly the set of
    norms used during the enumeration.  If just one norm was specified, for
    example PAL_BG or NTSC_M, it would fail.  This violates the V4L2 spec,
    "VIDIOC_S_STD accepts *one* or more flags..."
    
    The key thing to realize is that V4L2_STD_PAL is not one bit, it is multiple
    bits.  It's ok to call S_STD with any *one* of those bits, but the driver 
was
    requiring *all* of them.
    
    This fixes the S_STD function so that it will accept any set of one or more
    PAL norms as PAL, and the same for NTSC and SECAM.
    
    Signed-off-by: Trent Piepho <[EMAIL PROTECTED]>
    Acked-by: Ronald S. Bultje <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/zoran_driver.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/video/zoran_driver.c 
b/drivers/media/video/zoran_driver.c
index 17118a4..fac97cb 100644
--- a/drivers/media/video/zoran_driver.c
+++ b/drivers/media/video/zoran_driver.c
@@ -3704,11 +3704,11 @@ zoran_do_ioctl (struct inode *inode,
                dprintk(3, KERN_DEBUG "%s: VIDIOC_S_STD - norm=0x%llx\n",
                        ZR_DEVNAME(zr), (unsigned long long)*std);
 
-               if (*std == V4L2_STD_PAL)
+               if ((*std & V4L2_STD_PAL) && !(*std & ~V4L2_STD_PAL))
                        norm = VIDEO_MODE_PAL;
-               else if (*std == V4L2_STD_NTSC)
+               else if ((*std & V4L2_STD_NTSC) && !(*std & ~V4L2_STD_NTSC))
                        norm = VIDEO_MODE_NTSC;
-               else if (*std == V4L2_STD_SECAM)
+               else if ((*std & V4L2_STD_SECAM) && !(*std & ~V4L2_STD_SECAM))
                        norm = VIDEO_MODE_SECAM;
                else if (*std == V4L2_STD_ALL)
                        norm = VIDEO_MODE_AUTO;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to