diff options
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/cs5345.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-video.c | 43 | ||||
-rw-r--r-- | linux/drivers/media/video/pwc/pwc-if.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/saa717x.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/upd64031a.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/upd64083.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/uvc/uvc_ctrl.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/uvc/uvc_driver.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/uvc/uvc_queue.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/uvc/uvc_status.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/uvc/uvc_video.c | 1 |
11 files changed, 24 insertions, 29 deletions
diff --git a/linux/drivers/media/video/cs5345.c b/linux/drivers/media/video/cs5345.c index 9d19970ce..31d6c4aa4 100644 --- a/linux/drivers/media/video/cs5345.c +++ b/linux/drivers/media/video/cs5345.c @@ -18,7 +18,6 @@ */ -#include <linux/version.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/i2c.h> diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index eb3a87e0a..a2657fa3d 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -890,10 +890,10 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int i) if (0 == INPUT(i)->type) return -EINVAL; - mutex_lock(&dev->lock); - - video_mux(dev, i); + dev->ctl_input = i; + mutex_lock(&dev->lock); + video_mux(dev, dev->ctl_input); mutex_unlock(&dev->lock); return 0; } @@ -948,6 +948,12 @@ static int vidioc_s_audio(struct file *file, void *priv, struct v4l2_audio *a) if (a->index != dev->ctl_ainput) return -EINVAL; #else + + if (a->index >= MAX_EM28XX_INPUT) + return -EINVAL; + if (0 == INPUT(a->index)->type) + return -EINVAL; + mutex_lock(&dev->lock); dev->ctl_ainput = INPUT(a->index)->amux; @@ -1686,7 +1692,7 @@ static int em28xx_v4l2_open(struct file *filp) #if 0 /* device needs to be initialized before isoc transfer */ - video_mux(dev, 0); + video_mux(dev, dev->ctl_input); #endif } if (fh->radio) { @@ -2024,9 +2030,22 @@ int em28xx_register_analog_devices(struct em28xx *dev) (EM28XX_VERSION_CODE >> 16) & 0xff, (EM28XX_VERSION_CODE >> 8) & 0xff, EM28XX_VERSION_CODE & 0xff); + /* set default norm */ + dev->norm = em28xx_video_template.current_norm; + dev->width = norm_maxw(dev); + dev->height = norm_maxh(dev); + dev->interlaced = EM28XX_INTERLACED_DEFAULT; + dev->hscale = 0; + dev->vscale = 0; + dev->ctl_input = 0; + /* Analog specific initialization */ dev->format = &format[0]; - video_mux(dev, 0); + video_mux(dev, dev->ctl_input); + + /* Audio defaults */ + dev->mute = 1; + dev->volume = 0x1f; #if 1 /* enable vbi capturing */ @@ -2036,24 +2055,10 @@ int em28xx_register_analog_devices(struct em28xx *dev) em28xx_write_reg(dev, EM28XX_R11_VINCTRL, 0x51); #endif - dev->mute = 1; /* maybe not the right place... */ - dev->volume = 0x1f; - em28xx_set_outfmt(dev); em28xx_colorlevels_set_default(dev); em28xx_compression_disable(dev); - /* set default norm */ - dev->norm = em28xx_video_template.current_norm; - dev->width = norm_maxw(dev); - dev->height = norm_maxh(dev); - dev->interlaced = EM28XX_INTERLACED_DEFAULT; - dev->hscale = 0; - dev->vscale = 0; - - /* FIXME: This is a very bad hack! Not all devices have TV on input 2 */ - dev->ctl_input = 2; - /* allocate and fill video video_device struct */ dev->vdev = em28xx_vdev_init(dev, &em28xx_video_template, "video"); if (!dev->vdev) { diff --git a/linux/drivers/media/video/pwc/pwc-if.c b/linux/drivers/media/video/pwc/pwc-if.c index 63c8ff8df..e314a6383 100644 --- a/linux/drivers/media/video/pwc/pwc-if.c +++ b/linux/drivers/media/video/pwc/pwc-if.c @@ -62,7 +62,6 @@ #include <linux/poll.h> #include <linux/slab.h> #include <linux/vmalloc.h> -#include <linux/version.h> #include <asm/io.h> #include "pwc.h" diff --git a/linux/drivers/media/video/saa717x.c b/linux/drivers/media/video/saa717x.c index 65bcf6dad..2fdac2e5c 100644 --- a/linux/drivers/media/video/saa717x.c +++ b/linux/drivers/media/video/saa717x.c @@ -30,7 +30,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <linux/version.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/sched.h> diff --git a/linux/drivers/media/video/upd64031a.c b/linux/drivers/media/video/upd64031a.c index eb1dfe312..9d20ff69d 100644 --- a/linux/drivers/media/video/upd64031a.c +++ b/linux/drivers/media/video/upd64031a.c @@ -21,7 +21,6 @@ */ -#include <linux/version.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/i2c.h> diff --git a/linux/drivers/media/video/upd64083.c b/linux/drivers/media/video/upd64083.c index 7bc2f2fa6..a897d0856 100644 --- a/linux/drivers/media/video/upd64083.c +++ b/linux/drivers/media/video/upd64083.c @@ -21,7 +21,6 @@ * 02110-1301, USA. */ -#include <linux/version.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/i2c.h> diff --git a/linux/drivers/media/video/uvc/uvc_ctrl.c b/linux/drivers/media/video/uvc/uvc_ctrl.c index e9a75b064..3dfa69c7b 100644 --- a/linux/drivers/media/video/uvc/uvc_ctrl.c +++ b/linux/drivers/media/video/uvc/uvc_ctrl.c @@ -12,7 +12,6 @@ */ #include <linux/kernel.h> -#include <linux/version.h> #include <linux/list.h> #include <linux/module.h> #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17) diff --git a/linux/drivers/media/video/uvc/uvc_driver.c b/linux/drivers/media/video/uvc/uvc_driver.c index 540f57baa..64b66fd80 100644 --- a/linux/drivers/media/video/uvc/uvc_driver.c +++ b/linux/drivers/media/video/uvc/uvc_driver.c @@ -24,7 +24,6 @@ */ #include <linux/kernel.h> -#include <linux/version.h> #include <linux/list.h> #include <linux/module.h> #include <linux/usb.h> diff --git a/linux/drivers/media/video/uvc/uvc_queue.c b/linux/drivers/media/video/uvc/uvc_queue.c index 42546342e..8f676f9d9 100644 --- a/linux/drivers/media/video/uvc/uvc_queue.c +++ b/linux/drivers/media/video/uvc/uvc_queue.c @@ -12,7 +12,6 @@ */ #include <linux/kernel.h> -#include <linux/version.h> #include <linux/mm.h> #include <linux/list.h> #include <linux/module.h> diff --git a/linux/drivers/media/video/uvc/uvc_status.c b/linux/drivers/media/video/uvc/uvc_status.c index ab62d7bf9..0b79c3ede 100644 --- a/linux/drivers/media/video/uvc/uvc_status.c +++ b/linux/drivers/media/video/uvc/uvc_status.c @@ -12,7 +12,6 @@ */ #include <linux/kernel.h> -#include <linux/version.h> #include <linux/input.h> #include <linux/usb.h> #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18) diff --git a/linux/drivers/media/video/uvc/uvc_video.c b/linux/drivers/media/video/uvc/uvc_video.c index e6f7c3178..068a25bd7 100644 --- a/linux/drivers/media/video/uvc/uvc_video.c +++ b/linux/drivers/media/video/uvc/uvc_video.c @@ -12,7 +12,6 @@ */ #include <linux/kernel.h> -#include <linux/version.h> #include <linux/list.h> #include <linux/module.h> #include <linux/usb.h> |