media: ti: cal: use frame desc to get vc and dt
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Tue, 26 Apr 2022 07:02:40 +0000 (09:02 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Tue, 17 May 2022 07:11:57 +0000 (09:11 +0200)
commit7a12903182c8c0e3ba61eb9c5bdf160f337686c5
tree709ebb1ee6b8f347b7bb25b601acec33aab45d6e
parent897c45df291ff063d6a0acb20b3a0c276c6adf6a
media: ti: cal: use frame desc to get vc and dt

Use get_frame_desc() to get the frame desc from the connected source,
and use the provided virtual channel and datatype instead of hardcoded
ones.

get_frame_desc() can contain multiple streams, but as we don't support
multiple streams yet, we will just always use the first stream.

If the source doesn't support get_frame_desc(), fall back to the
previous method of always capturing virtual channel 0 and any datatype.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/ti/cal/cal-camerarx.c
drivers/media/platform/ti/cal/cal.c
drivers/media/platform/ti/cal/cal.h