mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-05-19 02:12:43 +00:00
V4L/DVB (11027): soc-camera: configure drivers with a default format at probe time
Currently soc-camera doesn't set up any image format without an explicit S_FMT. According to the API this should be supported, for example, capture-example.c from v4l2-apps by default doesn't issue an S_FMT. This patch moves negotiating of available host-camera format translations to probe() time, and restores the state from the last close() on the next open(). This is needed for some drivers, which power down or reset hardware after the last user closes the interface. This patch also has a nice side-effect of avoiding multiple allocation anf freeing of format translation tables. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
e802967c70
commit
025c18a19d
@@ -45,6 +45,7 @@ struct soc_camera_device {
|
||||
int num_formats;
|
||||
struct soc_camera_format_xlate *user_formats;
|
||||
int num_user_formats;
|
||||
enum v4l2_field field; /* Preserve field over close() */
|
||||
struct module *owner;
|
||||
void *host_priv; /* Per-device host private data */
|
||||
/* soc_camera.c private count. Only accessed with .video_lock held */
|
||||
|
||||
Reference in New Issue
Block a user