[media] saa7115: Fix standards detection
authorMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 3 Oct 2011 15:01:22 +0000 (12:01 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 8 Oct 2011 11:00:17 +0000 (08:00 -0300)
commitb728666ba5244505a80d1e395194e4b90386d504
treeaa39fba5e24c94834df5b0135b3228e32814ce68
parent2f4cf2c3a971c4d5154def8ef9ce4811d702852d
[media] saa7115: Fix standards detection

There are several bugs at saa7115 standards detection:

After the fix, the driver is returning the proper standards,
as tested with 3 different broadcast sources:

On an invalid channel (without any TV signal):
[ 4394.931630] saa7115 15-0021: Status byte 2 (0x1f)=0xe0
[ 4394.931635] saa7115 15-0021: detected std mask = 00ffffff

With a PAL/M signal:
[ 4410.836855] saa7115 15-0021: Status byte 2 (0x1f)=0xb1
[ 4410.837727] saa7115 15-0021: Status byte 1 (0x1e)=0x82
[ 4410.837731] saa7115 15-0021: detected std mask = 00000900

With a NTSC/M signal:
[ 4422.383893] saa7115 15-0021: Status byte 2 (0x1f)=0xb1
[ 4422.384768] saa7115 15-0021: Status byte 1 (0x1e)=0x81
[ 4422.384772] saa7115 15-0021: detected std mask = 0000b000

Tests were done with a WinTV PVR USB2 Model 29xx card.

Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/saa7115.c