platform/upstream/v4l-utils.git
11 years agodvb5-scan: Improve output to better show the status
Mauro Carvalho Chehab [Sat, 2 Mar 2013 12:38:28 +0000 (09:38 -0300)]
dvb5-scan: Improve output to better show the status

Show intermediate status, in order to allow better adjusting
the antenna.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvbv5-zap: Only go back if is there anything to clean
Mauro Carvalho Chehab [Sat, 2 Mar 2013 12:39:39 +0000 (09:39 -0300)]
dvbv5-zap: Only go back if is there anything to clean

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agov4l2-ctl: improve interval reporting.
Hans Verkuil [Sat, 2 Mar 2013 11:20:49 +0000 (12:20 +0100)]
v4l2-ctl: improve interval reporting.

Shorten the text and drop the fps step value which was wrong and not useful.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: correctly update frame width and height for fixed resolutions.
Hans Verkuil [Sat, 2 Mar 2013 10:28:23 +0000 (11:28 +0100)]
qv4l2: correctly update frame width and height for fixed resolutions.

When selecting a specific resolution the width and height fields were
only disabled, but not updated to that resolution. Fixed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agodvb-fe: Reserve space for the other DVBv5 properties
Mauro Carvalho Chehab [Fri, 1 Mar 2013 13:40:55 +0000 (10:40 -0300)]
dvb-fe: Reserve space for the other DVBv5 properties

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvb-fe: Fix check for stats property
Mauro Carvalho Chehab [Fri, 1 Mar 2013 13:39:29 +0000 (10:39 -0300)]
dvb-fe: Fix check for stats property

Instead of [i], the tests were doing [2]. That broke DTV_STATUS
retrival.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoqv4l2: don't show "Query Standard" button if QUERYSTD isn't supported.
Hans Verkuil [Fri, 15 Feb 2013 12:44:02 +0000 (13:44 +0100)]
qv4l2: don't show "Query Standard" button if QUERYSTD isn't supported.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agodvbv5-scan: Fix get_signal logic
Mauro Carvalho Chehab [Wed, 6 Feb 2013 13:26:27 +0000 (11:26 -0200)]
dvbv5-scan: Fix get_signal logic

As reported by Hans Verkuil:

dvbv5-scan.c: In function ‘main’:
dvbv5-scan.c:113:23: warning: ‘i’ may be used uninitialized in this function [-Wuninitialized]
dvbv5-scan.c:97:10: note: ‘i’ was declared here

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agov4l-utils: use openat when available
Riku Voipio [Tue, 22 Jan 2013 15:37:22 +0000 (12:37 -0300)]
v4l-utils: use openat when available

New architectures such as 64-Bit arm build kernels without legacy
system calls - Such as the the no-at system calls. Thus, use
SYS_openat whenever it is available.

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agov4l2-compliance: improve read/write error reporting.
Hans Verkuil [Wed, 6 Feb 2013 07:27:41 +0000 (08:27 +0100)]
v4l2-compliance: improve read/write error reporting.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoioctl-test: expand it to also test DVB frontend/demux
Mauro Carvalho Chehab [Mon, 4 Feb 2013 19:59:11 +0000 (17:59 -0200)]
ioctl-test: expand it to also test DVB frontend/demux

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoAdd DVB headers to make sync-with-kernel
Mauro Carvalho Chehab [Mon, 4 Feb 2013 17:13:37 +0000 (15:13 -0200)]
Add DVB headers to make sync-with-kernel

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoioctl-test: Auto-generate the list of ioctls to test
Mauro Carvalho Chehab [Mon, 4 Feb 2013 19:00:16 +0000 (17:00 -0200)]
ioctl-test: Auto-generate the list of ioctls to test

Instead of hardcoding the V4L ioctl magic numbers, determine it
from the Kernel headers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvbv5-scan: also prints signal strength on tuner fail
Mauro Carvalho Chehab [Thu, 24 Jan 2013 19:55:29 +0000 (17:55 -0200)]
dvbv5-scan: also prints signal strength on tuner fail

