summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
AgeCommit message (Collapse)Author
2009-05-01pvrusb2: Don't use the internal i2c client listMike Isely
From: Jean Delvare <khali@linux-fr.org> The i2c core used to maintain a list of client for each adapter. This is a duplication of what the driver core already does, so this list will be removed as part of a future cleanup. Anyone using this list must stop doing so. For pvrusb2, I propose the following change, which should lead to an equally informative output. The only difference is that i2c clients which are not a v4l2 subdev won't show up, but I guess this case is not supposed to happen anyway. Priority: normal Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mike Isely <isely@pobox.com>
2009-04-05pvrusb2: Select, track, and report IR scheme in use with the deviceMike Isely
From: Mike Isely <isely@pobox.com> 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. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-04-29backport commit 3444b26afa145148951112534f298bdc554ec789Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> kernel-sync: Author: David Vrabel <david.vrabel@csr.com> Date: Wed Apr 8 17:36:28 2009 +0000 USB: add reset endpoint operations Wireless USB endpoint state has a sequence number and a current window and not just a single toggle bit. So allow HCDs to provide a endpoint_reset method and call this or clear the software toggles as required (after a clear halt, set configuration etc.). usb_settoggle() and friends are then HCD internal and are moved into core/hcd.h and all device drivers call usb_reset_endpoint() instead. If the device endpoint state has been reset (with a clear halt) but the host endpoint state has not then subsequent data transfers will not complete. The device will only work again after it is reset or disconnected. CC: Mike Isely <isely@isely.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-05merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-01pvrusb2: use usb_interface.dev for v4l2_device_registerJanne Grunau
From: Janne Grunau <j@jannau.net> Priority: normal Signed-off-by: Janne Grunau <j@jannau.net> Acked-by: Mike Isely <isely@pobox.com>
2009-03-31pvrusb2: Fix uninitialized tuner_setup field(s)Mike Isely
From: Mike Isely <isely@pobox.com> Any time a struct (especially one not defined by this driver) is allocated, we MUST zero its underlying storage. This makes our usage of the struct predictable and robust against future changes where fields might be added that we don't know about. Failing to do this with tuner_setup left the config field uninitialized which then caused trouble with the tuner type used for HVR-1950 devices. Priority: high Signed-off-by: Mike Isely <isely@pobox.com>
2009-04-01v4l2-common: add explicit v4l2_device pointer as first arg to ↵Hans Verkuil
new_(probed)_subdev From: Hans Verkuil <hverkuil@xs4all.nl> The functions v4l2_i2c_new_subdev and v4l2_i2c_new_probed_subdev relied on i2c_get_adapdata to return the v4l2_device. However, this is not always possible on embedded platforms. So modify the API to pass the v4l2_device pointer explicitly. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-04-01v4l2-subdev: move s_std from tuner to core.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> s_std didn't belong in the tuner ops. Stricly speaking it should be part of the video ops, but it is used by audio and tuner devices as well, so it is more efficient to make it part of the core ops. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-30v4l2-subdev: add load_fw and use that instead of abusing core->init.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The init callback was used in several places to load firmware. Make a separate load_fw callback for that. This makes the code a lot more understandable. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-24pvrusb2: Use v4l2_device_disconnect()Mike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-15pvrusb2: Add composite and s-video input support for OnAir devicesMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-14pvrusb2: Add sub-device for demodMike Isely
From: Mike Isely <isely@pobox.com> Forgot to include the tda9887 component when moving to v4l2-subdev. I got fooled because its name is "tuner", the same as the tuner module. Silly me. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-08pvrusb2: Remove old i2c layer; we use v4l2-subdev nowMike Isely
From: Mike Isely <isely@pobox.com> 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. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-08pvrusb2: Implement better reporting on attached sub-devicesMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Fix space-after-comma idiocyMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Define default I2C address for CS53L32A sub-deviceMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Fix incorrectly named sub-device IDMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Define default I2C addresses for msp3400 and saa7115 sub-devicesMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Issue required core init broadcast to all sub-devicesMike Isely
From: Mike Isely <isely@pobox.com> The v4l2-subdev infrastructure requires that an initialization call must be issued to all attached sub-devices before normal operation can start. This change satisfies that requirement. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Implement mechanism to force a full sub-device updateMike Isely
From: Mike Isely <isely@pobox.com> When a pvrusb2 driver instance first initializes, we need to be sure to send out a complete state update for everything to all attached modules. The old i2c layer did this by keeping a separate mask of "stale" bits for each attached module - and setting that mask to all stale when that module attaches. But the new sub-device adaptation I've implemented here no longer has per-module stale bits. So instead there's now a global "force dirty" bit that is set upon instance initialization, before the sub-devices are attached. After the first update, this bit is cleared, allowing for normal update-on-dirty behavior. In this manner, we ensure that all sub-devices have been properly synchronized at initialization. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Implement trace print for stream on / off actionMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Define default I2C address for cx25840 sub-deviceMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Broadcast tuner type change to sub-devicesMike Isely
From: Mike Isely <isely@pobox.com> The tuner sub-device isn't going to work very well unless we tell it the correct tuner type to use... Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Deal with space-after-comma coding style idiocyMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Sub-device update must happen BEFORE state dirty bits are clearedMike Isely
From: Mike Isely <isely@pobox.com> The sub-device update mechanism relies on various "dirty" bits in the driver in order to know what pieces of state need to be propagated out to the various sub-devices. But that won't work if the dirty bits are cleared before the update gets a chance to run. This change ensures that the update takes place before the dirty bits are cleared. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Allow sub-devices to insert correctlyMike Isely
From: Mike Isely <isely@pobox.com> A sub-device won't successfully attach to our I2C adapter if its class isn't set to zero. Right the class is still set to I2C_CLASS_TV_ANALOG in order to allow the old mechanism to still work. This change temporarily sets the class to zero during the interval when the sub-device attaches. This code will get removed when the old i2c layer is finally removed from the driver. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Fix bugs involved in listing of sub-devicesMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Fix uninitialized counterMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Define default i2c address for wm8775 sub-deviceMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Implement more sub-device loading trace and improve error handlingMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Tie in cx25840 sub-device supportMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Tie in msp3400 sub-device supportMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: make sub-device specific update function names uniformMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Make audio sample rate update into a sub-device broadcastMike Isely
From: Mike Isely <isely@pobox.com> The pvrusb2 driver had previously been using i2c module specific calls to set the sample rate (a long long time ago this was needed). These days it is safe to use a broadcast so let's just broadcast this when communicating audio sample rate to sub-devices. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Tie in saa7115 sub-device handlingMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Tie in wm8775 sub-device handlingMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Implement sub-device specific update frameworkMike Isely
From: Mike Isely <isely@pobox.com> Lay down a foundation whereby it becomes possible to send customized updates to specific sub-devices. (This becomes useful for routing configuration, which is a very sub-device specific operation.) Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Implement reporting of connected sub-devicesMike Isely
From: Mike Isely <isely@pobox.com> The pvrusb2 driver has a function that reports internal state. It can be accessed from either the debug interface or as the result of a v4l log status request. This change adds information listing sub-devices to the report. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Cause overall initialization to fail if sub-driver(s) failMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Tie in sub-device decoder start/stopMike Isely
From: Mike Isely <isely@pobox.com> Implement code to send appropriate streaming start/stop commands to attached sub-devices Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Clean-up / placeholders inserted for additional developmentMike Isely
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Note who our video decoder sub-device is, and set it upMike Isely
From: Mike Isely <isely@pobox.com> Other code may need to treat the video decoder sub-device in a special manner, so this change implements code to recognize when such a sub-device is connected to the driver, does any special processing for it, and notes who the device is for future reference. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Tie in various v4l2 operations into the sub-device mechanismMike Isely
From: Mike Isely <isely@pobox.com> This is another step in the v42l-subdev assimilation. This implements various call-outs to sub-devices based on state changes within the pvrusb2 driver. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Implement status fetching from sub-devicesMike Isely
From: Mike Isely <isely@pobox.com> Implement status fetching operations in terms of calling out to sub-device(s). Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Tie in debug register access to sub-devicesMike Isely
From: Mike Isely <isely@pobox.com> Implement tie-in for v4l2 debug register access such that the appropriate attached sub-device is handled. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Tie-in sub-device log requestsMike Isely
From: Mike Isely <isely@pobox.com> Trigger a broadcast to attached sub-devices when a logging request is made. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Lay foundation for triggering sub-device updatesMike Isely
From: Mike Isely <isely@pobox.com> These changes set up the spot where we'll check for and set general updates to any attached sub-devices. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Tie up loose ends with v4l2-subdev setupMike Isely
From: Mike Isely <isely@pobox.com> Tie up loose ends with v4l2-subdev setup. Set attached module's group ID to match our internal ID, emit a few useful messages when sub-devices are dealt with, implement better error legs, and fix an error in the old i2c layer (caused by changes related to the v4l2-subdev work here). Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: Providing means to stop tracking an old i2c moduleMike Isely
From: Mike Isely <isely@pobox.com> This implements a temporary mechanism to "untrack" an i2c module from the old i2c layer. The v4l2-subdev related code in the driver will use this to remove a sub-device from the old i2c layer. In the end, once the old i2c layer is removed, this will also eventually go away. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
2009-03-06pvrusb2: New device attribute mechanism to specify sub-devicesMike Isely
From: Mike Isely <isely@pobox.com> Set up new mechanism for declaring and loading appropriate sub-devices when driver initializes. This is another part of the v4l2-subdev adoption. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>