Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[pandora-kernel.git] / drivers / media / video / em28xx / em28xx.h
index 655dd78..8c2dc38 100644 (file)
@@ -366,6 +366,7 @@ enum em28xx_decoder {
 enum em28xx_sensor {
        EM28XX_NOSENSOR = 0,
        EM28XX_MT9V011,
+       EM28XX_MT9M001,
 };
 
 enum em28xx_adecoder {
@@ -478,7 +479,16 @@ struct em28xx {
        struct v4l2_device v4l2_dev;
        struct em28xx_board board;
 
+       /* Webcam specific fields */
        enum em28xx_sensor em28xx_sensor;
+       int sensor_xres, sensor_yres;
+       int sensor_xtal;
+
+       /* Allows progressive (e. g. non-interlaced) mode */
+       int progressive;
+
+       /* Vinmode/Vinctl used at the driver */
+       int vinmode, vinctl;
 
        unsigned int stream_on:1;       /* Locks streams */
        unsigned int has_audio_class:1;
@@ -760,17 +770,23 @@ static inline int em28xx_gamma_set(struct em28xx *dev, s32 val)
 /*FIXME: maxw should be dependent of alt mode */
 static inline unsigned int norm_maxw(struct em28xx *dev)
 {
+       if (dev->board.is_webcam)
+               return dev->sensor_xres;
+
        if (dev->board.max_range_640_480)
                return 640;
-       else
-               return 720;
+
+       return 720;
 }
 
 static inline unsigned int norm_maxh(struct em28xx *dev)
 {
+       if (dev->board.is_webcam)
+               return dev->sensor_yres;
+
        if (dev->board.max_range_640_480)
                return 480;
-       else
-               return (dev->norm & V4L2_STD_625_50) ? 576 : 480;
+
+       return (dev->norm & V4L2_STD_625_50) ? 576 : 480;
 }
 #endif