Even when tuner fails, it makes sense to print the signal strength.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoioctl-test: improve comments and add checks against ioctl num changes.
Hans Verkuil [Mon, 4 Feb 2013 12:56:02 +0000 (13:56 +0100)]
ioctl-test: improve comments and add checks against ioctl num changes.

Improve the comments at the top of the source.

Also add explicit checks against the ioctl command values to verify that
they haven't changed after modifying structs used by existing ioctls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agolibv4l: Add Founder PC T14MF to upside down table
Gregor Jasny [Sun, 27 Jan 2013 15:57:54 +0000 (16:57 +0100)]
libv4l: Add Founder PC T14MF to upside down table

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agov4l2-compliance: reorganize verbosity options
Hans Verkuil [Fri, 25 Jan 2013 08:49:14 +0000 (09:49 +0100)]
v4l2-compliance: reorganize verbosity options

The --verbose option had two levels: 1 would show warnings, 2 would show
warnings and info messages. But this was confusing since by default the
warnings weren't shown, although a warning count was printed in the summary.

Changed to show warnings by default, and --verbose now turns on just info
messages and the new -n option turns off warnings.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agodvbv5-scan: use library support for stats print
Mauro Carvalho Chehab [Thu, 24 Jan 2013 19:30:59 +0000 (17:30 -0200)]
dvbv5-scan: use library support for stats print

Use the libdvbv5 support to display status.

Now, an ISDB-T channel scanning will look like:

INFO     Scanning frequency #1 485142857
Lock   (0x1f) Quality= Poor Signal= 6.25% C/N= 17.05dB postBER= 517x10^-3 preBER= 505x10^-3 PER= 927x10^-3
  Layer A: Quality= Poor C/N= 12.82dB postBER= 2.10x10^-3 preBER= 35.5x10^-3 PER= 62.6x10^-3
  Layer B: Quality= Poor C/N= 17.81dB postBER= 15.6x10^-3 preBER= 83.4x10^-3 PER= 939x10^-3
Service #0 (59833) GLOBO 1SEG channel 4.0
Service #1 (59808) GLOBO HD channel 4.1
INFO     Scanning frequency #2 527142857
RF     (0x01): Tuning failed.
INFO     Scanning frequency #3 593142857
RF     (0x01): Tuning failed.
INFO     Scanning frequency #4 629142857
Lock   (0x1f) Quality= Poor Signal= 6.25% C/N= 10.98dB postBER= 872x10^-6 preBER= 21.7x10^-3 PER= 11.4x10^-3
  Layer A: Quality= Good C/N= 8.74dB postBER= 0 preBER= 2.38x10^-3 PER= 0
  Layer B: Quality= Poor C/N= 13.13dB postBER= 914x10^-6 preBER= 22.2x10^-3 PER= 11.9x10^-3
Service #0 (60696) RECORD 1SEG channel 8.0
Service #1 (60672) RECORD HD channel 8.1
INFO     Scanning frequency #5 725142857
Lock   (0x1f) Quality= Good Signal= 6.25% C/N= 17.90dB postBER= 1.58x10^-3 preBER= 26.0x10^-3 PER= 0
  Layer A: Quality= Good C/N= 19.33dB postBER= 0 preBER= 26.0x10^-3 PER= 0
  Layer B: Quality= Good C/N= 17.53dB postBER= 1.66x10^-3 preBER= 22.2x10^-3 PER= 0
Service #0 (60320) BAND HD channel 6.0
Service #1 (60345) BAND 1SEG channel 6.1

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvbv5-zap: improve status display
Mauro Carvalho Chehab [Thu, 24 Jan 2013 17:03:01 +0000 (15:03 -0200)]
dvbv5-zap: improve status display

When multiple layers are present, show each layer on a separate line.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvb: if the signal vanishes, bit/block error counters should vanish
Mauro Carvalho Chehab [Thu, 24 Jan 2013 11:11:48 +0000 (09:11 -0200)]
dvb: if the signal vanishes, bit/block error counters should vanish

