Skip to content

Commit

Permalink
[media] sta2x11_vip: Fix 60Hz video standard handling
Browse files Browse the repository at this point in the history
This device supports V4L2_STD_ALL, but its check for 60Hz standards
is broken, as NTSC is not the only standard that uses 60Hz.

Cc: Federico Vaga <federico.vaga@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed May 20, 2012
1 parent efeb98b commit 6ae009a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/video/sta2x11_vip.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *std)
return -EIO;
*std = vip->std = newstd;
if (oldstd != *std) {
if (V4L2_STD_NTSC & (*std))
if (V4L2_STD_525_60 & (*std))
vip->format = formats_60[0];
else
vip->format = formats_50[0];
Expand All @@ -581,7 +581,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *std)
}

if (oldstd != *std) {
if (V4L2_STD_NTSC & (*std))
if (V4L2_STD_525_60 & (*std))
vip->format = formats_60[0];
else
vip->format = formats_50[0];
Expand Down Expand Up @@ -804,7 +804,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
if (V4L2_PIX_FMT_UYVY != f->fmt.pix.pixelformat)
return -EINVAL;

if (V4L2_STD_NTSC & vip->std)
if (V4L2_STD_525_60 & vip->std)
interlace_lim = 240;
else
interlace_lim = 288;
Expand Down

0 comments on commit 6ae009a

Please sign in to comment.