Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d13ac96f authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] ml86v7667: fix the querystd implementation



The *std should be set to V4L2_STD_UNKNOWN, not the function's return code.
Also, *std should be ANDed with 525_60 or 625_50.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ed3e12d2
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -169,10 +169,10 @@ static int ml86v7667_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
	if (status < 0)
		return status;

	if (!(status & STATUS_HLOCK_DETECT))
		return V4L2_STD_UNKNOWN;

	*std = status & STATUS_NTSCPAL ? V4L2_STD_625_50 : V4L2_STD_525_60;
	if (status & STATUS_HLOCK_DETECT)
		*std &= status & STATUS_NTSCPAL ? V4L2_STD_625_50 : V4L2_STD_525_60;
	else
		*std = V4L2_STD_UNKNOWN;

	return 0;
}