summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2
AgeCommit message (Collapse)Author
2008-04-05pvrusb2: Implement critical digital streaming quirk for onair devicesMike Isely
From: Mike Isely <isely@pobox.com> Implement timed measurement of encoder operation for the first time it is run. This allows the driver to note when the encoder has been run successfully for at least 1/4 second. On top of that implement various bits to ensure that the encoder has been run once before digital streaming for OnAir devices. This is done via several core state machine tweaks. Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-02pvrusb2: New device attribute for encoder usage in digital modeMike Isely
From: Mike Isely <isely@pobox.com> Some tuners seem to not work in digital mode unless the encoder is healthy. Implement a device attribute to represent this flag and modify the core state machines to enforce this requirement. Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-30pvrusb2-dvb: Fix stuck thread on streaming abortMike Isely
From: Mike Isely <isely@pobox.com> If the device fails to stream, the feed thread will block forever waiting for buffers. But while in this state it was not looking for an exit condition from the driver DVB interface. This caused the thread to jam. Implement a new stop flag (which will be set appropriately) to tell the thread to stop. Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-28pvrusb2-dvb: add atsc/qam support for Hauppauge pvrusb2 model 750xxMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-28pvrusb2: create a separate pvr2_device_desc structure for 751xx modelsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-03-28pvrusb2: Enable OnAir digital operationMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-28pvrusb2: Fix slop involving use of struct which might not be definedMike Isely
From: Mike Isely <isely@pobox.com> When the DVB interface is not compiled, the pvr2_dvb_props struct is not available - so it really should be ifdef'ed out as well. This didn't cause an error because in this context its usage was as an opaque pointer. But it really shouldn't be present at all if DVB is not enabled. Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-28pvrusb2: Fix minor problem involving ARRAY_SIZE confusionMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-28pvrusb2: Rework USB streaming start/stop executionMike Isely
From: Mike Isely <isely@pobox.com> The commands to start / stop USB streaming for an analog device are fairly standard, owing to the fact that all supported devices apparently started from the same common reference design. However with digital mode, the commands seem to vary by vendor. This change makes that variance more explicit. It also cleans up a related problem for OnAir devices which prevented digital mode from working at all. Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-28pvrusb2: Centralize handling of simple FX2 commandsMike Isely
From: Mike Isely <isely@pobox.com> Numerous places in the driver need to issue simple commands to the FX2 microcontroller (e.g. only 1 or 2 bytes, no reply needed). Previously each place that did this, had to take lock, set up a central buffer, and call the function to perform the handshake. This change puts these steps into a single spot. This also has the effect of removing the need to mess with the control lock from numerous places in the code. Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-28pvrusb2: Make FX2 command codes unsigned constantsMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-28pvrusb2: Implement statistics for USB I/O performance / trackingMike Isely
From: Mike Isely <isely@pobox.com> Implement a mechanism in the pvrusb2 driver for gathering statistics on the stream buffering, including bytes transferred, buffers handled, buffers in flight, etc. This is useful for debugging certain classes of streaming issues and for determining if the buffer pool size is generally correct for the driver. Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-28pvrusb2: Remove never-reached break statements (trivial)Mike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-28pvrusb2: Fix misleading bit of debug output (trivial)Mike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-28pvrusb2: state control tweakMike Isely
From: Mike Isely <isely@pobox.com> Don't trigger a pathway state change if it's already been triggered (eliminates some wasted processing and some debug output noise) Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-28pvrusb2: Make associativity of == and && explicit (cosmetic)Mike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-15pvrusb2: Fix compilation goof when CONFIG_VIDEO_PVRUSB2_DVB is offMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2-dvb: Change usage of 0 --> NULLMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2-dvb: Further clean up dvb init/tear-downMike Isely
From: Mike Isely <isely@pobox.com> Move pvr2_dvb_adapter usage out of the pvrusb2 driver core - it's really private to the pvrusb2-dvb module and nothing outside of the dvb implementation should care about it. Creation / destruction of the pvr2_dvb_adapter instance is now contained entirely within pvrusb2-dvb.c. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2-dvb: Don't initialize if device lacks a digital sideMike Isely
From: Mike Isely <isely@pobox.com> In the end we'd like the dvb interface to always be present - even for analog devices (via the mpeg encoder). However right now pvrusb2-dvb won't operate correctly if the hardware doesn't have a digital tuner, so don't initialize the DVB interface unless we know we have a digital tuner. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2-dvb: Remove digital_up flagMike Isely
From: Mike Isely <isely@pobox.com> Other pvrusb2-dvb changes have made the digital_up flag obsolete. So kill it. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2-dvb: Rework module tear-downMike Isely
From: Mike Isely <isely@pobox.com> Rather than making an explicit call to tear down the pvrusb2-dvb module, use the callback in the pvr2_channel structure. This has the advantage that now tear-down only happens when it makes sense. The previous implementation had scenarios where it was possible for the tear-down call to happen without a prior initialization. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-06pvrusb2: Clean up dvb streaming start/stopMike Isely
From: Mike Isely <isely@pobox.com> Eliminate the need for a separate pvr2_dvb_fh; since in the DVB context there can only ever be a single instance then there is no need for a separate instance to handle streaming state. This simplifies the module. Also move streaming start/stop out of the feed thread and into the driver's main context - which makes it possible for streaming start up failures to be detected by the DVB core. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-05pvrusb2: Fix oops in pvrusb2-dvbMike Isely
From: Mike Isely <isely@pobox.com> The pvrusb2-dvb feed thread cannot be allowed to exit by itself without first waiting for kthread_should_stop() to return true. Otherwise the driver will have a dangling task_struct context, which will cause a very nasty kernel oops. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: Fix broken debug interface buildMike Isely
From: Mike Isely <isely@pobox.com> Fix pvrusb2 kbuild typo introduced when pvrusb2-dvb was added. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: Fix really bad typo if DVB config option descriptionMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: Add VIDEO_PVRUSB2_DVB config variable.Mike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2-dvb: set to DTV mode before attaching frontendMike Isely
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2-dvb: finish up stream & buffer handlingMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2-dvb: start working on streaming / buffer handling codeMike Isely
From: Michael Krufky <mkrufky@linuxtv.org> start work on streaming / buffer handling code to feed the software demux Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2-dvb: add pvr2_dvb_bus_ctrl to allow frontends to negotiate bus accessMike Isely
From: Michael Krufky <mkrufky@linuxtv.org> This function is just a skeleton for now - a placeholder to remind us to fix it. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: add DVB API frameworkMike Isely
From: Michael Krufky <mkrufky@linuxtv.org> Add basic framework for the DVB API. This is enough to control the tuner & demod of the digital frontend, but the stream & buffer handling is still missing. Additional note from Mike Isely <isely@pobox.com> - also, since these changes are still very experimental arrange for DVB changes to be compiled in via new CONFIG_VIDEO_PVRUSB2_DVB option, for now. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-15pvrusb2: Fix stupid string typo that has been reproducing wildlyMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-15Backport changeset 5fa1247a2b56f33f88432c24e109deaf91ef8281Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Original patch from Al Viro <viro@ftp.linux.org.uk> Date: Sat Mar 29 03:07:38 2008 +0000 NULL noise: drivers/media kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-15pvrusb2: add new usb pid for 73xxx modelsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-03-08pvrusb2: add new usb pid for 75xxx modelsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-03-07pvrusb2: Fix compilation warningMike Isely
From: Mike Isely <isely@pobox.com> Fix use of a non-int (size_t) being passed in a printf width field. This benign issue has apparently been around for a long time, but went undetected until now. Signed-off-by: Mike Isely <isely@pobox.com>
2008-03-15tuner: rename TUNER_PHILIPS_ATSC to TUNER_PHILIPS_FCV1236DMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> TUNER_PHILIPS_ATSC is an ambiguous name for a tuner. Rename it to TUNER_PHILIPS_FCV1236D to be more descriptive. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-02-24pvrusb2: set default video standard to NTSC for OnAir HDTV / CreatorMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> The pvrusb2 driver normally picks up the default video standard from the eeprom on Hauppauge devices, but the OnAir HDTV and OnAir Creator are not Hauppauge devices, and do not store this information in any eeprom. These devices support NTSC/ATSC, so we should use NTSC by default when in analog mode. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-03-02pvrusb2: Fix storage-class as per C99 specMike Isely
From: Tobias Klauser <tklauser@distanz.ch> The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2: Rework context handling and initializationMike Isely
From: Mike Isely <isely@pobox.com> This change significantly rearranges pvr2_context level initialization and operation: 1. A new kernel thread is set up for management of the context. 2. Destruction of the pvr2_context instance is moved into the kernel thread. No other context is able to remove the instance; doing this simplifies lock handling. 3. The callback into pvrusb2-main, which is used to trigger initialization of each interface, is now issued from this kernel thread. Previously it had been indirectly issued out of the work queue thread in pvr2_hdw, which led to deadlock issues if the interface needed to change a control setting (which in turn requires dispatch of another work queue entry). 4. Callbacks into the interfaces (via the pvr2_channel structure) are now issued strictly from this thread. The net result of this is that such callback functions can now also safely operate driver controls without deadlocking the work queue. (At the moment this is not actually a problem, but I'm anticipating issues with this in the future). 5. There is no longer any need for anyone to enter / exit the pvr2_context structure. Implementation of the kernel thread here allows this all to be internal now, simplifying other logic. 6. A very very longstanding issue involving a mutex deadlock between the pvrusb2 driver and v4l should now be solved. The deadlock involved the pvr2_context mutex and a globals-protecting mutex in v4l. During initialization the driver would take the pvr2_context mutex first then the v4l2 interface would register with v4l and implicitly take the v4l mutex. Later when v4l would call back into the driver, the two mutexes could possibly be taken in the opposite order, a situation that can lead to deadlock. In practice this really wasn't an issue unless a v4l app tried to start VERY early after the driver appeared. However it still needed to be solved, and with the use of the kernel thread relieving need for pvr2_context mutex, the problem should be finally solved. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2: Eliminate timer race during tear-downMike Isely
From: Mike Isely <isely@pobox.com> The pvrusb2 tear-down logic was clearing two timers before stopping its internal work queue. That left a tiny window open where the work queue might run after the timers are stopped, possibly starting them again. This could lead to dangling pointers and an oops. Solution: Kill the work queue first, then delete the timers. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2: Close potential race condition during initializationMike Isely
From: Mike Isely <isely@pobox.com> There is a callback that is issued to into pvr2_context from pvr2_hdw after initialization is done. There was a probability that this callback could get missed. Fixed. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2: Remove dead codeMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2: Increase buffer size for printing video standard stringsMike Isely
From: Mike Isely <isely@pobox.com> Buffer size for printing pvrusb2 video standard strings was too small before. This is cosmetic; the printing logic is not able to overrun a too-short buffer. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2: Handle ATSC video standard bitsMike Isely
From: Mike Isely <isely@pobox.com> The pvrusb2 driver dynamically generates an enumeration of support video standard combinations based on which video standard bits are set. ATSC modes don't fall into this since they are by nature not analog. The pvrusb2 driver has been warning about an inability to classify ATSC standards. This change causes the classification algorithm to ignore any ATSC standards (such things are better handled elsewhere anyway). Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2: Add Gotview USB 2.0 DVD Deluxe to supported devicesMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2: Make device attribute structure more compactMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2: Make LED control into a device-specific attributeMike Isely
From: Mike Isely <isely@pobox.com> The pvrusb2 driver has used hardcoded logic to control the LED on the device. However this is really Hauppauge-specific behavior. This change defines a new device attribute for LED control and sets things up appropriately for Hauppauge devices. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-09pvrusb2: Indicate streaming status via LEDMike Isely
From: Mike Isely <isely@pobox.com> Most of this originates from Michael Krufky <mkrufky@linuxtv.org>; these changes move LED control into separate functions. This is the first step in new work to make LED control a device-specific attribute. Signed-off-by: Mike Isely <isely@pobox.com>