summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/usbvision
AgeCommit message (Collapse)Author
2007-08-21Cleanup: remove linux/moduleparam.h from drivers/media filesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Since at least kernel 2.6.12-rc2, module.h includes moduleparm.h. This patch removes all occurences of moduleparm.h from drivers/media files. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-23usbvision: fix bugs [sg]_register functionsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> s_register was assigning the return code to (unsigned)reg->val, rather than errCode, which it what it would return. Except reg->val can't be < 0, so it would never actually return an error. g_register never actually put the value it read into reg->val. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-07-02merge: http://www.linuxtv.org/hg/~tmerle/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-02Fix v4l-dvb backward compatibilityMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Due to several internal API changes on kernel, kernel backward compatibility were lost. Basically, compat.h should be the last include for it to work properly. This patch basically reorders kernel headers to allow backward compat to work fine. Also: Some includes were added after some non-include macros, on old drivers. Better to keep all includes at the beginning of the files. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-06-26usbvision: video mux cleanupThierry MERLE
From: Thierry MERLE <thierry.merle@free.fr> - usbvision_muxsel simplified, now uses some well known constants. - since the decoder needs to change input norm, call to muxsel added when changing video standard. Acked-by: Dwaine Garden <DwaineGarden@rogers.com> Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
2007-06-30Alter the tuner type for the WinTV USB UK PAL model.Thierry MERLE
From: Matthew Garrett <mjg59@srcf.ucam.org> Alter the tuner type for the WinTV USB UK PAL model. Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
2007-06-26usbvision: Hauppauge WinTV USB SECAM_L fixThierry MERLE
From: Thierry MERLE <thierry.merle@free.fr> - Hauppauge WinTV USB SECAM_L fixed (needed some picture X and Y shiftings) Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
2007-05-27usbvision: fix urb allocation and submitsThierry Merle
From: Thierry Merle <thierry.merle@free.fr> - fixed the urb allocation part that was not taking into account the current alternate setting this fixes usb_submit_urb returning -90 errno in isocIrq. - fixed usb_submit_urb returning -1 errno in isocIrq (need to ignore usb urb with status==-ENOENT) Acked-by: Dwaine P. Garden <dwainegarden@rogers.com> Signed-off-by: Thierry Merle <thierry.merle@free.fr>
2007-05-28Remove worthless references to obsolete MODULE_PARM macro.Mauro Carvalho Chehab
From: "Robert P. J. Day" <rpjday@mindspring.com> Remove the long-dead references to the obsolete MODULE_PARM macro. Given that the first one of those is actually misspelled as "MODULE_PARAM", it's clear that they can't have been doing any good. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Acked-by: Thierry Merle <thierry.merle@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-13Backport several i2c cleanups from mainstreamMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> backport commit 2096b956d24c4b5950b808fc23b218425d79ebb1 from David Brownell <david-b@pacbell.net> Maybe I've merged also other i2c cleanups here that happened on Kernel. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-13Backport kernel changeset e63340ae6b6205fef26b40a75673d1c9c0c8bb90Mauro Carvalho Chehab
From: Mauro Carvalho Chehab kernel-sync: The original patch description, from Randy Dunlap <randy.dunlap@oracle.com>: header cleaning: don't include smp_lock.h when not used Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-08usbvision: video_ioctl2 conversionThierry MERLE
From: Thierry MERLE <thierry.merle@free.fr> The ioctl entry point, a big switch/case, is splitted in little functions. These functions are set as callbacks for the video_ioctl2 video4linux facility. This improves the driver memory consumption and enables the v4l1 compatibility as a side effect. Acked-by: Dwaine P. Garden <dwainegarden@rogers.com> Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
2007-05-02usbvision: make common video and radio ioctlsThierry MERLE
From: Thierry MERLE <thierry.merle@free.fr> Radio and video ioctls are the same, delete the usbvision_do_radio_ioctl function add the special cases for radio in usbvision_v4l2_do_ioctl Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
2007-04-30usbvision-core.c:usbvision_set_video_format: add comment that VO_MODE is ↵Thierry MERLE
also being set. From: David Warman <dwarman@davidwarman.net> Signed-off-by: David Warman <dwarman@davidwarman.net> Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
2007-04-30usbvision-cards.c: change VideoNorm to NTSC for Belkin USB Videobus IIThierry MERLE
From: David Warman <dwarman@davidwarman.net> Signed-off-by: David Warman <dwarman@davidwarman.net> Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
2007-05-02Use menuconfig objects II - V4LMauro Carvalho Chehab
From: Jan Engelhardt <jengelh@linux01.gwdg.de> Change Kconfig objects from "menu, config" into "menuconfig" so that the user can disable the whole feature without having to enter the menu first. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-03Backed out changeset d130e8e1eb762e055371d5e3e1724d7735bad244Mauro Carvalho Chehab
Also reverting this one. V4L/DVB building system can't handle menuconfig and if/endif Kconfig items. We should first patch the building system before reapplying those two patches. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-02Use menuconfig objects II - V4LMauro Carvalho Chehab
From: Jan Engelhardt <jengelh@linux01.gwdg.de> Change Kconfig objects from "menu, config" into "menuconfig" so that the user can disable the whole feature without having to enter the menu first. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-17usbvision: remove CustomDevice facilityThierry MERLE
From: Thierry MERLE <thierry.merle@free.fr> usbvision has a module parameter that ables the user to add a new USB entry at driver load. This functionality is useless by experience (adding statically the entry is easy). Furthermore, the USB_DEVICE(0xfff0, 0xfff0) USB entry caused usbvision_probe to be called for all unclaimed devices. Acked-by: Dwaine Garden <DwaineGarden@rogers.com> Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
2007-04-16usbvision: remove not needed TUNER_SET_TYPE_ADDR callThierry MERLE
From: Thierry MERLE <thierry.merle@free.fr> usbvision_i2c: remove TUNER_SET_TYPE_ADDR call in attach_inform since it is done by tuner_core. Acked-by: Dwaine Garden <DwaineGarden@rogers.com> Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
2007-04-16usbvision: reverting some i2c cleanupsThierry MERLE
From: Thierry MERLE <thierry.merle@free.fr> usbvision-i2c.c: reverting some i2c cleanups in order to recover a safe state. Acked-by: Dwaine Garden <DwaineGarden@rogers.com> Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
2007-04-15usbvision: fix confusion over 7-bit vs 8-bit TDDA9887 addressesTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The code was testing an 8-bit address against a 7-bit address. Will the confusion of the two never cease? Biggest flaw of the I2C protocol: the R/W bit is the LSB instead of the MSB. No one can ever agree if addresses are 7-bits and the R/W bit follows them, or if they are 8-bit and the R/W bit is OR-ed into the address byte. If the R/W bit was first, it wouldn't make any difference! Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-04-15usbvision: fix TDA9887 detectionThierry MERLE
From: Thierry MERLE <thierry.merle@free.fr> - Adding 0x86 as possible I2C addresses for TDA9887 to call TUNER_SET_TYPE_ADDR. Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
2007-04-14usbvision: fix a debug message in usb probe functionThierry MERLE
From: Thierry MERLE <thierry.merle@free.fr> - change a printk to PDEBUG when USB probe detects an unknown device. This will avoid a message log from usbvision when an unclaimed device is inserted. Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
2007-04-14usbvision: i2c function cleanupsThierry MERLE
From: Thierry MERLE <thierry.merle@free.fr> usbvision-i2c function renamings, code cleanup Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
2007-04-14usb_get_dev were called twice. Removing the extra call.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-14Fix a bug on device detectionMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Thanks to Thierry MERLE <thierry.merle@free.fr> for pointing this Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-14usbvision: store the device database more efficientlyTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> One bit wide bitfields need to declared unsigned to have the range 0 to 1, or they have the range -1 to 0. A few techniques to reduce the driver's size by about 1700 bytes on ia32, probably more on x86-64. Put the biggest fields first, less padding is necessary that way. Put fields with a limited range into a smaller type. For example VideoChannels will fit in 3 bits, and TunerType can use 8 bits. Vin_Reg1, Vin_Reg2, and Dvi_yuv define values for 8-bit registers, but they can't just go into an 8-bit field with no changes, since -1 was used as a flag to indicate a value was not present. So what we do is create a one-bit flag for each one to indicate if a value is or is not present. This only takes 9 bits and has the added advantage that when the register isn't overridden (Vin_Reg[12] never are) it doesn't need to appear in the structure definition since the default value for the flag will be zero. Acked-by: Thierry MERLE <thierry.merle@free.fr> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-04-14Reduce usbvision data sizeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> This patch reduces usbvision driver on about 1Kb on i386 over the original version with the old struct: text data bss dec hex filename 52312 11848 60 64220 fadc old/usbvision.ko 52474 10708 60 63242 f70a new/usbvision.ko Acked-by: Thierry MERLE <thierry.merle@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-14Use a better format to represent usbvision supported boardsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Changed usbvision cards table to allow: 1) Not repeat USB ID on two structs; 2) Not need to specify both usb and card description tables at the same order, removing some magic; Some cards had duplicated names. Fixed. A test for an specific board were doing by using a string comparation. The comparation were wrong. Also, it is not a good practice to recognize a board based on his string name. Acked-by: Thierry MERLE <thierry.merle@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-06Add some missing Hauppauge and Belkin devices to the driverThierry MERLE
From: Dwaine P. Garden <DwaineGarden@rogers.com> -Add some missing Hauppauge and Belkin devices to the driver. -Fixed up some device descriptions. Signed-off-by: Dwaine P. Garden <DwaineGarden@rogers.com> Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
2007-02-24Improve chip matching in v4l2_register for VIDIOC_DBG_G/S_REGISTERHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The chip matching in struct v4l2_register was rather primitive. It could not be extended to other busses besides i2c and it lacked a way to differentiate between two i2c chips driven by the same driver on one board (e.g. a PVR500 with two tuner chips, one for analog TV and one for radio). It has now been improved making it much more powerful. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> CC: Mike Isely <isely@isely.net> CC: Trent Piepho <xyzzy@speakeasy.org>
2007-02-21backport changeset 12a917f69d1468c91d646dbad8408dd0d39d6207Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Backport changeset from Jean Delvare <khali@linux-fr.org> that declare i2c_adapter parent devices. kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21Backport of git changeset cd354f1ae75e6466a7e31b727faede57a1f89ca5Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Backport a changeset from Schmielau <tim@physik3.uni-rostock.de> that removes uneeded includes for linux/sched.h Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21Backport: make file_operations constMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Backport a kernel patch by Arjan van de Ven <arjan@linux.intel.com> that made all file_operations instances const. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-19compat: Add compat code for vm_insert_page()Trent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Add an inline versin of vm_insert_page() that uses remap_pfn_range() to compat.h. Remove compat code from em28xx-video.c, sn9c102_core.c, and usbvision-video.c since compat.h is now doing the same thing. USB_ZC0301, USB_ET61X251, and USB_ZR364XX will now compile under 2.6.12. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-02-19compat: Fix compat stuff for usbvision and zr364xxTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> compat.h was missing from usbvideo-i2c.c and zr364xx.c zr364xx.c needed the struct semaphore -> struct mutex compat check. Added an old i2c id to compat.h. These could be added to the Hg copy of linux/i2c-id.h instead? There's just this one so far. zr364xx needs 2.6.15 because of vm_insert_page(), so add to versions.txt Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-02-12Backport header fix from kernelMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Original patch from Al Viro <viro@ftp.linux.org.uk> usbvision missing __user Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-07Usbvision: set alternate interface modificationMauro Carvalho Chehab
From: Thierry MERLE <thierry.merle@free.fr> - usb alternate selection modified to get the biggest endpoint packet size. - fix sysfs get values for brightness/contrast/hue/saturation Signed-off-by: Thierry MERLE <thierry.merle@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-07Usbvision: dynamic allocation for framesMauro Carvalho Chehab
From: Thierry MERLE <thierry.merle@free.fr> - fix decoder route output - dynamic frame buffer allocation Signed-off-by: Thierry MERLE <thierry.merle@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-01-30Add checks for CAP_SYS_ADMIN to VIDIOC_DBG_G_REGISTERTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Before, root privileges were only needed to set hardware registers, not to read them. On some hardware, reading from the wrong place at the wrong time can hang the machine. So, to be consistent, root privileges are required to read registers on all hardware. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-01-23Make VIDIOC_INT_[SG]_REGISTER ioctls no longer internal onlyTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The direct register access ioctls were defined as kernel internal only, but they are very useful for debugging hardware from userspace and are used as such. Officially export them. VIDIOC_INT_[SG]_REGISTER is renamed to VIDIOC_DBG_[SG]_REGISTER Definition of ioctl and struct v4l2_register is moved from v4l2-common.h to videodev2.h. Types used in struct v4l2_register are changed to the userspace exportable versions (u32 -> __u32, etc). Use of VIDIOC_DBG_S_REGISTER requires CAP_SYS_ADMIN permission, so move the check into the video_ioctl2() dispatcher so it doesn't need to be duplicated in each driver's call-back function. CAP_SYS_ADMIN check is added to pvrusb2 (which doesn't use video_ioctl2). Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-01-07Improves some USBVision info messagesMauro Carvalho Chehab
From: Dwaine Garden <dwainegarden@rogers.com> Replaces the info statements with printk(KERN_INFO statements. This will cut down on the useless information which is showing up in the kernel messages log file. Signed-off-by: Dwaine P. Garden <DwaineGarden@rogers.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-29Fix the frame->grabstate update in read() entry point.Mauro Carvalho Chehab
From: Thierry MERLE <thierry.merle@free.fr> The Coverity checker spotted that in usbvision_v4l2_read(), the variable "frmx" is never assigned any value different from -1, but it's used an an array index in "usbvision->frame[frmx]". Thanks to Adrian Bunk <bunk@stusta.de> for warning about that. Signed-off-by: Thierry MERLE <thierry.merle@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-29Make usbvision_rvfree() staticMauro Carvalho Chehab
From: Adrian Bunk <bunk@stusta.de> usbvision_rvfree() can now become static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27Fix some troubles at the previous patchMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> One test with vivi driver were comitted together by mistake; The whitespace identation were wrong at the previous patch. kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-26usbvision fix: It was using "&&" instead "&"Mauro Carvalho Chehab
From: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-17Fixes compilation when CONFIG_V4L1_COMPAT is not selectedMauro Carvalho Chehab
From: Dwaine Garden<DwaineGarden@rogers.com> - SYSFS: Replaced all to_video_device(cd), video_device_create_file, video_device_remove_file and add the proper checks at create_file - Converted old norm values to V4L2 ones. - Robustness on sysfs hue/contrast/saturation queries. Additional check in order to return 0 if the driver is not opened. - Clean up of white spaces in usbvision.h This patch merges two fixes by Thierry MERLE and Mauro Chehab, and adds additional checks. Signed-off-by: Dwaine Garden<DwaineGarden@rogers.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-16Two small differences between v4l-dvb and kernel mainstream treeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-16Several stuff backported from 2.6.19-git seriesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> - INIT_WORK replaced by INIT_DELAYED_WORK - struct work_struct replaced by struct delayed_work - callback parameters also changed - SLAB_KERNEL replaced by GFP_KERNEL - linux/suspend.h replaced by linux/freezer.h - on cpia: INIT_WORK replaced by INIT_WORK_NAR - file->f_dentry->d_inode replaced by file->f_path.dentry->d_inode Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>