summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2
AgeCommit message (Collapse)Author
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>
2008-02-06pvrusb2: Allow digital streaming without encoder firmwareMike Isely
From: Mike Isely <isely@pobox.com> The encoder is not a part of the pipeline when in digital mode, so streaming is OK in this case even when the encoder's firmware is not loaded. Modify the driver core handling of this scenario to permit streaming. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: trace print cosmetic cleanup / improvementsMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: Enhance core logic to also control digital streamingMike Isely
From: Mike Isely <isely@pobox.com> This is a major pvrusb2 change. The driver core has an algorithm that is used to cleanly sequence the changes needed to enable / disable video streaming. The algorithm had originally been written for analog streaming, but when in digital mode the pipeline is considerably different - for example the mpeg encoder is not used. These changes to the core logic implement correct pipeline control when in digital mode. Knowing which pipeline to handle and how to handle it is completely driven by the current input selection. So, in theory, to perform digital stream now all one has to do is switch input to dtv and start streaming as usual. Well, in theory. The reality is that digital tuner and demod control are still not in the driver core yet so until that is present there's nothing to actually stream. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: Define digital control scheme device attributesMike Isely
From: Mike Isely <isely@pobox.com> Unlike analog control, control of the digital side is not nearly as uniform among different devices. So we have to specify the correct digital control scheme as a new device attribute. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: New functions for additional FX2 digital-related commandsMike Isely
From: Mike Isely <isely@pobox.com> This code is actually part of a larger set from Mike Krufky <mkrufky@linuxtv.org>, to support ATSC streaming from within the pvrusb2 driver. More to come... Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: Fix oops possible when claiming a NULL streamMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: whitespace fixupMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: add function pvr2_hdw_cmd_powerdownMike Isely
From: Michael Krufky <mkrufky@linuxtv.org> Call pvr2_hdw_cmd_powerdown to power down the device Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: Ensure that default input selection is actually validMike Isely
From: Mike Isely <isely@pobox.com> Previously the pvrusb2 driver just started with the default input to be "television". But if the device doesn't support an analog tuner then this default must be different. New logic here selects a reasonable default based on the actual valid set of available inputs. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: Improve control validation for enumerationsMike Isely
From: Mike Isely <isely@pobox.com> When an enumeration control is changed, the pvrusb2 driver assumed that the enumeration values were continuous. That is no longer true; this change allows for properly input validation even when not all enumeration values are legal (which can happen with input selection based on what the hardware supports). Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: Implement addition sysfs tracingMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: v4l2 implementation fixes for input selectionMike Isely
From: Mike Isely <isely@pobox.com> Now that the pvrusb2 driver can dynamically choose which inputs to make available depending on the hardware, the enumeration of input choices is no longer a contiguous range of integers. Unfortunately this causes a problem in the v4l2 implementation since the input enumeration requires continuity in the API. This change implements a mapping in order to preserve the v4l2 interface requirement. Signed-off-by: Mike Isely <isely@pobox.com>
2008-02-03pvrusb2: Improve logic which handles input choice availabilityMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>