Age | Commit message (Collapse) | Author |
|
From: Mike Isely <isely@pobox.com>
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.
Priority: normal
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
The pvrusb2 control mechanism up until now has used a constant int to
hold a control's default value. This change makes it possible to
retrieve the control's default through some other means, e.g. as a
result of a query from lower level software.
Priority: normal
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: vdb128@picaros.org <vdb128@picaros.org>
Implement pvrusb2 driver plumbing to support cropping. Submitted by a
pvrusb2 user.
Priority: normal
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Phase 4 removes the compatibility support for kernels < 2.6.16.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Mike Isely <isely@pobox.com>
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
From: Mike Isely <isely@pobox.com>
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
pvrusb2: Eliminate use of volatile in pipeline control state
variables. These were all cases of paranoia; upon further review the
overall mechanism employed here should not require use of volatile.
This had originally been done out of paranoia, and I have since been
convinced that the paranoia is not required.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
pvrusb2: Remove use of volatile for command sequencer; these variables
are set by interrupt-context code and we check their state in such a
manner that there should be no race conditions. This had originally
been done out of paranoia, and I have since been convinced that the
paranoia is not required.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Device-specific driver behavior is now defined by generic device
characteristics rather than by specific device model information.
With this change, the hardware type field can go away, thus this
change.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
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>
|
|
From: Mike Isely <isely@pobox.com>
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>
|
|
From: Mike Isely <isely@pobox.com>
This is a minor change to help with tracking the viability of the
encoder chip within the PVR USB2 device.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
The pvrusb2 driver already has a method for extracting the FX2's
program memory back out to a user application; this ability is used to
facilitate manual firmware extraction as per the procedure documented
on the pvrusb2 web site. This change follows that pattern and
implements a corresponding method to grab the binary contents of the
PVR USB2 prom (which for PVR USB2 devices can contain information in
addition to the usual Hauppauge metadata).
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
The V4L2 API requires a unique bus_info string returned as part of the
v4l2_capability structure. These changes gather up the USB address
information, from the underlying device, into a string and report that
out through v4l2 and via sysfs (for completeness).
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Trent Piepho <xyzzy@speakeasy.org>
Add -include linux/version.h to the cflags. Now code can have backward
compatibility test without including compat.h first.
Linux headers included from compat.h are removed, so that code will get
the same headers when compiling in v4l-dvb as it does in the kernel.
Many drivers have compat.h moved to the end of their include list, as
this lets compat.h do things it can't do at the beginning. Such as test
of something is defined to include compat code, or to put a wrapper
around a function without changing the function's name.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
|
|
From: Mike Isely <isely@pobox.com>
The automodeswitch control was a feature that enable automatic radio /
tv switching based on the selected frequency. However since frequency
ranges can overlap and also since apparently in some cases it's
possible for the same frequency range to be both tv and radio in a
specific region, then this feature can't safely work. So it's removed.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
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>
|
|
From: Mike Isely <isely@pobox.com>
Separate track radio versus tv frequency so that when we switch modes
we can also switch to a sane frequency appropriate for the mode. Also
implement logic to automate mode switching in certain cases.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Implement new method for doing integer range checking, so that we can
more intelligently range-check radio and tv ranges at once.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Use separate enum for get/store of minor number; we want pvr2_config
to go away eventually and since it really means something different,
don't use it here
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Pantelis Koukousoulas <pakt223@freemail.gr>
This is the first patch in preparation of the V4L2/IVTV radio interface.
It does away with the assumption of only one minor per device. It also
adds a file to show the radio minor as well. This can be useful for a
program like pvr-radio.c (when it grows up), since this way it can search
for the minor of the /dev/radioX device it opened and use the video minor
of the same driver instance to get to the actual stream.
The implementation looks kinda ugly. Feel free to improve (that is the
reason behind separate patches anyway).
--Pantelis
Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr>
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
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>
|
|
From: Mike Isely <isely@pobox.com>
The internal control implementation in the pvrusb2 driver normally
encodes integer range limits using literal values in a const
structure. This change adds two function pointers, which if not null
will be called through in order to determine integer min / max
values.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Fix a few miscellaneous issues in the pvrusb2 driver related to use of
the new mpeg controls. This also should fix problems involving
update of the saa7115 / cx25840 configuration as control changes are made.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Since kernel include autoconf.h via command line, those config.h inclusion
can be removed.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
|
|
From: Adrian Bunk <bunk@stusta.de>
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>
|
|
From: Mike Isely <isely@pobox.com>
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Michael Krufky <mkrufky@linuxtv.org>
Added necessary header file in order for kconfig build options to be
considered at compile time. Without this patch all options will always
be disabled, regardless of whether they are selected or not.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Insert an I2C transaction filter for the cx25843 chip on new model
24xxx hardware. This filter attempts to stabilize the part by
limiting how the part can be accessed. The filter won't allow anyone
to touch the chip until an attempt is made to specifically read the
chip's revision registers. If that read fails (which can happen if
the chip wedges itself), a warning is logged and the driver is
rendered useless. If the read succeeds, then the filter deletes
itself and normal access to the part takes place. This filter should
keep msp3400 away from the chip (a failure scenario which otherwise
frequently ends badly for the kernel, due to suspected misbehaviors
within the msp3400 module).
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Implement a rudimentary filter mechanism in the I2C adapter within the
pvrusb2 driver. It is possible now to interpose a filtering function
on a per-target basis. This function can intercept the requested
transaction and perform various manipulations on behalf of the
client. With this mechanism is also a filter inserted for wm8775 that
causes all probe attempts to the chip to always succeed (just return
success on probe attempts without touching the hardware). This neatly
solves the problem in the PVR USB2 hardware where we can't seem able
to probe the chip at all.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
The correct mutex header to grab is linux/mutex.h, and while
asm/mutex.h seems to work for x86 architecture, it has been reported
not to work for amd64 architecture. So let's just do this right.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Clean up logic for handling video standards in the pvrusb2 driver.
New implementation should be able to handle all possible V4L defined
video standards now, and it should be far easier to maintain this
going forward.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Rework controls internal architecture. Rework video standard
handling. This is a major change.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Since there are lingering stability problems with support of the newer
PVR USB2 model 24xxx series hardware, I have isolate those changes
with a config option. This commit leaves that option off.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Rework entire internal controls interface to eliminate the need for
visibly defined control IDs which must otherwise be translated by the
V4L2 public interface. As part of this work, internal structures
which mimiced various V4L2 structures (video standards, audio modes)
have been reworked to actually use the native structures. This
triggered a _significant_ rework for how video standards are dealt
with (and what is in place now should be much more flexible and
forgiving for various handling less-common video standards).
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Eliminate the need to track the number pvrusb2 CIDs at compile time
from within the pvrusb2 driver. This is part of a control structure
cleanup.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
This change threads logic through the pvrusb2 to make it possible to
command the decoder chip to reset itself. The method is
decoder-agnostic; the part of the pvrusb2 which control's that chip's
module has to provide the final hook. This just lays the foundation.
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Mike Isely <isely@pobox.com>
Notice and track actual hardware type of device. This information is
also used now to select the correct FX2 firmware file to load (because
they can be different, unfortunately).
Signed-off-by: Mike Isely <isely@pobox.com>
|
|
From: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
|