[media] media: rcar-vin: add support for V4L2_FIELD_ALTERNATE
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Fri, 2 Sep 2016 16:45:01 +0000 (13:45 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 19 Sep 2016 19:33:41 +0000 (16:33 -0300)
commitb6f556cb93a97de133efb8bad37e298b49d8ac78
treea0a4ddc62b673b6a2f91facbbe86856abca24376
parentc6b3d8fc79a93aa1139c080bbb7402db846cc9f7
[media] media: rcar-vin: add support for V4L2_FIELD_ALTERNATE

The HW can capture both ODD and EVEN fields in separate buffers so it's
possible to support V4L2_FIELD_ALTERNATE. This patch add support for
this mode.

At probe time and when S_STD is called the driver will default to use
V4L2_FIELD_INTERLACED if the subdevice reports V4L2_FIELD_ALTERNATE. The
driver will only change the field type if the subdevice implements
G_STD, if not it will keep the default at V4L2_FIELD_ALTERNATE.

The user can always explicitly ask for V4L2_FIELD_ALTERNATE in S_FMT and
the driver will use that field format.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/rcar-vin/rcar-dma.c
drivers/media/platform/rcar-vin/rcar-v4l2.c