summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2
AgeCommit message (Collapse)Author
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-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-28pvrusb2: Implement ability to disable IR receiverMike Isely
From: Mike Isely <isely@pobox.com> Anyone using multiple PVR USB2 devices really only want one of them acting as the actual IR receiver. Implemented here is a new per-instance module option (ir_mode) which is a flag to enable the IR receiver. The default is enabled. IR reception is disabled by blocking access to the IR receiver chip in the device. Signed-off-by: Mike Isely <isely@pobox.com>
2007-04-28pvrusb2: Improve handling of PAL-60 video standardMike Isely
From: Mike Isely <isely@pobox.com> This patch originated with Servaas Vandenberghe <vdb128@picaros.org> and has been further developed a bit (to preserve saa7115 behavior). These changes allow for correct operation of PAL-60 video (Servaas tested this against a PAL-B/G tuner with the video standard overridden as a module option). Signed-off-by: Mike Isely <isely@pobox.com>
2007-04-28pvrusb2: kill unnecessary attribute->ownerMike Isely
From: Tejun Heo <htejun@gmail.com> [Mike Isely: This is the pvrusb2 affected part of a much larger patch in the kernel from Tejun Heo] sysfs is now completely out of driver/module lifetime game. After deletion, a sysfs node doesn't access anything outside sysfs proper, so there's no reason to hold onto the attribute owners. Note that often the wrong modules were accounted for as owners leading to accessing removed modules. This patch kills now unnecessary attribute->owner. Note that with this change, userland holding a sysfs node does not prevent the backing module from being unloaded. For more info regarding lifetime rule cleanup, please read the following message. http://article.gmane.org/gmane.linux.kernel/510293 Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-04-28pvrusb2: use mutex instead of semaphoreMike Isely
From: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> the pvrusb2 driver use a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-04-07pvrusb2: Gather USB bus address info and report itMike Isely
From: Mike Isely <isely@pobox.com> The V4L2 API requires a unique bus_info string returned as part of the v4l2_capability structure. These changes gather up the USB address information, from the underlying device, into a string and report that out through v4l2 and via sysfs (for completeness). Signed-off-by: Mike Isely <isely@pobox.com>
2007-04-07pvrusb2: Use NULL instead of 0 for null pointer values (trivial)Mike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-02-27pvrusb2: (trivial) Fix too-wide source lineMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-02-27pvrusb2: Fix compilation warning for amd64 builds (use %zu instead of %u)Mike Isely
From: Mike Isely <isely@pobox.com> signed-off-by Mike Isely <isely@pobox.com> signed-off-by Michael Krufky <mkrufky@linuxtv.org>
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-21make pvr2_encoder_prep_config() staticMauro Carvalho Chehab
From: Adrian Bunk <bunk@stusta.de> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21backport git changeset c5a69d57eb48e36f84c0737b5b24ec277d7dbfbaMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> This backport patch from Tobias Klauser <tklauser@distanz.ch> makes pvrusb2 driver compliant with C99 section 6.11.5. kernel-sync: 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 -include linux/version.h to cflagsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Add -include linux/version.h to the cflags. Now code can have backward compatibility test without including compat.h first. Linux headers included from compat.h are removed, so that code will get the same headers when compiling in v4l-dvb as it does in the kernel. Many drivers have compat.h moved to the end of their include list, as this lets compat.h do things it can't do at the beginning. Such as test of something is defined to include compat code, or to put a wrapper around a function without changing the function's name. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-02-07pvrusb2: Register I2C adapter (more) correctlyMike Isely
From: Mike Isely <isely@pobox.com> An I2C adapter needs to register an association with the actual parent device. Until 2.6.20, not doing this was a benign problem; now it causes an ugly warning in the system log. This 1-line patch corrects that oversight. Signed-off-by: Mike Isely <isely@pobox.com>
2007-02-07pvrusb2: Be more forgiving about encoder firmware sizeMike Isely
From: Mike Isely <isely@pobox.com> The pvrusb2 driver previously rejected encoder firmware whose size was not a multiple of 8192. But this is a false check because it's possible to find cx23416 firmware whose size doesn't conform to this limit. So change the firmware loader implementation to be more forgiving of the image size. Signed-off-by: Mike Isely <isely@pobox.com>
2007-02-07pvrusb2: Follow coding style convention for "#if 0" blocksMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-02-07pvrusb2: Fix printk format typoMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-02-02Http://linuxtv.org/hg/~mcisely/pvrusb2
From: Mauro Carvalho Chehab <mchehab@infradead.org> Follows the same coding style for commented code The latest patch series added a different way of commenting unused patches: #ifdef notdef But V4L/DVB coding style uses, instead: #if 0 This have also the advantage of not sending to mainstream those development codes that doesn't make sense at a production environment, while keeping them under development trees. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mike isely <isely@pobox.com>
2007-01-28pvrusb2: VIDIOC_DBG_[S|G]_REGISTER fixupsMike Isely
From: Mike Isely <isely@pobox.com> Support 64 bit register IDs internally. Only allow root access to this API (for both set and get). Note that actual 64 bit access only becomes possible once the definition for v4l2_register is updated, but this change clears the way for it from the viewpoint of the pvrusb2 driver. Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-28pvrusb2: video corruption fixesMike Isely
From: Mike Isely <isely@pobox.com> Tweak the encoder setup in order to stop it from corrupting the video data when there is a disruption in the data flow (e.g. a channel change). Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-28pvrusb2: encoder comm protocol cleanupMike Isely
From: Mike Isely <isely@pobox.com> Update the implementation of the communication protocol for operating the encoder, using updated knowledge about the encoder. Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-28pvrusb2: Control protocol cleanupMike Isely
From: Mike Isely <isely@pobox.com> Several special-case FX2 commands were being issued through pvr2_write_u16() and pvr2_write_8(), but there's really nothing special case about them. These date from a very early time in the driver development. This patch removes these functions and replaces their use with calls to pvr2_send_request. Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-28Merge from v4l-dvbMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
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-21pvrusb2: Add boilerplate to new header fileMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-21pvrusb2: Use macro names for FX2 commandsMike Isely
From: Michael Krufky <mkrufky@linuxtv.org> This is a maintainability cleanup; use nice names for all the FX2 commands instead of raw bytes. This way we can easily find where we issue FX commands. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-21pvrusb2: Add comment for why G_TUNER only looks at index zeroMike Isely
From: Mike Isely <isely@pobox.com> Mauro and I had fixed this bug at the same time. It's a silly one-liner, but my version of the fix included a comment explaining why it was needed. So I'm putting up this version of the fix. Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-21Fix: VIDIOC_G_TUNER were returning an endless number of tunersMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> pvrusb2 have only one tuner inside. However, as it were not handling index, a call to v4l-info were returning as if it were an infinite number of tuners: $ v4l-info|grep VIDIOC_G_TUNER |head -5 VIDIOC_G_TUNER(0) VIDIOC_G_TUNER(1) VIDIOC_G_TUNER(2) VIDIOC_G_TUNER(3) VIDIOC_G_TUNER(4) CC: Mike Isely <isely@isely.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-01-21Remove some warnings when compiling on x86_64Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> pvrusb2-encoder.c: In function 'pvr2_encoder_cmd': pvrusb2-encoder.c:195: warning: format '%u' expects type 'unsigned int', but argument 3 has type 'long unsigned int' pvrusb2-encoder.c:205: warning: format '%u' expects type 'unsigned int', but argument 3 has type 'long unsigned int' pvrusb2-encoder.c: In function 'pvr2_encoder_vcmd': pvrusb2-encoder.c:303: warning: format '%u' expects type 'unsigned int', but argument 3 has type 'long unsigned int' CC: Mike Isely <isely@isely.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-01-19pvrusb2: Allow VIDIOC_S_FMT with -1 for resolution valuesMike Isely
From: Pantelis Koukousoulas <pakt223@freemail.gr> With the previous patch, mplayer started but was polling the video device forever without any video actually coming out. Further analysis showed that it does a VIDIOC_S_FMT with width and height set to -1 (!!!). The code handling this only cares that both are lower than the minimum range allowed so it ends up setting the size to 19x17 (!!) This pretty much breaks the encoder here. Even if this breakage is yet another (TM) result of my setup, setting the size to 19x17 by default would surprise most users IMHO. So, special case for -1 and interpret this to be a request for the default size, please. Users can then set their favorite size both through mplayer and through sysfs. With this patch, mplayer finally works in pvr:// mode (not that we really gain anything over operating it through sysfs with lirc, sometime I might actually get off my lazy a** and contribute this setup too) Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr> Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: Introduce fake audio input selectionMike Isely
From: Pantelis Koukousoulas <pakt223@freemail.gr> This should allow mplayer pvr:// to start. The trick is that no matter what actual input we use under this "fake" one, it will be able to do stereo :-) Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr> Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: Emit VIDIOC_S_TUNER correctlyMike Isely
From: Mike Isely <isely@pobox.com> Audio mode changes are not private to the audio chip - other I2C modules need to see this as well. And since the command in question is VIDIOC_S_TUNER which is a standard v4l2 command, we really should be broadcasting it out. This change sets up a broadcast pathway for VIDIOC_S_TUNER and also eliminates the now redundant code from the audio chip handler. This fix enables stereo reception for the FM radio Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: Use ARRAY_SIZE wherever possibleMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: Use kzalloc in place of kmalloc/memset pairsMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: A patch to use ARRAY_SIZE macro when appropriateMike Isely
From: Ahmed S. Darwish <darwish.07@gmail.com> Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: V4L EXT_CTRLS fixupMike Isely
From: Mike Isely <isely@pobox.com> Attempts to enumerate or operate on a group of EXT_CTRLS where the group size is zero is OK; don't fail on such operations. At least one application uses this to probe for the existence of this API so let it succeed. Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: Minor dead code / comment cleanupsMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: Fix sizeof() calculation foul-upMike Isely
From: Mike Isely <isely@pobox.com> This bug caused uninitalized data to be returned during a G_TUNER status poll. Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: Fix missing break statement which had broken VIDIOC_S_TUNERMike Isely
From: Mike Isely <isely@pobox.com> The lack of a break statement in the handling of VIDIOC_S_TUNER caused errors to result. Fixed. Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: trace print addedMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: Stop hardcoding frequency rangesMike Isely
From: Mike Isely <isely@pobox.com> Rather than hardcoding frequency ranges everywhere, rely on VIDIOC_G_TUNER results wherever we can. Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: Remove automodeswitch controlMike Isely
From: Mike Isely <isely@pobox.com> The automodeswitch control was a feature that enable automatic radio / tv switching based on the selected frequency. However since frequency ranges can overlap and also since apparently in some cases it's possible for the same frequency range to be both tv and radio in a specific region, then this feature can't safely work. So it's removed. Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: Slight debug printing efficiency fixupMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: VIDIOC_G_TUNER cleanupMike Isely
From: Mike Isely <isely@pobox.com> Clean up use of VIDIOC_G_TUNER; we now correctly gather info from all the I2C client modules. Also abide by V4L2_TUNER_CAP_LOW appropriately. Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: Allow streaming from /dev/radioXMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: Use kzalloc instead of kmalloc+memset pairsMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>