The library should detect if the BER measures aren't available anymore,
as the signal may be dropped.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agolibv4l: Don't try to access sysfs 256 times when there is no sysfs
Hans Petter Selasky [Thu, 24 Jan 2013 12:06:30 +0000 (13:06 +0100)]
libv4l: Don't try to access sysfs 256 times when there is no sysfs

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
11 years agov4l-utils: fix two 'dereferencing type-punned pointer' warnings
Hans Verkuil [Thu, 24 Jan 2013 11:58:15 +0000 (12:58 +0100)]
v4l-utils: fix two 'dereferencing type-punned pointer' warnings

After this change v4l-utils now builds without warnings.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agodvb: add support for pre-BER measurement
Mauro Carvalho Chehab [Thu, 24 Jan 2013 11:03:41 +0000 (09:03 -0200)]
dvb: add support for pre-BER measurement

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvb: Better name the post-BER data
Mauro Carvalho Chehab [Thu, 24 Jan 2013 10:51:58 +0000 (08:51 -0200)]
dvb: Better name the post-BER data

As pre-BER will also be added, better name post-BER ones.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvb: use a macro for the number of Kernel stats
Mauro Carvalho Chehab [Thu, 24 Jan 2013 10:45:40 +0000 (08:45 -0200)]
dvb: use a macro for the number of Kernel stats

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agov4l-utils: fix make install problems with ln -s
Hans Verkuil [Thu, 24 Jan 2013 10:54:16 +0000 (11:54 +0100)]
v4l-utils: fix make install problems with ln -s

When re-installing the linking of the some libraries fail with a 'File exists'
error:

