Hans Verkuil [Sat, 8 Mar 2014 11:25:35 +0000 (12:25 +0100)]
v4l2-ctl/compliance: use the correct mmap/munmap functions.
If the libv4l2 wrapper library is used, then use v4l2_munmap instead of munmap.
For DMABUF file descriptors always use mmap/munmap since these buffers are not
known to libv4l2.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Sat, 8 Mar 2014 11:25:13 +0000 (12:25 +0100)]
v4l2-compliance: support menu controls with more than 32 items
v4l2-compliance would fail if it encounters menu controls with more
than 32 items. This patch improves that behavior by allowing any
number of items, although only up to 64 will be tested.
This is because v4l2-compliance uses a bitmask for the valid menu
items which is now 64 bits.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Fri, 7 Mar 2014 09:54:32 +0000 (10:54 +0100)]
qv4l2: use QDoubleSpinBox for frequency inputs
This gives finer frequency control and looks better as well.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Thu, 6 Mar 2014 21:17:06 +0000 (22:17 +0100)]
qv4l2: add SDR support.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Thu, 6 Mar 2014 20:14:52 +0000 (21:14 +0100)]
v4l2-compliance: add 1HZ support when setting the frequency.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Mauro Carvalho Chehab [Thu, 6 Mar 2014 12:31:27 +0000 (09:31 -0300)]
libdvbv5: reimplement the logic that gets a full section
The logic that gets a full section is broken: it expects to
receive the sections in order, and not to receive the same
section segment twice.
Reimplement it.
As a side effect, it no longer needs to wait for a section
repeat, with speeds up the code.
On my tests with an ATSC signal, before this patch, scanning
to a single frequency was spending 1.850 secs. After the
patch, dvbv5-scan is now spending 1.432 secs.
That means a 418 ms save per frequency.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Thu, 6 Mar 2014 13:21:22 +0000 (10:21 -0300)]
libdvbv5: better document some MPEG TS fields
Unfortunately, some names on this table don't reflect the names at the
MPEG specs. Yet, we want to be clear what they mean, so let's improve
the comments at the header.h and add a better description when debug
is enabled.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Tue, 18 Feb 2014 12:48:41 +0000 (21:48 +0900)]
Revert "dvb-scan: don't handle NIT table by default on ATSC"
This changeset is actually wrong, as it would prevent to get
the frequenct descriptors from NIT table. So, better to revert
it.
This reverts commit
d91894aa2207ac0863bb4afc4594020280ddfa3b.
Hans Verkuil [Wed, 5 Mar 2014 22:42:01 +0000 (23:42 +0100)]
v4l2-compliance: add SDR compliance tests.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Wed, 5 Mar 2014 21:44:15 +0000 (22:44 +0100)]
v4l2-ctl: support SDR capture streaming.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Wed, 5 Mar 2014 21:45:17 +0000 (22:45 +0100)]
v4l2-ctl: add missing v4l2-ctl-sdr.cpp file.
Oops! Forgot to do a git add...
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Wed, 5 Mar 2014 21:15:39 +0000 (22:15 +0100)]
v4l2-compliance: add timestamp source tests.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Wed, 5 Mar 2014 20:41:02 +0000 (21:41 +0100)]
v4l2-ctl: add timestamp source support.
Show the timestamp source when receiving a buffer.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Wed, 5 Mar 2014 20:36:05 +0000 (21:36 +0100)]
v4l2-ctl: implement list SDR buffers command
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Wed, 5 Mar 2014 20:35:26 +0000 (21:35 +0100)]
v4l2-ctl: add support for SDR FMT
Add support for FMT IOCTL operations used for SDR receivers.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Antti Palosaari [Sun, 9 Feb 2014 06:05:52 +0000 (08:05 +0200)]
v4l2-ctl: add tuner support for SDR tuners
Add initial SDR support for tuner related operations.
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Wed, 5 Mar 2014 20:31:04 +0000 (21:31 +0100)]
v4l-utils: sync with latest kernel headers.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Mon, 3 Mar 2014 14:02:35 +0000 (15:02 +0100)]
qv4l2: fix incorrect handling of fields
I assumed that the format height stays the same when the field value
changes to TOP/BOTTOM/ALTERNATE, but it turns out that the height will
match that of the field height.
So update qv4l2 to match what drivers actually do.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Mon, 3 Mar 2014 09:44:57 +0000 (10:44 +0100)]
qv4l2: fix incorrect call to s_fmt when disabling width/height
When the frame width and height fields are disabled because we start
streaming, the editingFinished event is triggered as well, which
causes an attempt to change the format. This causes EBUSY warnings
because it really isn't allowed to do that anymore. Check if the
field is really enabled before we change the format, thus squashing
the warnings.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Gregor Jasny [Fri, 28 Feb 2014 17:20:03 +0000 (18:20 +0100)]
libv4lconvert: Add ASUS A7M to upside down table
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Hans Verkuil [Fri, 28 Feb 2014 17:15:26 +0000 (18:15 +0100)]
v4l2-compliance: more nasty evil stream I/O checks
After queuing buffers, then calling STREAMOFF without having called STREAMON
we should be able to queue those buffers again.
After queuing buffers, then calling REQBUFS without having called STREAMON
all the old buffers should be freed correctly: good check for making sure all
the vb2 ops stay balanced.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Fri, 28 Feb 2014 16:37:41 +0000 (17:37 +0100)]
v4l2-compliance: add tests for queuing operations with invalid indices.
Check what happens when queuing/preparing an already queued/prepared buffer,
or if the buffer index is out of range.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Fri, 28 Feb 2014 13:35:04 +0000 (14:35 +0100)]
qv4l2: disable what shouldn't be touched while streaming.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Fri, 28 Feb 2014 11:50:51 +0000 (12:50 +0100)]
qv4l2: fix frequency handling
Several bugs: the frequency validation wasn't done correctly allowing
out-of-range frequencies to be set, and the frequencies tables were
never shown due to a wrong condition.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Fri, 28 Feb 2014 09:54:34 +0000 (10:54 +0100)]
qv4l2: QUERYSTD returns STD_UNKNOWN if there is no standard
Replace STD_ALL by STD_UNKNOWN in the qv4l2 checked for whether there is a
signal or not.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Thu, 27 Feb 2014 07:54:21 +0000 (08:54 +0100)]
qv4l2: initialize comboboxes with sensible initial sizes.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Thu, 27 Feb 2014 07:29:51 +0000 (08:29 +0100)]
v4l2-compliance: improve format matching code.
Do a precise match based on the format type and print the values for
v4l2_pix_format if they are different.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Thu, 27 Feb 2014 07:28:57 +0000 (08:28 +0100)]
v4l2-compliance: check for presence of a tuner/modulator
If an input needs a tuner or an output needs a modulator, then test
that at least one tuner or modulator was found.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Wed, 26 Feb 2014 19:41:57 +0000 (20:41 +0100)]
qv4l2: add check if the shader function is available.
Skip formats that need a shader if there isn't any. Particularly useful
when running qv4l2 over ssh.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Fri, 28 Feb 2014 13:41:15 +0000 (14:41 +0100)]
qv4l2: support top/bottom/alternate field settings.
Compensate for the half-height by changing the pixel aspect ratio. This
ensures that they are still shown at the right picture aspect ratio.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Tue, 25 Feb 2014 22:20:48 +0000 (23:20 +0100)]
qv4l2: two field related fixes
Update the field combobox when changing inputs.
Don't clear the field combobox unless at least one valid field could
be found. This to prevent the combobox from clearing when trying to
change it while streaming is in progress.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Mauro Carvalho Chehab [Wed, 26 Feb 2014 18:07:47 +0000 (15:07 -0300)]
Add a parser for drxj
This is actually the same parser as the drxk one, except that
it is using the DRX-J map table.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Wed, 26 Feb 2014 12:17:15 +0000 (13:17 +0100)]
v4l-utils: ran sync-with-kernel which added the fb.h header.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Wed, 26 Feb 2014 12:14:03 +0000 (13:14 +0100)]
sync-with-kernel should also copy fb.h
The v4l2-ctl utility uses it for some of the overlay operations, and
we have to make sure we use the latest fb.h kernel so it will compile
correctly on older kernels.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Tue, 25 Feb 2014 19:13:12 +0000 (20:13 +0100)]
qv4l2: ignore buffers with flag V4L2_BUF_FLAG_ERROR.
Such buffers should just be requeued.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Tue, 25 Feb 2014 19:09:48 +0000 (20:09 +0100)]
v4l2-ctl: skip captured buffers with flag V4L2_BUF_FLAG_ERROR
These buffers contain invalid data, so just QBUF them again.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Tue, 25 Feb 2014 08:47:15 +0000 (09:47 +0100)]
v4l2-compliance: add tests for output buffer error checking
Add tests to check that wrong data_offset and bytesused values will
return errors.
And if bytesused == 0, then it should be replaced by the buffer length.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Tue, 25 Feb 2014 07:48:32 +0000 (08:48 +0100)]
v4l2-compliance: improve clip checking
Fix and improve the clip checking code for video overlays.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Sun, 23 Feb 2014 09:58:27 +0000 (10:58 +0100)]
v4l2-compliance: bypass libv4l2 for expbuf handling.
You don't want to go through libv4l2 for calling VIDIOC_EXPBUF, just use the
low-level ioctl call for this.
Also add a missing close() for the expbuf node.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Sun, 23 Feb 2014 13:47:53 +0000 (14:47 +0100)]
v4l2-compliance: lower default framecount to 60.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Sun, 23 Feb 2014 11:55:41 +0000 (12:55 +0100)]
v4l2-compliance: change one warn to info.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Sun, 23 Feb 2014 09:49:52 +0000 (10:49 +0100)]
v4l2-compliance: reopen node after each streaming test.
This should clear any bad state left by the previous test.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Sun, 23 Feb 2014 09:39:12 +0000 (10:39 +0100)]
v4l2-compliance: fix check for correct return code for STREAMON.
STREAMON when no buffers have been created should return EINVAL.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Mon, 24 Feb 2014 15:27:51 +0000 (16:27 +0100)]
v4l2-compliance: fill output buffers.
In order to test whether memory-to-memory devices that copy buffer data
from the incoming stream to the outcoming stream really do that right
we fill in the output buffer fields and check if when they arrive they
still have the same information.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Mon, 24 Feb 2014 15:21:17 +0000 (16:21 +0100)]
v4l2-compliance: add M2M streaming support
Add test support for memory-to-memory devices. This assumes fairly simple
setups where there is a 1-to-1 mapping between buffers sent to the device
and the buffers you get back.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Mon, 24 Feb 2014 15:08:44 +0000 (16:08 +0100)]
v4l2-ctl: improve the overlay support
It is now possible to specify clip lists and a bitmap.
With the --find-fb option it can find which fb device is associated with
the overlay.
And --set-fbuf can specify which fb device to open to fill in the framebuffer
information.
Dropped the old output overlay options: each video node can only be a video
overlay or an output video overlay, not both at the same time. So there is
no need to support both options.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Mon, 24 Feb 2014 15:07:27 +0000 (16:07 +0100)]
v4l2-ctl: the colorspace can now be set for outputs.
The colorspace field can now be specified for output formats.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Mon, 24 Feb 2014 14:57:42 +0000 (15:57 +0100)]
v4l2-ctl: add streaming between two video devices using dmabuf
Implement support to streaming from one device to another, either using
mmap -> dmabuf, dmabuf -> mmap or userptr -> userptr. In all three
cases there is no need to copy from one buffer to another.
Eventually all combinations should be possible, but that requires more
work (a copy function) and the code could use some serious refactoring
before doing that.
The basic idea is to specify the video output device using --out-device.
And if you want one of the two sides to use dmabuf for streaming, then
specify --stream(-out)-dmabuf:
v4l2-ctl -d /dev/video0 -e /dev/video1 --stream-mmap=3 --stream-out-dmabuf
It will try to export the dmabuf file descriptors for 3 (the number given
to --stream-mmap) buffers and use those for the output stream buffers.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Mon, 24 Feb 2014 14:53:49 +0000 (15:53 +0100)]
v4l2-ctl: set timestamp for output buffers.
When streaming to a VIDEO_OUTPUT device, and if the timestamp mask of the
buffer is V4L2_BUF_FLAG_TIMESTAMP_COPY, then we need to set a timestamp.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Sat, 22 Feb 2014 10:13:01 +0000 (11:13 +0100)]
v4l-utils: fix optional args for short opts
I always wondered why I couldn't do e.g. -s10 where 10 is the optional
argument for the short option -s. It worked fine with --streaming=10.
It turns out that in the optstring passed to getopt_long you have to
specify such an option as 's::' and I didn't so that.
This is now fixed.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Sat, 22 Feb 2014 10:12:15 +0000 (11:12 +0100)]
v4l2-compliance: add new mmap tests.
Check that mmap on a v4l2 node will fail for USERPTR and DMABUF
memory modes.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Sat, 22 Feb 2014 09:46:32 +0000 (10:46 +0100)]
v4l2-ctl: is_mplane was never set.
Since is_mplane was always false using the streaming options with multiplanar
formats always failed. Fixed.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Fri, 21 Feb 2014 14:10:20 +0000 (15:10 +0100)]
v4l2-compliance: now support all formats in the streaming tests.
Tested with video output (single planar), VBI capture and video
capture (both single and multi planar).
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Fri, 21 Feb 2014 13:59:02 +0000 (14:59 +0100)]
v4l2-compliance: obtain expbuf caps and fix radio/vbi bug
Get the capabilities of the expbuf device for later use.
Fix a bug in the assignment of the second node for radio and vbi devices:
the video node was used instead which is not what was intended.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Fri, 21 Feb 2014 11:32:27 +0000 (12:32 +0100)]
v4l2-compliance: fix BUF_TYPE vs CAP mixup.
Replace V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE by V4L2_CAP_VIDEO_CAPTURE_MPLANE
in a querycap capabilities test.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Fri, 21 Feb 2014 07:27:29 +0000 (08:27 +0100)]
v4l2-compliance: Update fixme.txt
The 'duplicate packed RGB table' issue has been resolved, so that can
be removed from this list.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Thu, 20 Feb 2014 12:19:40 +0000 (13:19 +0100)]
v4l2-compliance: move functions around.
No other changes, just order the functions in v4l2-test-buffers.cpp
in a more logical way.
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Hans Verkuil [Thu, 20 Feb 2014 12:17:05 +0000 (13:17 +0100)]
v4l2-compliance: move streaming setup code to main source.
The streaming setup code was partially in v4l2-compliance and partially
in testMmap() where it really didn't belong. Move it all to
v4l2-compliance.cpp.
Also skip the streaming tests for mem2mem devices: these are not yet
supported.
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Hans Verkuil [Thu, 20 Feb 2014 17:51:42 +0000 (18:51 +0100)]
v4l2-ctl: fix regression when setting vidcap format
Commit
6568b0bb01dd4eece6339cb07b8eee831c5371d3 broke the -v option. It no
longer updated the format with the new width and height.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Tue, 18 Feb 2014 08:05:37 +0000 (09:05 +0100)]
v4l2-compliance: fix data_offset related tests
While testing the handling of data_offset I found some incorrect checks.
Fixed those. Also removed some duplicate checks.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Mon, 17 Feb 2014 21:43:30 +0000 (22:43 +0100)]
v4l2-compliance: add tests for multiplanar capture.
Note that the multiplanar dmabuf test code and multiplanar expbuf have
not been tested.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Mon, 17 Feb 2014 18:22:30 +0000 (19:22 +0100)]
qv4l2: add combobox to select the field format.
Added support to select the field format in qv4l2 in order to easily test
different field settings.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Mon, 17 Feb 2014 17:32:53 +0000 (18:32 +0100)]
v4l2-compliance: test for invalid dmabuf file descriptors.
Test what happens if PREPARE_BUF or QBUF is given invalid m.fd values.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Mon, 17 Feb 2014 16:00:09 +0000 (17:00 +0100)]
v4l2-compliance: add EXPBUF and DMABUF streaming tests.
At the moment only single planar VIDEO_CAPTURE buffer types are supported.
To test DMABUF streaming you need a /dev/video device that supports
VIDIOC_EXPBUF. In addition, that device needs to be set to a format that
creates large enough buffers to support the device under test.
You can specify which device to use by passing the --expbuf-device option.
Devices that support EXPBUF are generally found in embedded drivers,
however work is in progress to support it in the saa7134 driver and that
is what I have been using to test this.
Hardware using the saa7134 is easy to find, so this is a reasonable
option.
It would be nice if we could also use GPU drivers for this, but someone
with more knowledge than myself needs to help out for that.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Mon, 17 Feb 2014 14:00:41 +0000 (15:00 +0100)]
v4l2-compliance: restore the initial formats after testing S_FMT
The format you end up with after S_FMT has been run through its paces
is the smallest possible format. However, that's not what you want for
the streaming tests. So we restore the initial formats at the end of
the tests.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Mauro Carvalho Chehab [Sun, 16 Feb 2014 09:57:17 +0000 (18:57 +0900)]
dvb-fe: Use a separate call to change LNA settings
Setting the LNA mode may fail, as this is not implemented on
all drivers. So, move this into a separate call, and don't
make it a fatal error.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sun, 16 Feb 2014 09:01:44 +0000 (18:01 +0900)]
dvb: add support for LNA setting at scan and zap
Add a new parameter to allow to explicitly enable or disable LNA
while zapping or scanning.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sun, 16 Feb 2014 08:36:47 +0000 (17:36 +0900)]
dvb-fe: Add support for setting the LNA before tuning
Sometimes, we need to control the Low Noise Amplifier (LNA)
at the antena, in order to get a signal. This is dependent on
the way the tuner is connected to the antena, and if the antena
has support for it.
Add a logic at the code to set it. By default, LNA will be in auto
mode, with is the DVB core's default.
Enabling or disabling it is just a matter of changing parms->lna.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sun, 16 Feb 2014 02:05:36 +0000 (11:05 +0900)]
dvb-scan: don't handle NIT table by default on ATSC
With ATSC, the NIT table data is not useful at scan, as the only
non-automatically-detected parameter is the modulation. Well, the
modulation is mandatory anyway.
So, the scanning tool don't need the NIT table at all.
As NIT table is not always present (it isn't in KR), that makes
the scan procedure faster.
We could eventually disable it for other delivery systems, but
that would require an extra parameter on two functions, and this
would break userspace API. So, let's apply this patch instead.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sat, 15 Feb 2014 18:29:00 +0000 (03:29 +0900)]
dvb: Fix VCT handling
Protocol version is wrong. Fix it.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Fri, 14 Feb 2014 05:17:53 +0000 (14:17 +0900)]
dvb-demux: add code for DVB section filter
Instead of hardcoding its call inside dvb-scan, add a function
to set a section filter at the proper place (dmx-demux.c).
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Fri, 14 Feb 2014 04:39:07 +0000 (13:39 +0900)]
vct: avoid read descriptors past the buffer
On some ATSC streams found in KR, the descriptor_length at the
VCT tables are found to be bigger than the remaining buffer
size.
While this could be due to some other problem, add a logic to
prevent going paste the buffer.
Likely, this patch should also be ported to other places where
dvb_parse_descriptors() is called.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Fri, 14 Feb 2014 04:22:25 +0000 (13:22 +0900)]
descriptors: be sure to not read past the buffer
The loop will read 2 bytes from ptr, to get descriptor type and
length. Be sure that those two bytes are available.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Fri, 14 Feb 2014 02:49:35 +0000 (11:49 +0900)]
dvb-scan: fix a print message
The % is at the wrong place, causing the message to print weird
values.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Sat, 15 Feb 2014 14:24:01 +0000 (15:24 +0100)]
v4l2-compliance: check if USERPTR is actually supported.
Don't fail if this memory mode isn't supported.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Fri, 14 Feb 2014 11:48:39 +0000 (12:48 +0100)]
v4l2-compliance: test streaming with bogus v4l2_buffer values.
Check that invalid inputs do not crash anything.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Wed, 12 Feb 2014 17:38:48 +0000 (18:38 +0100)]
v4l2-ctl: automatically detect single/multiplanar buffer type.
Instead of having both single and multiplanar variants of options it is
easier for everyone to just test for the multiplanar capabilities and, if
set, use multiplanar buffer types.
This was already done for the streaming options and now it is done elsewhere
as well.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Wed, 12 Feb 2014 16:17:23 +0000 (17:17 +0100)]
v4l2-compliance: fix read() test and reopen after read/write
Fixed the test checking for the read() result in case the READWRITE cap
was not set.
Also reopen the file after the read/write tests to clear the 'file I/O'
state of the filehandle. Otherwise VIDIOC_REQBUFS would just return
EBUSY.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Wed, 12 Feb 2014 08:30:05 +0000 (09:30 +0100)]
v4l2-ctl: add support for fields
It is now possible to specify the field to use when setting a format, and
new options --list-fields and --list-fields-out are added to list the available
fields for the current format.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Tue, 11 Feb 2014 08:58:23 +0000 (09:58 +0100)]
v4l2-compliance: fix broken test for V4L2_FRMIVAL_TYPE_CONTINUOUS
Don't test for 'step > (max - min)' for the continuous type. Step should
be ignored in that case.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Tue, 11 Feb 2014 07:36:05 +0000 (08:36 +0100)]
v4l2-compliance: add streaming tests
Add tests for the streaming ioctls. If the -s flag is specified then the
streaming tests are enabled. These assume a valid input/output and/or
frequency. Options to set those are also added.
Currently only single plane video capture is supported. This is however
90% of all drivers, so this should be OK for now while work progresses
on other formats. Also the DMABUF streaming is not tested.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Tue, 11 Feb 2014 07:24:17 +0000 (08:24 +0100)]
v4l2-compliance: add bytesperline sanity check for multiplanar formats.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Tue, 11 Feb 2014 07:23:28 +0000 (08:23 +0100)]
v4l2-ctl: --all should also show multiplanar formats.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Fri, 7 Feb 2014 14:29:09 +0000 (15:29 +0100)]
rds-ctl: add support for dynamic/static PTY
This bit was never printed for some reason.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Fri, 7 Feb 2014 14:28:20 +0000 (15:28 +0100)]
libv4l2rds: rename V4L2_RDS_FLAG_STATIC_PTY to _DYNAMIC_PTY
If the bit is 1, then the PTY is dynamic, not static as the name
suggests.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Fri, 7 Feb 2014 14:32:01 +0000 (15:32 +0100)]
libv4l2rds: update the list of AFs if the number of AFs changes
If the number of alternate frequencies changes, then the internal
list of such frequencies should be cleared.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Hans Verkuil [Thu, 30 Jan 2014 09:39:24 +0000 (10:39 +0100)]
v4l2-ctl: errors during streaming setup were ignored
If an ioctl like VIDIOC_QBUF returned an error during the
setup of the streaming, then that was ignored which caused
the streaming loop to just wait for a buffer to arrive.
Report the error correctly and bail out if an error occurs.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Mauro Carvalho Chehab [Sun, 26 Jan 2014 14:25:01 +0000 (12:25 -0200)]
libdvbv5: better handle ATSC/Annex B
As DVBv3 is confusing with regards to ATSC and ClearQAM (DVB-C
annex B), userpace apps also only differenciate between ATSC and
ClearQAM via modulation.
However, when using DVBv5, may be using the delivery system
in order to enforce one or the other.
In any case, the DVB API should clearly identify between ATSC
and ClearQAM.
So, make the API to better handle it, fixing the delivery
system if needed, when reading or write a file.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sun, 26 Jan 2014 14:24:53 +0000 (12:24 -0200)]
libdvbv5: move store/retrieve functions upper
We'll need to use those functions earlier.
So, move them to the beginning of the file.
No functional changes.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Wed, 22 Jan 2014 03:43:30 +0000 (01:43 -0200)]
Replace my email address with the new one
People won't get any response if sending an email to my old address.
So, remove my old address from the old copyright notices, and add my
new email for bug report purposes.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Andreas Weber [Thu, 16 Jan 2014 17:43:31 +0000 (18:43 +0100)]
v4l2gl/v4l2grab: fix errno assignment in while loop
Signed-off-by: Andreas Weber <andy.weber.aw@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Andreas Weber [Thu, 16 Jan 2014 17:27:14 +0000 (18:27 +0100)]
v4l2-ctl-misc.cpp: bugfix display #of readbuffers
Signed-off-by: Andreas Weber <andy.weber.aw@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
André Roth [Wed, 8 Jan 2014 22:12:47 +0000 (19:12 -0300)]
libdvbv5: service location descriptor support
- implement the service location descriptor (0xa1)
- small cleanups
Signed-off-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
André Roth [Wed, 8 Jan 2014 22:12:46 +0000 (19:12 -0300)]
libdvbv5: fix reading multisection tables
Unfortunately the section ids are not granted to be incremented by one.
This means the last section id is not necessarily equal to the total
number of sections. The only way to know if everything has been parsed, is
to stop when a repeating section id has been found.
The sections do not need to contain the same table id. In EIT for example,
the id designates the corresponding service.
Thus, allow the table id to differ.
Signed-off-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Wed, 15 Jan 2014 08:13:08 +0000 (09:13 +0100)]
v4l-utils: run sync-with-kernel, add ioctl32 tests for v4l2-subdev.h
The v4l2-subdev ioctls were never tested in compat32 mode. Add the v4l2-subdev.h
header to v4l-utils when running sync-with-kernel and fix the gen_ioctl_list.pl
script to generate the subdev ioctls.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Lad, Prabhakar [Mon, 13 Jan 2014 10:59:46 +0000 (16:29 +0530)]
libv4l: Update the link pointing the patch for porting the application to libv4l2
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Lad, Prabhakar [Mon, 13 Jan 2014 09:28:06 +0000 (14:58 +0530)]
libv4l: Update the README name for libv4l
The README for libv4l was renamed from README.lib to
README.libv4l but the reference to it was not fixed.
This patch fixes the above.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
André Roth [Wed, 8 Jan 2014 11:23:28 +0000 (08:23 -0300)]
libdvbv5: implement ATSC EIT
ATSC has a different EIT table then DVB. This implements
the parser according to secifications defined in A/65:2009.
Signed-off-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
André Roth [Wed, 8 Jan 2014 11:23:27 +0000 (08:23 -0300)]
libdvbv5: implement MGT table parser
The Master Guide Table is used in ATSC. Implementation
according to specs A/65:2009
Signed-off-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
André Roth [Wed, 8 Jan 2014 11:23:26 +0000 (08:23 -0300)]
libdvbv5: implement ATSC standard header
The ATSC standard header is slightly different from the one used
in DVB. This implements the parser for it, and will be used by
the VCT table for example.
Signed-off-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>