summaryrefslogtreecommitdiffstats
path: root/drivers/staging/easycap/easycap.h
Commit message (Collapse)AuthorAgeFilesLines
* staging: Move media drivers to staging/mediaMauro Carvalho Chehab2011-11-031-594/+0
| | | | | | | | | | | | In practice, it is being hard to distinguish when a patch should go to staging tree or to the media tree. Better to distinguish it, by putting the media drivers at a separate staging directory. Newer staging drivers that include anything with "dvb*.h", "v4l2*.h" or "videodev2.h" should go to the drivers/staging/media tree. Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* staging/easycap: kill timeval members of easycap structTomas Winkler2011-10-171-11/+0
| | | | | | | | timeval[0-9] were not used or used in a ready only code so we can remove them safely and so the code Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: remove oss supportTomas Winkler2011-07-081-35/+0
| | | | | | | | | | | | | | | remove support for OSS. OSS is being deprecated and it is just plain headache to support both alsa and oss. Last I broke the compilation when OSS is enabled with the patch cdaa898b5efcc598ab1004e8f913061dc7005091 staging/easycap: kill telltale logic so this fixes also that issue. Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: remove unused macro MICROSECONDSTomas Winkler2011-07-081-4/+0
| | | | | | Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: kill telltale logicTomas Winkler2011-07-051-2/+0
| | | | | | | | | | | | | | | This reason for this feature was 'some versions of the videodev module overwrite the data which has been written by the call to usb_set_intfdata() in easycap_usb_probe(), replacing it with a pointer to the embedded v4l2_device structure. to detect this, the string in the easycap.telltale[] buffer is checked.' The upstream version of v4l2_device_register sets driver data only when it wasn't already set, therefore this is not needed Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Remove unneeded version.h includes (and add where needed) for ↵Jesper Juhl2011-07-051-1/+0
| | | | | | | | | | | | drivers/staging/easycap/ It was pointed out by 'make versioncheck' that linux/version.h was not always being included where needed and sometimes included needlessly in drivers/staging/easycap/. This patch fixes up the includes. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: PAGE_SIZE is always definedKirill Smelkov2011-07-051-4/+0
| | | | | | | | | | I'm not 100% sure, only 99.99% that PAGE_SIZE is always defined in Linux. So there is no need to check for it. Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: kill EASYCAP_IS_VIDEODEV_CLIENT compilation conditionalTomas Winkler2011-03-071-9/+1
| | | | | | | | | remove EASYCAP_IS_VIDEODEV_CLIENT and irrelevant code as the define is always set in the in-kernel driver Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: wait_i2c should be staticTomas Winkler2011-03-071-1/+0
| | | | | | | | | wait_i2c is only used from easycap_low.c so remove it from the easycap.h and mark it static Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: drop EASYCAP_NEEDS_USBVIDEO_HTomas Winkler2011-02-181-4/+0
| | | | | | | | remove pointless compilation flag Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: kill EASYCAP_NEEDS_V4L2_DEVICE_H and EASYCAP_NEEDS_V4L2_FOPSTomas Winkler2011-02-181-6/+0
| | | | | | | | | EASYCAP_NEEDS_V4L2_DEVICE_H and EASYCAP_NEEDS_V4L2_FOPS are required in in-tree driver Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: replace NOREADBACK with moduel parameterTomas Winkler2011-02-091-0/+1
| | | | | | | | | NOREADBACK doesn't justify Kconfig option so we use module paramter for it. Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* stagine/easycap: make functions regset and regget staticTomas Winkler2011-02-091-23/+0
| | | | | | | | | | | regget and regset functions are used only from within easycap_low.c so they can be static Move the functions to avoid forward declarations Move GET and SET macro definitions into the c-file Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: remove TESTONE and EASYCAP_TESTTONETomas Winkler2011-02-091-3/+0
| | | | | | | | | No longer needed feature for testing driver's handling of the audio stream independently of the urb completion routine Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: remove EASYCAP_SILENT optionTomas Winkler2011-02-091-1/+0
| | | | | | | | This has simulated a fault condition of probing for audio capability Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* stagine/easycap: use module paramter for default encoding instead of ifdefTomas Winkler2011-02-091-1/+0
| | | | | | | | remove PREFER_NTSC ifdef as it cannot be possible put into Kconfig Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* stagine/easycap: make easyoss_fops staticTomas Winkler2011-02-041-1/+0
| | | | | | | easyoss_fops are only accessed from within easycap_sound_oss file Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: kill declaration of not existing variablesTomas Winkler2011-02-041-5/+1
| | | | | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: don't shadow rc variable from macrosTomas Winkler2011-02-041-8/+8
| | | | | | | | rc is used extensively in code as return code variable so it is better not shadowing it in macros Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: replace underscored types with regular onceTomas Winkler2011-02-041-23/+23
| | | | | | | the underscored types should be used in user space headers only Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: repace #if defined with simpler #ifdefTomas Winkler2011-02-041-9/+9
| | | | | | | | for sake of readability replace #if defined with #ifdef and #if (!defined with #ifndef Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: kill EASYCAP_NEEDS_UNLOCKED_IOCTLTomas Winkler2011-02-041-4/+1
| | | | | | | we can kill this option for in-kernel driver Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: remove comment: EASYCAP_NEEDS_ALSATomas Winkler2011-02-041-1/+0
| | | | | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: make ALSA ops function static in sound.cTomas Winkler2011-01-251-14/+0
| | | | | | | | | 1. make also ops function static 2. move around code so to avid forward declarations Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: make oss ops function static in sound_oss.cTomas Winkler2011-01-251-9/+1
| | | | | | | | | | 1. make oss ops function static 2. move around code so to avid forward declarations 3. move OSS ioclts from ioctl.c to sound_oss.c Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: make OSS compilation optional instead of ALSATomas Winkler2011-01-251-12/+13
| | | | | | | | | | | | OSS is deprecated yet currently it is reported to be more stable therefore we keep it but make it optional Revert the conditional compilation: add CONFIG_EASYCAP_OSS and kill EASYCAP_NEEDS_ALSA move oss-only code from easycap_sound.c to easycap_sound_oss.c Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: implement strerror functionTomas Winkler2011-01-251-0/+2
| | | | | | | | | | | Replace long switch statements that just print out errno with strerror function. It reduces around 700 lines from the code. The function should be probably dropped at all but leave for now to not break currently expected debug output. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/easycap: easycap.h ident correctly signed_div_resultTomas Winkler2011-01-251-2/+2
| | | | | | | indent level 1 by tabs Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: easycap: easycap.h use indentation for first levelTomas Winkler2011-01-251-187/+186
| | | | | | | | | | | | | | | | | replace struct { int a; } with more readable struct { int a; } Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: easycap: make functions local to easycap_main.c staticTomas Winkler2011-01-251-25/+2
| | | | | | | | | 1. remove declarations from the header file 2. rearange code in main.c to reduce number of forward declarations Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: easycap: group module parameters handlingTomas Winkler2011-01-251-3/+3
| | | | | | | | | 1. For readability group module parameters handling on one place 2. Introduce kernel config option EASY_DEBUG Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: easycap: use #ifndef __EASYCAP_H_ for header inclusion protectionTomas Winkler2011-01-251-3/+3
| | | | | | | | | use common #ifndef __EASYCAP_H_ instead of if (!defined(EASYCAP_H)) for protecting header from double inclusion Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: easycap: remove redunant headersTomas Winkler2011-01-251-0/+19
| | | | | | | | | | place all globals to easycap.h, which is included by all c-files easycap_standard: fix declaration vs. definiton conflict Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: easycap: replace STRINGIZE with __stringify()Tomas Winkler2011-01-211-2/+0
| | | | | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: easycap: drop redunant backslashes from the codeTomas Winkler2011-01-211-13/+12
| | | | | | | remove \ from the code where C syntex doesnt require it Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: easycap: fix sparse warnings for module parametersTomas Winkler2011-01-211-0/+4
| | | | | | | | | | | | | | | | | easycap_main.c:34:5: warning: symbol 'easycap_debug' was not declared. Should it be static? easycap_main.c:36:5: warning: symbol 'easycap_gain' was not declared. Should it be static? These two variables actually were declared in several places. The variables are used in several files. I've fixed "easycap_debug" so it gets declared in one place only and included properly. For "easycap_gain" made it static and I created added a ->gain member to the easycap struct. This seems cleaner than using a global variable and later on we may make this controlable via sysfs. Cc:Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: easycap: add ALSA supportMike Thomas2011-01-211-17/+67
| | | | | | | This is necessary because some distributions are disabling OSS entirely. Signed-off-by: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: easycap: Make easycap_debug non-staticMike Thomas2011-01-211-1/+0
| | | | | | | | | The parameter easycap_debug appears in macros JOT and JOM and therefore needs to be visible from all source files. The easycap_ prefix should be sufficient to avoid namespace clashes outside the module. Signed-off-by: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: Merge 2.6.37-rc5 into staging-nextGreg Kroah-Hartman2010-12-071-1/+1
|\ | | | | | | | | | | | | | | | | This was done to handle a number of conflicts in the batman-adv and winbond drivers properly. It also now allows us to fix up the sysfs attributes properly that were not in the .37 release due to them being only in this tree at the time. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: easycap needs smp_lock.h, fixes build errorRandy Dunlap2010-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add header file to fix build error: drivers/staging/easycap/easycap_main.c:4251: error: implicit declaration of function 'lock_kernel' drivers/staging/easycap/easycap_main.c:4254: error: implicit declaration of function 'unlock_kernel' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * BKL: remove extraneous #include <smp_lock.h>Arnd Bergmann2010-11-171-1/+0
| | | | | | | | | | | | | | | | | | | | The big kernel lock has been removed from all these files at some point, leaving only the #include. Remove this too as a cleanup. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | staging/easycap: make module params private/static, fix buildRandy Dunlap2010-11-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The easycap driver has module parameters (bars, gain, & debug) with global scope that intrude on the kernel namespace and cause build problems. Change the names of them to be driver-specific and make 2 of them static. drivers/built-in.o:(.bss+0x97c00): multiple definition of `debug' ld: Warning: size of symbol `debug' changed from 58 in arch/x86/built-in.o to 4 in drivers/built-in.o Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | staging/easycap: Improve interface to the videodev moduleMike Thomas2010-11-091-13/+3
| | | | | | | | | | | | | | | | The changes here represent an intermediate step towards bringing the driver within the V4L2 framework. Signed-off-by: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | staging/easycap: Eliminate BKLMike Thomas2010-11-091-2/+14
| | | | | | | | | | | | | | | | | | | | No locking is required for normal operation of the driver, but locking is needed to prevent an Oops during some hot-unplugging scenarios. The BKL is replaced here by mutex locks together with traps to detect null pointers following asynchronous device disconnection. Signed-off-by: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | staging/easycap: Add option to show conspicuous indication of signal lossMike Thomas2010-11-091-0/+2
| | | | | | | | | | | | | | | | | | | | A new module parameter turns on the option of displaying a testcard when the analogue input signal is lost (more precisely: when the hardware detects no field/frame synchronization). This feature has been requested in the context of security cameras used at night. Signed-off-by: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | staging/easycap: Implement interlaced modes and reduced frameratesMike Thomas2010-11-091-3/+13
| | | | | | | | | | | | | | | | Interlaced modes are requested by tvtime. Reduced framerates are preferred by some userspace programs, e.g. astronomy applications. Signed-off-by: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | staging/easycap: Improve hardware initializationMike Thomas2010-11-091-11/+36
| | | | | | | | | | | | | | | | | | | | | | Sometimes at startup the video urbs consistently and persistently deliver bad data, each video frame (not isoc frame) containing an excess of precisely two bytes. A brute-force cure implemented here is to repeatedly reinitialize the registers of the SAA7113H chip and the STK1160 USB bridge until good behaviour is obtained. Signed-off-by: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | staging/easycap: Make code re-entrantMike Thomas2010-11-091-11/+46
| | | | | | | | | | | | | | | | | | In order to allow multiple EasyCAP dongles to operate simultaneously without mutual interference all static variables have been eliminated except for a persistent inventory of plugged-in dongles at module level. Signed-off-by: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | staging/easycap: Remove obsolete routinesMike Thomas2010-11-091-34/+2
|/ | | | | | | | | The so-called bridger routine has proved unnecessary following general improvements elsewhere. The explain_() functions were a convenience during early development, but are unnecessary and inappropriate now. Signed-off-by: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: Pushdown bkl to easycap ioctl handlersFrederic Weisbecker2010-08-091-6/+2
| | | | | | These were amongst the last users of struct file_operations:ioctl Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>