summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2
AgeCommit message (Collapse)Author
2008-04-30Use the same name convention for all tuners under common/tunersMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Auto generated by this script: for i in `find drivers/media/ -name Kconfig`; do cat $i |\ sed s,DVB_CORE_ATTACH,MEDIA_ATTACH,g |\ sed s,VIDEO_TUNER,MEDIA_TUNER,g |\ sed s,TUNER_SIMPLE,MEDIA_TUNER_SIMPLE,g |\ sed s,TUNER_TDA8290,MEDIA_TUNER_TDA8290,g |\ sed s,DVB_TDA827X,MEDIA_TUNER_TDA827X,g |\ sed s,DVB_TDA18271,MEDIA_TUNER_TDA18271,g |\ sed s,TUNER_TDA9887,MEDIA_TUNER_TDA9887,g |\ sed s,TUNER_TEA5761,MEDIA_TUNER_TEA5761,g |\ sed s,TUNER_TEA5767,MEDIA_TUNER_TEA5767,g |\ sed s,TUNER_MT20XX,MEDIA_TUNER_MT20XX,g |\ sed s,DVB_TUNER_MT2060,MEDIA_TUNER_MT2060,g |\ sed s,DVB_TUNER_MT2266,MEDIA_TUNER_MT2266,g |\ sed s,DVB_TUNER_MT2131,MEDIA_TUNER_MT2131,g |\ sed s,DVB_TUNER_QT1010,MEDIA_TUNER_QT1010,g |\ sed s,TUNER_XC2028,MEDIA_TUNER_XC2028,g |\ sed s,DVB_TUNER_XC5000,MEDIA_TUNER_XC5000,g >/tmp/temp_mv$$ mv /tmp/temp_mv$$ $i done for i in `find drivers/media/ -type f`; do cat $i |\ sed s,CONFIG_DVB_CORE_ATTACH,CONFIG_MEDIA_ATTACH,g |\ sed s,CONFIG_VIDEO_TUNER,CONFIG_MEDIA_TUNER,g |\ sed s,CONFIG_TUNER_SIMPLE,CONFIG_MEDIA_TUNER_SIMPLE,g |\ sed s,CONFIG_TUNER_TDA8290,CONFIG_MEDIA_TUNER_TDA8290,g |\ sed s,CONFIG_DVB_TDA827X,CONFIG_MEDIA_TUNER_TDA827X,g |\ sed s,CONFIG_DVB_TDA18271,CONFIG_MEDIA_TUNER_TDA18271,g |\ sed s,CONFIG_TUNER_TDA9887,CONFIG_MEDIA_TUNER_TDA9887,g |\ sed s,CONFIG_TUNER_TEA5761,CONFIG_MEDIA_TUNER_TEA5761,g |\ sed s,CONFIG_TUNER_TEA5767,CONFIG_MEDIA_TUNER_TEA5767,g |\ sed s,CONFIG_TUNER_MT20XX,CONFIG_MEDIA_TUNER_MT20XX,g |\ sed s,CONFIG_DVB_TUNER_MT2060,CONFIG_MEDIA_TUNER_MT2060,g |\ sed s,CONFIG_DVB_TUNER_MT2266,CONFIG_MEDIA_TUNER_MT2266,g |\ sed s,CONFIG_DVB_TUNER_MT2131,CONFIG_MEDIA_TUNER_MT2131,g |\ sed s,CONFIG_DVB_TUNER_QT1010,CONFIG_MEDIA_TUNER_QT1010,g |\ sed s,CONFIG_TUNER_XC2028,CONFIG_MEDIA_TUNER_XC2028,g |\ sed s,CONFIG_DVB_TUNER_XC5000,CONFIG_MEDIA_TUNER_XC5000,g >/tmp/temp_mv$$ mv /tmp/temp_mv$$ $i done Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-27pvrusb2: Driver is no longer experimentalMike Isely
From: Mike Isely <isely@pobox.com> This driver has been in-kernel and reasonably stable for well over a year. It is in a stable form and is known to work well. Remove its experimental status. Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-27pvrusb2-dvb: include dvb support by default and update Kconfig help textMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-27pvrusb2: always enable support for OnAir Creator / HDTV USB2Michael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> This was a build option in the past, to avoid conflicts with the cxusb module for digital televsion support. Now that dtv mode support has been merged into pvrusb2, the OnAir devices are fully supported by this single module. This no longer should be a build option. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-26pvrusb2-dvb: quiet down noise in kernel log for feed debugMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Get rid of the noise in dmesg during dvb feed changes, unless the appropriate debug trace flag is enabled. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Reviewed-by: Mike Isely <isely@pobox.com>
2008-04-26those kernel-sync didn't merged. Apply manuallyMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-26backport commit d3135846f6c1858dbad6ccb780a42e6c98953e6dMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Author: Matthew Wilcox <matthew@wil.cx> drivers: Remove unnecessary inclusions of asm/semaphore.h None of these files use any of the functionality promised by asm/semaphore.h. It's possible that they rely on it dragging in some unrelated header file, but I can't build all these files, so we'll have fix any build failures as they come up. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-26From: Mauro Carvalho Chehab <mchehab@infradead.org>Mauro Carvalho Chehab
Move tuners to common/tuners There were several issues in the past, caused by the hybrid tuner design, since now, the same tuner can be used by drivers/media/dvb and drivers/media/video. This patch moves those common tuners into a common dir. It also moves saa7146 driver into drivers/media/video, where other hybrid drivers are placed. Kconfig items were rearranged, to split V4L/DVB core from their drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-25merge: http://linuxtv.org/hg/~mcisely/pvrusb2Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-25pvrusb2-dvb: add atsc/qam support for Hauppauge pvrusb2 model 751xxMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-04-24pvrusb2: make signed one-bit bitfields unsignedMike Isely
From: Harvey Harrison <harvey.harrison@gmail.com> Single-bit signed bitfields can only take 0/-1 rather than 0/1 as the drivers seems to assume...add unsigned. Noticed by sparse: drivers/media/video/pvrusb2/pvrusb2-devattr.h:107:34: error: dubious one-bit signed bitfield drivers/media/video/pvrusb2/pvrusb2-devattr.h:114:37: error: dubious one-bit signed bitfield drivers/media/video/pvrusb2/pvrusb2-devattr.h:117:30: error: dubious one-bit signed bitfield drivers/media/video/pvrusb2/pvrusb2-devattr.h:120:23: error: dubious one-bit signed bitfield drivers/media/video/pvrusb2/pvrusb2-devattr.h:124:24: error: dubious one-bit signed bitfield drivers/media/video/pvrusb2/pvrusb2-devattr.h:128:23: error: dubious one-bit signed bitfield drivers/media/video/pvrusb2/pvrusb2-devattr.h:138:36: error: dubious one-bit signed bitfield drivers/media/video/pvrusb2/pvrusb2-devattr.h:143:24: error: dubious one-bit signed bitfield drivers/media/video/pvrusb2/pvrusb2-devattr.h:144:28: error: dubious one-bit signed bitfield drivers/media/video/pvrusb2/pvrusb2-devattr.h:145:26: error: dubious one-bit signed bitfield drivers/media/video/pvrusb2/pvrusb2-devattr.h:146:23: error: dubious one-bit signed bitfield Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-20pvrusb2: Clean up input selection list generation in V4L interfaceMike Isely
From: Mike Isely <isely@pobox.com> Change how list of possible pvrusb2 inputs is generated to include only those interfaces that make sense for the interface instance. Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-20pvrusb2: Implement FM radio support for Gotview USB2.0 DVD 2Mike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-20pvrusb2: Restructure cx23416 firmware loading to have a common exit pointMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-20pvrusb2: Fix bad error code on cx23416 firmware load failureMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-20pvrusb2: Implement input selection enforcementMike Isely
From: Mike Isely <isely@pobox.com> In the pvrusb2 driver, different interfaces (e.g. V4L, DVB) have different abilities to handle various inputs. While the driver core can handle them all, the interfaces currently are not able to do this. Also, due to the fact that the DVB interface is directly touching the hardware, this limits what the V4L side can possibly do with digital reception, i.e. it has no means to control the digital tuner. This change implements a critical new feature in the driver where the interface instance can declare which inputs it is able to handle. The driver core then uses this information to narrow the list of legal input selections based on which interface(s) are active at the moment. The driver core will also perform an input switch (and consequently a mode switch) if the new narrowed list doesn't include the current mode. The overall effect of all of this is that now when a user opens the DVB interface, then the driver flips to dtv mode and likewise when the V4L video device is opened, the driver will disallow dtv selection. This also cleans up the handling of the V4L radio device - open that device and the driver will narrow to just the radio input. If the narrowing request results in the null set, e.g. attempting to narrow to dtv only while streaming analog, then the operation is disallowed and the caller gets an error. This has the effect of locking out mutually incompatible interfaces. For example, an attempt to operate a V4L interface will definitively fail when DVB is active. Thus we have locking and enforcement between the DVB and V4L sides. Hopefully at some point in the future we can expand the supported inputs in each interface, and at that point, the interface can just declare an expanded set of handled inputs and everything should continue to work itself out. This is a significant feature; it finally enables cooperative handling of pvrusb2-driven devices between DVB and V4L. Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-19pvrusb2-dvb: update Kbuild selectionsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> These changes are required with the addition of digital television support for the Hauppauge HVR1900 & HVR1950, the OnAir Creator and Sasem USB HDTV Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-04-19pvrusb2-dvb: add DVB-T support for Hauppauge pvrusb2 model 73xxxMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-04-18pvrusb2: clean up global functionsMike Isely
From: Adrian Bunk <bunk@kernel.org> This patch contains the following cleanups: - make the following needlessly global function static: - pvr2_hdw_set_cur_freq() - #if 0 the following unused global functions: - pvr2_hdw_get_state_name() - pvr2_hdw_get_debug_info_unlocked() - pvr2_hdw_get_debug_info_locked() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-09pvrusb2: Clean out all use of __FUNCTION__Mike Isely
From: Mike Isely <isely@pobox.com> Apparently the kernel developers no longer consider it proper etiquette to use __FUNCTION__; everyone must instead use __func__ (even though it breaks with older compilers). And worse still, actual effort is being expended to sweep this change throughout the kernel source tree. Don't these people have better things to do? So... Completely clean out all use of __FUNCTION__ from the pvrusb2 driver (it was just in the sysfs interface). I'm not going to use __func__ either. So there. Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-09pvrusb2: Fix hang on module removalMike Isely
From: Mike Isely <isely@pobox.com> The pvrusb2 driver was getting had by this scenario: 1. Task A calls kthread_stop() for task B. 2. Before exiting, then Task B calls kthread_stop() for task C. The problem is, kthread_stop() wants to allocate an internal resource to itself (i.e. acquire a lock), which won't be released until kthread_stop() returns. But kthread_stop() won't return until task B is dead. But task B won't die until it finishes its call to kthread_stop() for task C, and that will block waiting on the resource already allocated inside task A. Deadlock. With the pvrusb2 driver, task A is the caller to pvr_exit(), task B is the control thread run inside of pvrusb2-context.c, and task C is any worker thread run inside of pvrusb2-hdw.c. This problem got introduced by the previous threading setup change, which was itself an attempt to fix a module tear-down race (which it actually did fix). The lesson here is that a task being waited on as part of a kthread_stop() simply cannot be allow to also issue a kthread_stop() - or we make sure not to issue the enclosing kthread_stop() until we know that the inner kthread_stop() has completed first. The solution for the pvrusb2 driver is some hackish code which changes the main control thread tear down into a two step process. This then makes it possible to delay issuing the kthread_stop() on the control thread until after we know that everything has been torn down first. (And yes, we really need that kthread_stop() because it's the only way to safely guarantee that a module-referencing kernel thread has safely returned back out of the module before we finally remove the module.) Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-06pvrusb2: Implement cleaner DVB kernel thread shutdownMike Isely
From: Mike Isely <isely@pobox.com> Earlier fix to handle DVB feed thread aborts was overly-aggressive. We can take better advantage of what kthread_stop() can do. This change simplifies things. Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-06pvrusb2: Close connect/disconnect raceMike Isely
From: Mike Isely <isely@pobox.com> If a disconnect happens before initialization is completed, the pvrusb2 driver can accidentally touch dangling pointers. The whole initialization function must be protected by the big_lock, and once inside that lock, the initialization function should abort if it is discovered that a disconnect has already taken place. Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-06pvrusb2: Fix race on module unloadMike Isely
From: Mike Isely <isely@pobox.com> The pvrusb2 driver - for basically forever - was not enforcing a proper module tear-down. Kernel threads are used inside the driver and all must be gone before the module can be safely removed. This changeset reimplements a chunk of pvrusb2-context.c to enforce this correctly. Unfortunately this is not a simple fix. The new implementation also cuts back on kernel thread usage; instead of there being 1 control thread per instance now it's just 1 control thread shared by all instances. (By dropping to a single thread then the module exit function can block on its shutdown and the thread itself can monitor and cleanly shut down all of the other instances first.) Signed-off-by: Mike Isely <isely@pobox.com>
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>