make  install-exec-hook
make[4]: Entering directory `/home/hve/work/src/v4l/v4l-utils/lib/libv4l2'
/bin/mkdir -p //usr/local/lib
(cd //usr/local/lib && ln -s libv4l/v4l2convert.so v4l2convert.so)
ln: failed to create symbolic link 'v4l2convert.so': File exists
make[4]: *** [install-exec-hook] Error 1
make[4]: Leaving directory `/home/hve/work/src/v4l/v4l-utils/lib/libv4l2'
make[3]: *** [install-exec-am] Error 2
make[3]: Leaving directory `/home/hve/work/src/v4l/v4l-utils/lib/libv4l2'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/home/hve/work/src/v4l/v4l-utils/lib/libv4l2'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/hve/work/src/v4l/v4l-utils/lib'
make: *** [install-recursive] Error 1

Fix this by removing the old link first.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agodvb: Add support for retrieving pre-BER data
Mauro Carvalho Chehab [Thu, 24 Jan 2013 10:42:01 +0000 (08:42 -0200)]
dvb: Add support for retrieving pre-BER data

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agolibdvbv5: fix compile error
André Roth [Wed, 23 Jan 2013 22:47:47 +0000 (23:47 +0100)]
libdvbv5: fix compile error

Signed-off-by: André Roth <neolynx@gmail.com>
11 years agodvb: Rename a few DVB statistics
Mauro Carvalho Chehab [Wed, 23 Jan 2013 21:16:42 +0000 (19:16 -0200)]
dvb: Rename a few DVB statistics

At the last moment, a few DVB stats properties got renamed.
Their meaning didn't change, so the only thing it is needed is
to synchronize with the new nomenclature.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvb-fe: Add support for a quality measurement
Mauro Carvalho Chehab [Mon, 21 Jan 2013 19:14:54 +0000 (17:14 -0200)]
dvb-fe: Add support for a quality measurement

Handle the technical specifics for each delivery system and provide an
userspace-friendly quality measurement.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvb-fe: Fix PER statistics measurement
Mauro Carvalho Chehab [Mon, 21 Jan 2013 19:14:09 +0000 (17:14 -0200)]
dvb-fe: Fix PER statistics measurement

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvb: Move the core of the stats logic to dvb-fe
Mauro Carvalho Chehab [Sat, 19 Jan 2013 15:04:49 +0000 (13:04 -0200)]
dvb: Move the core of the stats logic to dvb-fe

In order to duplicate similar work at dvbv5-utils and on other
userspace tools that uses this library, move the code that handles
the stats into the core.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvb-fe: Add a method to report PER
Mauro Carvalho Chehab [Sat, 19 Jan 2013 14:15:00 +0000 (12:15 -0200)]
dvb-fe: Add a method to report PER

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvbv5-zap: better display BER
Mauro Carvalho Chehab [Sat, 19 Jan 2013 11:30:18 +0000 (09:30 -0200)]
dvbv5-zap: better display BER

Instead of masking the BER scale, if the device has DVBv5 stats, it
will now display BER as it should be:

BER= 1.45x10^-6
BER= 329x10^-9

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvb-fe: Allow returning BER in a float value
Mauro Carvalho Chehab [Sat, 19 Jan 2013 11:28:36 +0000 (09:28 -0200)]
dvb-fe: Allow returning BER in a float value

BER is a fractional measure; allow returning it as such, in order
to let userspace to better display it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvb-fe: Improve BER measurements for DVBv5
Mauro Carvalho Chehab [Wed, 23 Jan 2013 19:41:46 +0000 (17:41 -0200)]
dvb-fe: Improve BER measurements for DVBv5

Instead to display the BER rate calculated since the beginning of
the measurement, display the BER between two time intervals.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvb-fe: Add a flag to indicate if DVBv5 stats is in use
Mauro Carvalho Chehab [Sat, 19 Jan 2013 09:25:13 +0000 (07:25 -0200)]
dvb-fe: Add a flag to indicate if DVBv5 stats is in use

Instead of trying every time to see if DVBv5 stats are available,
if version is equal or upper than 5.10, a call to FE_GET_PROPERTY
will fail only if a more permanent error happened (EFAULT, ENOMEM,
and similar errors).

A successful call to FE_GET_PROPERTY that returns all stat props
with len=0 means that the frontend doesn't implement any DVBv5
stats. So, if it fails once, it can be assumed that there's no
DVBv5 stats implemented for that frontend.

As a bonus, the logic now knows exactly if a measure came from
DVBv3 or from DVBv5 API.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvbv5-zap: use the new DVBv5 stats API
Mauro Carvalho Chehab [Fri, 18 Jan 2013 20:04:32 +0000 (18:04 -0200)]
dvbv5-zap: use the new DVBv5 stats API

The statistics are now presented using the DVBv5 API information:
- proper scales;
- per-layer information.

The code should be backward compatible with legacy drivers.

On new drivers with multiple layers, this will now look like:

Lock    (0x1f) Signal= 6.25% C/N= 18.86 dB BER= 31550862 UCB= 17452451  Layer A: C/N= 15.09 dB BER= 4401807  Layer B: C/N= 20.50 dB BER= 31882245 UCB= 17452451

PS.: UCB and BER on the above are still not ok (UCB is due to a driver's
issue; BER requires more work inside the userspace code - and maybe at
driver's level - to work fine).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvb-fe: add support for DVBv5 stats
Mauro Carvalho Chehab [Tue, 15 Jan 2013 01:25:41 +0000 (23:25 -0200)]
dvb-fe: add support for DVBv5 stats

In order to avoid breakage on packages that depend on this
library, backward support was preserved. Of course, the backward
call dvb_fe_retrieve_stats() won't bring anything new; it will
only return what it was provided already by the old API.

In order to get full benefit of the new API, the new DVBv5
library call should be used: dvb_fe_retrieve_stats_layer().

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoSync with kernel, with DVB stats
Mauro Carvalho Chehab [Tue, 15 Jan 2013 00:44:00 +0000 (22:44 -0200)]
Sync with kernel, with DVB stats

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agodvbv5-zap: Allow to enable FE debug
Mauro Carvalho Chehab [Fri, 18 Jan 2013 14:25:33 +0000 (12:25 -0200)]
dvbv5-zap: Allow to enable FE debug

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoAdd ASUS F2F with STK DC-1125 to upside down list
Gregor Jasny [Sat, 19 Jan 2013 16:22:53 +0000 (17:22 +0100)]
Add ASUS F2F with STK DC-1125 to upside down list

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agov4l2-compliance: add check whether the timestamp is monotonic.
Hans Verkuil [Thu, 10 Jan 2013 12:47:15 +0000 (13:47 +0100)]
v4l2-compliance: add check whether the timestamp is monotonic.

Note: today we only have 'Unknown' (legacy) and 'Monotonic' timestamps.
If new timestamp types are added, then v4l2-compliance needs to be modified
to add support for those.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agov4l2-ctl: show used timestamp type.
Hans Verkuil [Thu, 10 Jan 2013 12:45:49 +0000 (13:45 +0100)]
v4l2-ctl: show used timestamp type.

Implement support for the new timestamp type encoded in the buffer flags.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agov4l-utils: sync with latest kernel.
Hans Verkuil [Thu, 10 Jan 2013 12:24:13 +0000 (13:24 +0100)]
v4l-utils: sync with latest kernel.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: fix setting frequency for radio modulators
Hans Verkuil [Tue, 8 Jan 2013 07:28:39 +0000 (08:28 +0100)]
qv4l2: fix setting frequency for radio modulators

Setting the frequency worked fine for TV and radio receivers, but not
for modulators.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agov4l2-compliance: allow EINVAL to be returned by S/TRY_FMT.
Hans Verkuil [Mon, 7 Jan 2013 09:44:45 +0000 (10:44 +0100)]
v4l2-compliance: allow EINVAL to be returned by S/TRY_FMT.

See http://www.mail-archive.com/linux-media@vger.kernel.org/msg56550.html why
this is needed for now.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agolibv4l-mplane: Fix compile flags to allow anonymous unions with gcc 4.5.5
André Roth [Thu, 3 Jan 2013 13:44:24 +0000 (14:44 +0100)]
libv4l-mplane: Fix compile flags to allow anonymous unions with gcc 4.5.5

In c99 mode, anonymous unions are ignored with "declaration does not
declare anything", at least on gcc 4.5.5.

Signed-off-by: André Roth <neolynx@gmail.com>
11 years agocontrib/m920x/m920x_parse.pl: silence a warning
Antonio Ospite [Sat, 29 Dec 2012 21:37:08 +0000 (18:37 -0300)]
contrib/m920x/m920x_parse.pl: silence a warning

Silence a warning due to the way get_line() is supposed to be called:
  Use of uninitialized value $cmd in split at m920x_parse.pl line 118

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agocontrib/m920x/m920x_parse.pl: stricter check when extracting firmware
Antonio Ospite [Sat, 29 Dec 2012 21:37:07 +0000 (18:37 -0300)]
contrib/m920x/m920x_parse.pl: stricter check when extracting firmware

Extract firmware only from the right messages, skip the other messages.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agov4l2-compliance: Print invalid error_idx values in control tests
Laurent Pinchart [Mon, 24 Dec 2012 12:55:42 +0000 (13:55 +0100)]
v4l2-compliance: Print invalid error_idx values in control tests

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agov4l2-compliance: Print invalid return codes in control tests
Laurent Pinchart [Mon, 24 Dec 2012 12:55:41 +0000 (13:55 +0100)]
v4l2-compliance: Print invalid return codes in control tests

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agokeytable: always use hexadecimal values for scancodes
Mauro Carvalho Chehab [Mon, 17 Dec 2012 12:45:07 +0000 (10:45 -0200)]
keytable: always use hexadecimal values for scancodes

Makes it more consistent.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agokeytable: be clear when a value is in hexadecimal
Mauro Carvalho Chehab [Fri, 14 Dec 2012 18:12:34 +0000 (16:12 -0200)]
keytable: be clear when a value is in hexadecimal

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agokeytable: properly print the other MSC_* event names
Mauro Carvalho Chehab [Fri, 14 Dec 2012 18:07:49 +0000 (16:07 -0200)]
keytable: properly print the other MSC_* event names

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agokeytable: Make the parsing code more generic
Mauro Carvalho Chehab [Fri, 14 Dec 2012 18:02:36 +0000 (16:02 -0200)]
keytable: Make the parsing code more generic

It will now be a little more generic, as the code will be able
to print all input event messages with its proper name.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agokeytable: Add the remaining other unhandled events
Mauro Carvalho Chehab [Fri, 14 Dec 2012 17:13:47 +0000 (15:13 -0200)]
keytable: Add the remaining other unhandled events

That helps to latter add parsing code for those events, if ever
needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agokeytable: Put events in numeric order
Mauro Carvalho Chehab [Fri, 14 Dec 2012 17:11:56 +0000 (15:11 -0200)]
keytable: Put events in numeric order

That helps to identify what's missing

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agokeytable: also print code for unknown/unhandled events
Mauro Carvalho Chehab [Fri, 14 Dec 2012 17:10:18 +0000 (15:10 -0200)]
keytable: also print code for unknown/unhandled events

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agokeytable: Add handler for EV_REL type
Mauro Carvalho Chehab [Fri, 14 Dec 2012 17:05:17 +0000 (15:05 -0200)]
keytable: Add handler for EV_REL type

Those are typically used on mouse events.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agokeytable: reorder functions to put similar code together
Mauro Carvalho Chehab [Fri, 14 Dec 2012 17:04:18 +0000 (15:04 -0200)]
keytable: reorder functions to put similar code together

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agokeytable: merge two identical structures into one
Mauro Carvalho Chehab [Fri, 14 Dec 2012 17:02:27 +0000 (15:02 -0200)]
keytable: merge two identical structures into one

While here, better name the event structures.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoir-keytable: Add support for testing EV_ABS events
Mauro Carvalho Chehab [Fri, 14 Dec 2012 16:00:23 +0000 (14:00 -0200)]
ir-keytable: Add support for testing EV_ABS events

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoqv4l2: add support for control events.
Hans Verkuil [Fri, 14 Dec 2012 13:05:20 +0000 (14:05 +0100)]
qv4l2: add support for control events.

qv4l2 can now handle control events, ensuring that control changes done
from another application (e.g. v4l2-ctl) will appear in qv4l2 as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoqv4l2: add missing information for string and integer controls
Hans Verkuil [Fri, 14 Dec 2012 11:37:42 +0000 (12:37 +0100)]
qv4l2: add missing information for string and integer controls

The setWhat() method didn't report all the control information for string
and integer controls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoPrepare for 0.9.3 release v4l-utils-0.9.3
Gregor Jasny [Sun, 9 Dec 2012 12:32:20 +0000 (13:32 +0100)]
Prepare for 0.9.3 release

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agov4l-compliance: Work around missing ENODATA on (k)FreeBSD
Gregor Jasny [Sat, 8 Dec 2012 18:35:26 +0000 (19:35 +0100)]
v4l-compliance: Work around missing ENODATA on (k)FreeBSD

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agov4l2-ctl: --list-buffers didn't work for multiplanar formats.
Hans Verkuil [Thu, 6 Dec 2012 17:52:54 +0000 (18:52 +0100)]
v4l2-ctl: --list-buffers didn't work for multiplanar formats.

buf.length was set to 0 instead of VIDEO_MAX_PLANES with the result
that nothing was printed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agov4l-utils/utils: fix bug in parse_subopt()
Hans Verkuil [Thu, 6 Dec 2012 11:07:17 +0000 (12:07 +0100)]
v4l-utils/utils: fix bug in parse_subopt()

The parse_subopt function did a wrong NULL check, which could cause an
application crash if the sub-option wasn't specified.

This function is used in rds-ctl, v4l2-ctl and v4l2-dbg and is now fixed
in all three.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agov4l2-compliance: add test whether V4L2_MEMORY_DMABUF is supported.
Hans Verkuil [Wed, 5 Dec 2012 10:00:36 +0000 (11:00 +0100)]
v4l2-compliance: add test whether V4L2_MEMORY_DMABUF is supported.

Also add VIDIOC_EXPBUF to the TODO list, since we don't have a test
for that yet.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoioctl-test: add the new EXPBUF ioctl.
Hans Verkuil [Wed, 5 Dec 2012 09:48:13 +0000 (10:48 +0100)]
ioctl-test: add the new EXPBUF ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agov4l-utils: sync with latest kernel headers.
Hans Verkuil [Wed, 5 Dec 2012 09:41:47 +0000 (10:41 +0100)]
v4l-utils: sync with latest kernel headers.

I had to make quite a few changes due to the introduction of the uapi
directory, lots of paths had to be changed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoparse_tcpdump_log.pl: add option to filter transfers for certain devices
Patrick Boettcher [Mon, 3 Dec 2012 09:05:04 +0000 (10:05 +0100)]
parse_tcpdump_log.pl: add option to filter transfers for certain devices

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoparse_tcpdump_log.pl: fix grammar
Patrick Boettcher [Mon, 3 Dec 2012 08:59:06 +0000 (09:59 +0100)]
parse_tcpdump_log.pl: fix grammar

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoparse_tcpdump_log.pl: bail out if header is not valid
Patrick Boettcher [Mon, 3 Dec 2012 09:01:04 +0000 (10:01 +0100)]
parse_tcpdump_log.pl: bail out if header is not valid

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agov4l2-ctl: remove unused tuner_list() function.
Hans Verkuil [Mon, 3 Dec 2012 10:14:50 +0000 (11:14 +0100)]
v4l2-ctl: remove unused tuner_list() function.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agoparse_tcpdump_log.pl: use autoflush
Mauro Carvalho Chehab [Sun, 2 Dec 2012 12:56:48 +0000 (10:56 -0200)]
parse_tcpdump_log.pl: use autoflush

Use perl autoflush mode. This speeds up parsing, when this script
is piped to another one, like:

./parse_tcpdump_log.pl --device usbmon2 | ./parse_foo.pl

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoparse_tcpdump_log.pl: add an option to list the usbmon devices
Mauro Carvalho Chehab [Sat, 1 Dec 2012 17:44:25 +0000 (15:44 -0200)]
parse_tcpdump_log.pl: add an option to list the usbmon devices

Adds a routine to list the connected USB devices, and their
associated usbmon ports.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoPrepare for 0.9.2 release v4l-utils-0.9.2
Gregor Jasny [Fri, 30 Nov 2012 23:53:38 +0000 (00:53 +0100)]
Prepare for 0.9.2 release

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agolibv4l-mplane: Use HAVE_VISIBILITY as condition for visibility attribute
Gregor Jasny [Fri, 30 Nov 2012 23:28:13 +0000 (00:28 +0100)]
libv4l-mplane: Use HAVE_VISIBILITY as condition for visibility attribute

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agolibv4l-mplane: Convert target to build as plugin only
Gregor Jasny [Fri, 30 Nov 2012 23:09:28 +0000 (00:09 +0100)]
libv4l-mplane: Convert target to build as plugin only

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agolibv4l-mplane: Drop libv4l-mplane.pc
Gregor Jasny [Fri, 30 Nov 2012 22:41:55 +0000 (23:41 +0100)]
libv4l-mplane: Drop libv4l-mplane.pc

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agolibv4l-mplane: replace libdir with libv4l2plugindir
Gregor Jasny [Fri, 30 Nov 2012 22:35:18 +0000 (23:35 +0100)]
libv4l-mplane: replace libdir with libv4l2plugindir

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agov4l2gl: Git-ignore v4l2gl binary
Gregor Jasny [Fri, 30 Nov 2012 23:12:27 +0000 (00:12 +0100)]
v4l2gl: Git-ignore v4l2gl binary

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agov4l2gl: remove a bogus comment
Mauro Carvalho Chehab [Fri, 30 Nov 2012 21:57:09 +0000 (19:57 -0200)]
v4l2gl: remove a bogus comment

This was added by mistake.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agocontrib/test: Add a GL test application
Mauro Carvalho Chehab [Fri, 30 Nov 2012 21:13:37 +0000 (19:13 -0200)]
contrib/test: Add a GL test application

This test application is a fork of v4l2grab.

This small application sets a RGB24 texture and uses it to display
the video contents.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agolibv4l-mplane: Properly convert all returned fields for *BUF
Mauro Carvalho Chehab [Sat, 24 Nov 2012 21:54:40 +0000 (19:54 -0200)]
libv4l-mplane: Properly convert all returned fields for *BUF

Not all fields were converted back to the non-MPLANE struct. Convert them,
as otherwise userspace may fail.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoAdd a libv4l plugin for mplane handling
Mauro Carvalho Chehab [Sat, 24 Nov 2012 11:57:57 +0000 (09:57 -0200)]
Add a libv4l plugin for mplane handling

Devices with only mplane buffer types require some special conversion,
in order to be able to be used by standard applications. Add a libv4l
plugin to handle it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agov4l2-ctl: load initial frames from the file as well.
Hans Verkuil [Fri, 23 Nov 2012 13:28:20 +0000 (14:28 +0100)]
v4l2-ctl: load initial frames from the file as well.

When streaming to output v4l2-ctl would load the initial frames with a colorbar,
even though a file was specified. Fill those initial frames from the file as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agov4l2-ctl: add --stream-loop for streaming to an output.
Hans Verkuil [Fri, 23 Nov 2012 13:14:57 +0000 (14:14 +0100)]
v4l2-ctl: add --stream-loop for streaming to an output.

When streaming from a file to an output it can be useful to loop the file
when the end is reached. Add the --stream-off option to do that.

Also improve the code to stop when a partial frame is read instead of pointlessly
trying to read data from the filehandle even if there isn't any.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agov4l2-ctl: zero bytesperline.
Hans Verkuil [Thu, 22 Nov 2012 11:53:47 +0000 (12:53 +0100)]
v4l2-ctl: zero bytesperline.

Some drivers allow applications to set bytesperline to a value larger than
the minimum necessary. This makes it possible to specify additional padding.

However, v4l2-ctl does a G_FMT before setting a new format, and currently it
doesn't reset bytesperline. So if the old format was 1920x1080, and you switch
to 1280x720, then bytesperline will still be at the old 1920 value.

This patch ensures that bytesperline is reset to 0 before calling S_FMT, thus
overwriting any old bytesperline values.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
11 years agolibv4lconvert: clarify the behavior and resulting restrictions of v4lconvert_convert()
Frank Schäfer [Sun, 21 Oct 2012 16:58:42 +0000 (19:58 +0300)]
libv4lconvert: clarify the behavior and resulting restrictions of v4lconvert_convert()

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
11 years agom920x_parse.pl: add support for consuming the output of parse-sniffusb2.pl
Antonio Ospite [Wed, 10 Oct 2012 12:39:22 +0000 (09:39 -0300)]
m920x_parse.pl: add support for consuming the output of parse-sniffusb2.pl

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agom920x_parse.pl: fix strict and warnings checks
Antonio Ospite [Wed, 10 Oct 2012 12:39:21 +0000 (09:39 -0300)]
m920x_parse.pl: fix strict and warnings checks

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agom920x_parse.pl: use string comparison operators
Antonio Ospite [Wed, 10 Oct 2012 12:39:20 +0000 (09:39 -0300)]
m920x_parse.pl: use string comparison operators

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agocontrib: add a script to convert usbmon captures to usbsnoop
Aapo Tahkola [Wed, 10 Oct 2012 12:39:19 +0000 (09:39 -0300)]
contrib: add a script to convert usbmon captures to usbsnoop

This makes it possible to reuse tools written for usbsnoop with captures
done using a virtual machine and usbmon.

Signed-off-by: Aapo Tahkola <aet@rasterburn.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agocontrib: add some scripts to extract m920x firmwares from USB dumps
Aapo Tahkola [Wed, 10 Oct 2012 12:39:18 +0000 (09:39 -0300)]
contrib: add some scripts to extract m920x firmwares from USB dumps

Signed-off-by: Aapo Tahkola <aet@rasterburn.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agobuildsystem: simplify directory and feature setting
Gregor Jasny [Sun, 14 Oct 2012 17:37:51 +0000 (19:37 +0200)]
buildsystem: simplify directory and feature setting

See: http://www.flameeyes.eu/autotools-mythbuster/

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agobuildsystem: Query Qt rcc tool location and fall back to rcc if not available (like...
Gregor Jasny [Sun, 14 Oct 2012 12:59:21 +0000 (14:59 +0200)]
buildsystem: Query Qt rcc tool location and fall back to rcc if not available (like on RHEL5)

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
11 years agobuildsystem: query udev directory via pkg-config
Gregor Jasny [Sun, 14 Oct 2012 12:41:09 +0000 (14:41 +0200)]
buildsystem: query udev directory via pkg-config

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>