From 623a87e654939d74358a2b8256042acbca1bce7c Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 29 Mar 2009 22:17:10 +0000 Subject: Sensor orientation reporting From: Adam Baker Add support to the SQ-905 driver to pass back to user space the sensor orientation information obtained from the camera during init. Modifies gspca and the videodev2.h header to create the necessary API. Signed-off-by: Adam Baker [mchehab@redhat.com: Changed "Output is" to "Frames are" at the comments, as suggested at LMML] Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/gspca/sq905.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'linux/drivers/media/video/gspca/sq905.c') diff --git a/linux/drivers/media/video/gspca/sq905.c b/linux/drivers/media/video/gspca/sq905.c index 04e3ae57a..2e1cdf068 100644 --- a/linux/drivers/media/video/gspca/sq905.c +++ b/linux/drivers/media/video/gspca/sq905.c @@ -360,6 +360,12 @@ static int sd_init(struct gspca_dev *gspca_dev) gspca_dev->cam.nmodes = ARRAY_SIZE(sq905_mode); if (!(ident & SQ905_HIRES_MASK)) gspca_dev->cam.nmodes--; + + if (ident & SQ905_ORIENTATION_MASK) + gspca_dev->cam.input_flags = V4L2_IN_ST_VFLIP; + else + gspca_dev->cam.input_flags = V4L2_IN_ST_VFLIP | + V4L2_IN_ST_HFLIP; return 0; } -- cgit v1.2.3