OSDN Git Service

media: allegro: implement S_FMT for CAPTURE
authorMichael Tretter <m.tretter@pengutronix.de>
Fri, 15 Jan 2021 09:34:59 +0000 (10:34 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 27 Jan 2021 15:04:30 +0000 (16:04 +0100)
commit8e64f00846bb19cb1910363c1acad64aa92020d4
tree7f5e22932f6d9916d7c65f37ba90e1b857e54d5a
parent7f8e438b90c91541d784feb5f71be1a0b01a6010
media: allegro: implement S_FMT for CAPTURE

In order to support different codecs, the driver must support changing
the format on CAPTURE. Therefore, the driver needs to handle S_FMT on
CAPTURE.

As the driver will have a different number of formats for OUTPUT and
CAPTURE, split the check for the format index in ENUM_FMT into CAPTURE
and OUTPUT.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/allegro-dvt/allegro-core.c