diff options
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx.h')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx.h | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index ae86a5ca7..07b7db80d 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -26,7 +26,7 @@ #define _EM28XX_H #include "compat.h" -#include <linux/videodev.h> +#include <linux/videodev2.h> #include <linux/i2c.h> #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) #include <linux/mutex.h> @@ -170,7 +170,6 @@ enum em28xx_decoder { struct em28xx_board { char *name; int vchannels; - int norm; int tuner_type; /* i2c flags */ @@ -206,14 +205,6 @@ enum em28xx_dev_state { DEV_MISCONFIGURED = 0x04, }; -/* tvnorms */ -struct em28xx_tvnorm { - char *name; - v4l2_std_id id; - /* mode for saa7113h */ - int mode; -}; - /* main device struct */ struct em28xx { /* generic device properties */ @@ -227,6 +218,8 @@ struct em28xx { unsigned int has_msp34xx:1; unsigned int has_tda9887:1; + unsigned int stream_on:1; /* Locks streams */ + u32 i2s_speed; /* I2S speed for audio digital stream */ enum em28xx_decoder decoder; @@ -240,8 +233,7 @@ struct em28xx { /* video for linux */ int users; /* user count for exclusive use */ struct video_device *vdev; /* video for linux device struct */ - struct video_picture vpic; /* picture settings only used to init saa7113h */ - struct em28xx_tvnorm *tvnorm; /* selected tv norm */ + v4l2_std_id norm; /* selected tv norm */ int ctl_freq; /* selected frequency */ unsigned int ctl_input; /* selected input */ unsigned int ctl_ainput; /* slected audio input */ @@ -261,6 +253,7 @@ struct em28xx { int vscale; /* vertical scale factor (see datasheet) */ int interlaced; /* 1=interlace fileds, 0=just top fileds */ int type; + unsigned int video_bytesread; /* Number of bytes read */ unsigned long hash; /* eeprom hash - for boards with generic ID */ unsigned long i2c_hash; /* i2c devicelist hash - for boards with generic ID */ @@ -269,6 +262,7 @@ struct em28xx { enum em28xx_dev_state state; enum em28xx_stream_state stream; enum em28xx_io_method io; + /* locks */ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) struct mutex lock; @@ -301,6 +295,11 @@ struct em28xx { int (*em28xx_read_reg_req) (struct em28xx * dev, u8 req, u16 reg); }; +struct em28xx_fh { + struct em28xx *dev; + unsigned int stream_on:1; /* Locks streams */ +}; + /* Provided by em28xx-i2c.c */ void em28xx_i2c_call_clients(struct em28xx *dev, unsigned int cmd, void *arg); @@ -521,18 +520,21 @@ inline static int em28xx_gamma_set(struct em28xx *dev, s32 val) /*FIXME: maxw should be dependent of alt mode */ inline static unsigned int norm_maxw(struct em28xx *dev) { - switch(dev->model){ - case (EM2820_BOARD_MSI_VOX_USB_2): return(640); - default: return(720); + switch (dev->model) { + case EM2820_BOARD_MSI_VOX_USB_2: + return 640; + default: + return 720; } } inline static unsigned int norm_maxh(struct em28xx *dev) { - switch(dev->model){ - case (EM2820_BOARD_MSI_VOX_USB_2): return(480); - default: return (dev->tvnorm->id & V4L2_STD_625_50) ? 576 : 480; + switch (dev->model) { + case EM2820_BOARD_MSI_VOX_USB_2: + return 480; + default: + return (dev->norm & V4L2_STD_625_50) ? 576 : 480; } } - #endif |