summaryrefslogtreecommitdiff
path: root/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
AgeCommit message (Collapse)Author
2011-03-22[media] remove the old RC_MAP_HAUPPAUGE_NEW RC mapMauro Carvalho Chehab
The rc-hauppauge-new map is a messy thing, as it bundles 3 different remote controllers as if they were just one, discarding the address byte. Also, some key maps are wrong. With the conversion to the new rc-core, it is likely that most of the devices won't be working properly, as the i2c driver and the raw decoders are now providing 16 bits for the remote, instead of just 8. delete mode 100644 drivers/media/rc/keymaps/rc-hauppauge-new.c Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-01-31[media] ir-kbd-i2c: improve remote behavior with z8 behind usbJarod Wilson
Add the same "are you ready?" i2c_master_send() poll command to get_key_haup_xvr found in lirc_zilog, which is apparently seen in the Windows driver for the PVR-150 w/a z8. This stabilizes what is received from both the HD-PVR and HVR-1950, even with their polling intervals at the default of 100, thus the removal of the custom 260ms polling_interval in pvrusb2-i2c-core.c. Acked-by: Andy Walls <awalls@md.metrocast.net> Acked-by: Mike Isely <isely@isely.net> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19[media] pvrusb2: Provide more information about IR units to lirc_zilog and ↵Andy Walls
ir-kbd-i2c When registering an IR Rx device with the I2C subsystem, provide more detailed information about the IR device and default remote configuration for the IR driver modules. Also explicitly register any IR Tx device with the I2C subsystem. Signed-off-by: Andy Walls <awalls@md.metrocast.net> Acked-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13498): pvrusb2: Bind I2C address 0x71 for Zilog IR devicesMike Isely
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12343): Stop defining I2C adapter IDs nobody usesJean Delvare
There is no point in defining I2C adapter IDs when no code is using them. As this field might go away in the future, stop using it when we don't need to. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11850): pvrusb2: Instantiate ir_video I2C device by defaultJean Delvare
Now that the ir-kbd-i2c driver has been converted to a new-style i2c driver, we can instantiate the ir_video I2C device by default. The pvr2_disable_ir_video is kept to disable the IR receiver, either because the user doesn't use it, or for debugging purpose. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11746): pvrusb2: Set ir_video autoloading to default disabledMike Isely
This sets the disable_autoload_ir_video module option to being set, which disables any attempt by the driver to autoload IR support. This changes preserves previous behavior, for now. This change can be set back concurrent with other changes that finally update i2c-kbd-i2c to use the new i2c binding model. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11745): pvrusb2: Update to work with upcoming ir_video changes in ↵Mike Isely
v4l-dvb core The ir-kbd-i2c module is about to be updated to match the new style i2c binding model. These pvrusb2 changes maintain compatibility with that change. Note that this does not actually break anything even without the expected ir-kbd-i2c changes yet because previously the pvrusb2 didn't autoload ir-kbd-i2c anyway. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11744): pvrusb2: Select, track, and report IR scheme in use with ↵Mike Isely
the device This change defines all possible "IR schemes" related to the pvrusb2 driver, on a per-device basis. That information is then set according to the hardware in use. The idea here is to make possible a more intelligent future decision on which, if any, IR receiver driver might be loaded during initialization. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11437): pvrusb2: Drop client_register/unregister stubsJean Delvare
The client_register and client_unregister methods are optional so there is no point in defining stub ones. Especially when these methods are likely to be removed soon. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11204): pvrusb2: Remove old i2c layer; we use v4l2-subdev nowMike Isely
This change removes the old i2c module controlling layer from the pvrusb2 driver. This is code that first had appeared in the driver back in December 2005. It's history. Now we use v4l2-subdev. Please note also that with this change, the driver will no longer be usable in kernels older that 2.6.22. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11161): pvrusb2: Set i2c autoprobing to be off by defaultMike Isely
In order to keep a sub-device from promiscuously attaching to the pvrusb2 driver, the i2c adapter's class must be cleared. This change clears that class by default. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11158): pvrusb2: New device attribute mechanism to specify sub-devicesMike Isely
Set up new mechanism for declaring and loading appropriate sub-devices when driver initializes. This is another part of the v4l2-subdev adoption. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11154): pvrusb2: Split i2c module handling from i2c adapterMike Isely
This is the first step in the effort to move the pvrusb2 driver over to using the v4l2-subdev framework. This commit involves mainly splitting apart pvrusb2-i2c-core - part of it is the driver's I2C adapter driver and the rest is the old i2c module handling logic. The i2c module handling junk is moved out to pvrusb2-i2c-track and various header references are correspondingly updated. Yes, this patch has a huge pile of checkpatch complaints, but I'm NOT going to fix any of it. Why? First, I'm moving a large chunk of existing code and I'm not going to spend time adjusting it to match someone's idea of coding style. Second, in the end I expect all that moved code to go away by the time the rework is done so wasting time on it now to adhere to the standard is in the end a large waste of time. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10258): pvrusb2: Issue VIDIOC_INT_INIT to v4l2 modules when they ↵Mike Isely
first attach It appears that various v4l-dvb drivers are changing to require explicit initialization before use. This change to the pvrusb2 driver implements an automatic issuance of VIDIOC_INT_INIT when a module is bound to the driver, thus conforming to the new behavior. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12V4L/DVB (8906): v4l-dvb: fix assorted sparse warningsHans Verkuil
Fix sparse warnings. None are serious, but cutting down on these helps find future serious sparse warnings/errors. Redid the av7710.c patch based on a suggestion by Oliver Endriss. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12V4L/DVB (8902): pvrusb2: Remove comment lines which refer to checkpatch's ↵Mike Isely
behavior Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12V4L/DVB (8901): pvrusb2: Disable virtual IR device when not needed.Mike Isely
Disable "virtual" IR receiver on for 24xxx devices that have an internal IR blaster. In that case there's another another IR receiver present and to leave the virtual receiver available just causes confusion. This means that 24xxx users will no longer see a phantom IR chip. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12V4L/DVB (8900): pvrusb2: Implement cropping pass throughMike Isely
This builds upon the previous pvrusb2 change to more formally implement full cropping support. This enables access from the driver's V4L interface, and enables access to full capabilities from sysfs as well. Note that this is only effective when in analog mode. It also will only work when the underlying digitizer's driver (saa7115 or cx25840 depending on the hardware) also implements the appropriate functions. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-07-26V4L/DVB (8474): pvrusb2: Enable IR chip on HVR-1900 class devicesMike Isely
The Zilog IR chip on HVR-1900 devices is held in reset when the device initializes. We have to bring this chip out of reset before LIRC has any chance of operating the chip. So do it. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (7936): pvrusb2: Remove svn Id keyword from all sourcesMike Isely
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7094): static memoryDouglas Schilling Landgraf
- Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6699): pvrusb2: Use of virtual IR chip is a device-specific attributeMike Isely
For Hauppauge 24xxx devices, the IR receiver is a custom piece of logic that is very specific to the device. The pvrusb2 driver can virtualize this to make it look like a more normal IR receiver found in other Hauppauge devices. The decision of whether or not to enable this virtualization however is a device-specific attribute, thus this changeset. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6692): pvrusb2: Centralize device specific attributes into a single ↵Mike Isely
place The pvrusb2 driver currently supports two variants of the Hauppauge PVR USB2. However there are other hardware types potentially supportable, but the driver at the moment is not structured to make it easy to describe these minor variations. This changeset is the first set of changes to make such additional device support possible. Device attributes are held in several tables all contained within pvrusb2-devattr.c; all other device-specific driver behavior now derives from these tables. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6691): pvrusb2: Rework pipeline state controlMike Isely
This is a new implementation for video pipeline control within the pvrusb2 driver. Actual start/stop of the pipeline is moved to the driver's kernel thread. Pipeline stages are controlled autonomously based on surrounding pipeline or application control state. Kernel thread management is also cleaned up and moved into the internal control structure of the driver, solving a set up / tear down race along the way. Better failure recovery is implemented with this new control strategy. Also with this change comes better control of the cx23416 encoder, building on additional information learned about the peculiarities of controlling this part (this information was the original trigger for this rework). With this change, overall encoder stability should be considerably improved. Yes, this is a large change for this driver, but due to the nature of the feature being worked on, the changes are fairly pervasive and would be difficult to break into smaller pieces with any semblence of step-wise stability. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-13i2c: Remove NOP i2c_algorithm.algo_control() methodsDavid Brownell
This removes NOP implementations of i2c_algorithm.algo_control. With this change, there are no implementations of this hook in the kernel.org tree ... that hook seems about ripe to remove. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-10-10V4L/DVB (6315): pvrusb2: Change list_for_each+list_entry to list_for_each_entryTrent Piepho
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Reviewed-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6212): pvrusb2: I2C adapter tweaks from Jean DelvareJean Delvare
* I2C adapters aren't expected to handle I2C_M_NOSTART unless they really have to. As the pvrusb2 driver doesn't support it, I take it that it doesn't need it so it shouldn't mention it at all. * I2C_FUNC_SMBUS_EMUL includes I2C_FUNC_SMBUS_BYTE_DATA so listing both is redundant. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-09V4L/DVB (5575): Pvrusb2: Implement ability to disable IR receiverMike Isely
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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5169): Pvrusb2: Use macro names for FX2 commandsMichael Krufky
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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5091): Pvrusb2: Use kzalloc in place of kmalloc/memset pairsMike Isely
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5090): Pvrusb2: A patch to use ARRAY_SIZE macro when appropriateAhmed S. Darwish
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5087): Pvrusb2: Fix sizeof() calculation foul-upMike Isely
This bug caused uninitalized data to be returned during a G_TUNER status poll. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5085): Pvrusb2: trace print addedMike Isely
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5081): Pvrusb2: VIDIOC_G_TUNER cleanupMike Isely
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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-13i2c: Declare more i2c_adapter parent devicesJean Delvare
Declare the parent device of i2c_adapter devices each time we can easily do so. It makes the i2c_adapter appear at the right place in the device tree, rather than as a platform device. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Len Brown <len.brown@intel.com> Cc: Jordan Crouse <jordan.crouse@amd.com> Cc: Jody McIntyre <scjody@modernduck.com> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: v4l-dvb-maintainer@linuxtv.org Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
2006-12-10V4L/DVB (4763): Pvrusb2: Implement IR reception for 24xxx devicesMike Isely
Unlike 29xxx devices, the 24xxx model series does not have a dedicated I2C device for reception of IR codes. Instead IR is handled directly by the FX2 microcontroller and the results are communicated via commands to the FX2. Rather than implement a whole new IR reception pathway for 24xxx devices, this changeset instead emulates the presence of the 29xxx device's I2C based IR receiver by intercepting commands to that chip and issuing appropriate FX2 commands to do the needed action. This has the result of allowing all the usual IR frameworks (ir-kbd-i2c or lirc) to continue working unmodified for 24xxx devices. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26V4L/DVB (4595): Remove CONFIG_VIDEO_PVRUSB2_24XXX from pvrusb2 driverMike Isely
Support for 24xxx devices was previously explicitly bracketed with CONFIG_VIDEO_PVRUSB2_24XXX inside the code because we didn't trust the stability of these changes. We trust it now; so there's no reason to leave this out of the driver anymore. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-30V4L/DVB (4288): Clean out a zillion sparse warnings in pvrusb2Mike Isely
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-30V4L/DVB (4287): Pvrusb2/: possible cleanupsAdrian Bunk
This patch contains the following possible cleanups: - make needlessly global code static - #if 0 unused global functions Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27V4L/DVB (4228a): pvrusb2 to kernel 2.6.18Mike Isely
Implement V4L2 driver for the Hauppauge PVR USB2 TV tuner. The Hauppauge PVR USB2 is a USB connected TV tuner with an embedded cx23416 hardware MPEG2 encoder. There are two major variants of this device; this driver handles both. Any V4L2 application which understands MPEG2 video stream data should be able to work with this device. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>