summaryrefslogtreecommitdiff
path: root/linux/include/media
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <lyakh@axis700.grange>2008-12-01 13:44:59 +0100
committerGuennadi Liakhovetski <lyakh@axis700.grange>2008-12-01 13:44:59 +0100
commit23c99ad0f49a1ec633853e1b2a265308c755abd0 (patch)
treea70d6e939650fadb032297ccec1a5845d34d14fb /linux/include/media
parenta25098a0d06ad54e605ab676785dd412a00be9bc (diff)
downloadmediapointer-dvb-s2-23c99ad0f49a1ec633853e1b2a265308c755abd0.tar.gz
mediapointer-dvb-s2-23c99ad0f49a1ec633853e1b2a265308c755abd0.tar.bz2
soc-camera: let camera host drivers decide upon pixel format
Pixel format requested by the user is not necessarily the same, as what a sensor driver provides. There are situations, when a camera host driver provides the required format, but requires a different format from the sensor. Further, the list of formats, supported by sensors is pretty static and can be pretty good described with a constant list of structures. Whereas decisions, made by camera host drivers to support requested formats can be quite complex, therefore it is better to let the host driver do the work. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/pxa_camera.c | 32 +++++++++++++++- drivers/media/video/sh_mobile_ceu_camera.c | 32 +++++++++++++++- drivers/media/video/soc_camera.c | 58 ++++++++++----------------- include/media/soc_camera.h | 3 + 4 files changed, 87 insertions(+), 38 deletions(-)
Diffstat (limited to 'linux/include/media')
-rw-r--r--linux/include/media/soc_camera.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/include/media/soc_camera.h b/linux/include/media/soc_camera.h
index ee0e6b4be..8e8fcb75d 100644
--- a/linux/include/media/soc_camera.h
+++ b/linux/include/media/soc_camera.h
@@ -105,6 +105,9 @@ extern void soc_camera_device_unregister(struct soc_camera_device *icd);
extern int soc_camera_video_start(struct soc_camera_device *icd);
extern void soc_camera_video_stop(struct soc_camera_device *icd);
+extern const struct soc_camera_data_format *soc_camera_format_by_fourcc(
+ struct soc_camera_device *icd, unsigned int fourcc);
+
struct soc_camera_data_format {
const char *name;
unsigned int depth;