diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-03-13 05:08:20 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:21 -0400 |
commit | 025c18a19d7d7eb8745d25986f982a5f35a85157 (patch) | |
tree | eeca0bd36addeddf1a123f9af26d132a2c94979c /include/media/soc_camera.h | |
parent | e802967c7079d2b4cfbd107dc90812605dbcad5a (diff) |
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>
Diffstat (limited to 'include/media/soc_camera.h')
-rw-r--r-- | include/media/soc_camera.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index e9eb60740aaa..013c81875d76 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -45,6 +45,7 @@ struct soc_camera_device { | |||
45 | int num_formats; | 45 | int num_formats; |
46 | struct soc_camera_format_xlate *user_formats; | 46 | struct soc_camera_format_xlate *user_formats; |
47 | int num_user_formats; | 47 | int num_user_formats; |
48 | enum v4l2_field field; /* Preserve field over close() */ | ||
48 | struct module *owner; | 49 | struct module *owner; |
49 | void *host_priv; /* Per-device host private data */ | 50 | void *host_priv; /* Per-device host private data */ |
50 | /* soc_camera.c private count. Only accessed with .video_lock held */ | 51 | /* soc_camera.c private count. Only accessed with .video_lock held */ |