media: allegro: adjust channel after format change
authorMichael Tretter <m.tretter@pengutronix.de>
Thu, 3 Dec 2020 11:00:53 +0000 (12:00 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 27 Jan 2021 15:05:03 +0000 (16:05 +0100)
commitd2a1b58fd2df21d811872e4635087a91b6ba2d45
treec517eb54a6779d9161131c0735440309bf65bae1
parent8e64f00846bb19cb1910363c1acad64aa92020d4
media: allegro: adjust channel after format change

A format change (i.e. the frame size or the codec) has multiple effects
on a channel:

- The available controls

- The limits of the available controls

- The default encoding options

To avoid scattering the changes all over the driver, add a new function
that goes over the channel and does all required adjustments.

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