platform/upstream/v4l-utils.git
12 years agodvbv5-zap: Accepty any number of audio and video PID's
Mauro Carvalho Chehab [Fri, 13 Jan 2012 23:28:00 +0000 (21:28 -0200)]
dvbv5-zap: Accepty any number of audio and video PID's

Instead of working with just one video and just one audio,
allows zapping to a service with 0 or more audio/video
pid's.

Currently, just one audio or video pid will be filtered.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb/dvb-file: Allow adding new keys to the file
Mauro Carvalho Chehab [Fri, 13 Jan 2012 23:09:19 +0000 (21:09 -0200)]
utils/dvb/dvb-file: Allow adding new keys to the file

Don't be too pedantic: if a new key is added, the parser
should not die. Instead, silently ignores it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agodvb/libscan: Fix a bug at service PID handling
Mauro Carvalho Chehab [Fri, 13 Jan 2012 22:52:51 +0000 (20:52 -0200)]
dvb/libscan: Fix a bug at service PID handling

Several DVB-C channels had video/audio PID missing, because
the PMT tables for them weren't handled.

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agodvbv5-scan: add a parameter to control the usage of other freqs
Mauro Carvalho Chehab [Fri, 13 Jan 2012 22:32:36 +0000 (20:32 -0200)]
dvbv5-scan: add a parameter to control the usage of other freqs

By default, dvbv5-scan will get other frequencies from the
DVB NIT tables and use them for scan. A new flag to disable
this behavior is now added, as it helps to test the tool
with DVB-C.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agodvbv5-zap: use argp parser instead of getopt
Mauro Carvalho Chehab [Fri, 13 Jan 2012 22:27:19 +0000 (20:27 -0200)]
dvbv5-zap: use argp parser instead of getopt

argp is easier to use and provides a nicer/more standard
arguments parsing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agodvbv5-scan: use argp parser instead of getopt
Mauro Carvalho Chehab [Fri, 13 Jan 2012 20:44:23 +0000 (18:44 -0200)]
dvbv5-scan: use argp parser instead of getopt

argp is easier to use and provides a nicer/more standard
arguments parsing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/descriptors: Be more verbose about table bad usage
Mauro Carvalho Chehab [Fri, 13 Jan 2012 19:21:53 +0000 (17:21 -0200)]
utils/descriptors: Be more verbose about table bad usage

When a descriptor is found at the wrong place, be more verbose
about what happened.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agodvb/dvb-file: Don't require a service name for everything
Mauro Carvalho Chehab [Fri, 13 Jan 2012 15:51:43 +0000 (13:51 -0200)]
dvb/dvb-file: Don't require a service name for everything

If the service doesn't provide a name, use its number.
This prevents a segmentation fault that happens for some DVB-C
frequencies here.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agodvbv5-scan: Add a logic to scan other transponders
Mauro Carvalho Chehab [Fri, 13 Jan 2012 15:39:42 +0000 (13:39 -0200)]
dvbv5-scan: Add a logic to scan other transponders

If a new transponder/channel is found, add it to the scan table,
in order to process the remaining frequencies found.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agodvb/descriptors: Unify the frequency add logic
Mauro Carvalho Chehab [Fri, 13 Jan 2012 14:37:47 +0000 (12:37 -0200)]
dvb/descriptors: Unify the frequency add logic

Instead of copying different versions of the same logic for all
delivery system descriptors, unify into a common place, and
fix the realloc size.

While here, fix another case where the size of the data were
missing for realloc.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agov4l2-compliance: fix frequency tests
Hans Verkuil [Fri, 13 Jan 2012 09:44:22 +0000 (10:44 +0100)]
v4l2-compliance: fix frequency tests

1) If you set a frequency that is out of range then the spec says that the
   driver must map it to the closest valid frequency.

2) Assume that radio devices are either tuners or modulators but not both.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
12 years agoqv4l2: fix segfault when there are no inputs or outputs.
Hans Verkuil [Fri, 13 Jan 2012 09:43:49 +0000 (10:43 +0100)]
qv4l2: fix segfault when there are no inputs or outputs.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
12 years agodvbv5-scan: Fix parsing crash at extension descriptors
Stefan Ringel [Wed, 11 Jan 2012 19:31:43 +0000 (20:31 +0100)]
dvbv5-scan: Fix parsing crash at extension descriptors

Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb/descriptors: Fix frequency parsers
Mauro Carvalho Chehab [Wed, 11 Jan 2012 15:09:57 +0000 (13:09 -0200)]
utils/dvb/descriptors: Fix frequency parsers

DVB-T and frequency list are not stored in BCD, as reported by
Stefan.

Also, double-checked the other frequency descriptors and found
a few issues on them.

Thanks to Stefan for reporting it.

Reported-by: Stefan Ringel <linuxtv@stefanringel.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb/descriptors: Move the parse logic to their functions
Mauro Carvalho Chehab [Wed, 11 Jan 2012 14:57:59 +0000 (12:57 -0200)]
utils/dvb/descriptors: Move the parse logic to their functions

Instead of having there inside the big switch, move them into
their own functions.

This solves a problem when parsing the service name descriptors,
as it increments the buffer internally, causing troubles at the
decoder.

Thanks to Stefan for reporting it.

Reported-by: Stefan Ringel <linuxtv@stefanringel.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Don't cause segmentation fault if fe was not found
Mauro Carvalho Chehab [Wed, 11 Jan 2012 14:28:14 +0000 (12:28 -0200)]
utils/dvb: Don't cause segmentation fault if fe was not found

This is a trivial fix: if it can't open the frontend, just
exit, instead of trying to use a NULL pointer ;)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Fix ISDB-T mode parsing
Mauro Carvalho Chehab [Mon, 9 Jan 2012 17:08:52 +0000 (15:08 -0200)]
utils/dvb: Fix ISDB-T mode parsing

The ARIB/ABNT specs for ISDB are not very clear about what modes
correspond to 2k, 4k, 8k, but the DVB specs state that:

ISDB-T supports three carrier/symbol-size: 8K, 4K, 2K.
It is called 'mode' in the standard:
Mode 1 is 2K, mode 2 is 4K, mode 3 is 8K

Other documents also indicate that. In a matter of fact, what
is there is:
Mode 1: 1405 carriers - 2k FFT
Mode 2: 2809 carriers - 4k FFT
Mode 3: 5617 carriers - 8k FFT

PS.: The dib8000 driver seems to have mode 1/mode 3 inverted.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agodvbv5-scan: Fix get_frontend() option parser
Mauro Carvalho Chehab [Mon, 9 Jan 2012 16:15:31 +0000 (14:15 -0200)]
dvbv5-scan: Fix get_frontend() option parser

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: store scanned values for DVB-T2
Mauro Carvalho Chehab [Mon, 9 Jan 2012 14:03:22 +0000 (12:03 -0200)]
utils/dvb: store scanned values for DVB-T2

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add a parser for DVB-T2 extension descriptor
Mauro Carvalho Chehab [Mon, 9 Jan 2012 13:57:05 +0000 (11:57 -0200)]
utils/dvb: Add a parser for DVB-T2 extension descriptor

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Allow filling the scan file with NIT network information
Mauro Carvalho Chehab [Mon, 9 Jan 2012 13:09:54 +0000 (11:09 -0200)]
utils/dvb: Allow filling the scan file with NIT network information

Instead of just keeping the same parameters (generally auto-detection
ones) for each service, allows overriding it with the detected
data at the NIT tables.

Also, add two options at dvbv5-scan to enable this feature, and
to enable calling get_frontend() inside the drivers, from where other
detected stuff may be read.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Properly handle ISDB-T partial reception
Mauro Carvalho Chehab [Mon, 9 Jan 2012 11:58:07 +0000 (09:58 -0200)]
utils/dvb: Properly handle ISDB-T partial reception

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb/dvbv5-scan: Avoid segmentation fault if no channels found
Mauro Carvalho Chehab [Mon, 9 Jan 2012 11:48:01 +0000 (09:48 -0200)]
utils/dvb/dvbv5-scan: Avoid segmentation fault if no channels found

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Rename pid_table::program_number to service_id
Mauro Carvalho Chehab [Mon, 9 Jan 2012 11:36:43 +0000 (09:36 -0200)]
utils/dvb: Rename pid_table::program_number to service_id

While some specs use program_number, it is actually the
service_id. So, change it, to avoid confusion.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Improve ISDB-T headers parsing
Mauro Carvalho Chehab [Mon, 9 Jan 2012 11:30:01 +0000 (09:30 -0200)]
utils/dvb: Improve ISDB-T headers parsing

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add frequency_list_descriptor to the parser
Mauro Carvalho Chehab [Sun, 8 Jan 2012 23:04:50 +0000 (21:04 -0200)]
utils/dvb: Add frequency_list_descriptor to the parser

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb/descriptors.c: add a parser for DVB-T
Mauro Carvalho Chehab [Sun, 8 Jan 2012 22:35:49 +0000 (20:35 -0200)]
utils/dvb/descriptors.c: add a parser for DVB-T

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb/descriptors.c: add a parser for DVB-C Annex A
Mauro Carvalho Chehab [Sun, 8 Jan 2012 15:46:20 +0000 (13:46 -0200)]
utils/dvb/descriptors.c: add a parser for DVB-C Annex A

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb/descriptors.c: Reorganize the descriptors
Mauro Carvalho Chehab [Sun, 8 Jan 2012 15:28:28 +0000 (13:28 -0200)]
utils/dvb/descriptors.c: Reorganize the descriptors

Reorganize the descriptors, in order to be easier for reading.
The currently unused ones were moved to a separate place.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add a descriptor parser for DVB-S/DVB-S2 NIT
Mauro Carvalho Chehab [Sun, 8 Jan 2012 15:19:04 +0000 (13:19 -0200)]
utils/dvb: Add a descriptor parser for DVB-S/DVB-S2 NIT

Add a descriptor parser for DVB-S/DVB-S2, satellite
descriptor, according with EN 300 468 v1.11.1.

Also, move the ISDB-T parser into a separate function, to
better organize the code.

For now, those descriptors are only informational. A latter
patch should use those fields inside dvb-file.c, in order
to fill the proper fields there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoqv4l2: Do a set_interval after s_fmt
Hans de Goede [Sun, 8 Jan 2012 10:22:02 +0000 (11:22 +0100)]
qv4l2: Do a set_interval after s_fmt

s_fmt resets a device to its default interval, so if a specific
interval has been selected we should so a set_interval after a s_fmt to
make sure we actually get the specified interval.

Also don't enable the drop down if enum_interval returns a non discrete
interval, since we're not populating the drop down then.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
12 years agolibv4l2: Never be lazy on s_fmt
Hans de Goede [Sat, 7 Jan 2012 11:10:18 +0000 (12:10 +0100)]
libv4l2: Never be lazy on s_fmt

Before this patch libv4l2 tries to avoid sending an "unnecessary" s_fmt to
the device. So if an app does a s_fmt with parameters which exactly match
what is already in place libv4l2 used to not send the s_fmt to the device.

This means however that if the device was set to a specific framerate
with a s_parm call, that it will stay at this framerate. Where as
normally a s_fmt resets the device to its default framerate.

This patch ensures that app which do a s_fmt always get the default
framerate by always forwarding the s_fmt to the device.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
12 years agoutils/dvb/README: update it to reflect the last changes
Mauro Carvalho Chehab [Sun, 8 Jan 2012 12:53:02 +0000 (10:53 -0200)]
utils/dvb/README: update it to reflect the last changes

Add an specific documentation for Satellite delivery systems,
and fix bad whitespacing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb/dvb-file: add support for Satellite parameters
Mauro Carvalho Chehab [Sun, 8 Jan 2012 12:30:14 +0000 (10:30 -0200)]
utils/dvb/dvb-file: add support for Satellite parameters

Store/retrieve satellite parameters: LNB, sat_number and DISEqC
wait time.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: add a parameter for increasing the DISEqC wait time
Mauro Carvalho Chehab [Sun, 8 Jan 2012 12:15:47 +0000 (10:15 -0200)]
utils/dvb: add a parameter for increasing the DISEqC wait time

By default, it will wait for 15 ms. Using -W allows increasing
this time by the amount of specified milisseconds.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: add a parameter for setting the satellite number
Mauro Carvalho Chehab [Sun, 8 Jan 2012 12:09:14 +0000 (10:09 -0200)]
utils/dvb: add a parameter for setting the satellite number

This parameter is required, if DISEqC is needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb/libsat: rewrite the DISEqC logic
Mauro Carvalho Chehab [Sun, 8 Jan 2012 11:57:20 +0000 (09:57 -0200)]
utils/dvb/libsat: rewrite the DISEqC logic

The old logic was broken. Rewrite it, according with Eutelsat
specifications:

http://www.eutelsat.com/satellites/pdf/Diseqc/Reference%20docs/bus_spec.pdf
http://www.eutelsat.com/satellites/pdf/Diseqc/associated%20docs/applic_info_turner-receiver.pdf

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agolibsat: Improve LNBf output messages
Mauro Carvalho Chehab [Sun, 8 Jan 2012 10:02:00 +0000 (08:02 -0200)]
libsat: Improve LNBf output messages

Fix Dual/Single LO output;
Show bandstacking;
On bandstacking, show what LO is used for each band.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb/libsat: Add DishPro LNBf
Mauro Carvalho Chehab [Sun, 8 Jan 2012 09:49:44 +0000 (07:49 -0200)]
utils/dvb/libsat: Add DishPro LNBf

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: dvb-fe: Fix close method.
Mauro Carvalho Chehab [Sun, 8 Jan 2012 01:32:51 +0000 (23:32 -0200)]
utils/dvb: dvb-fe: Fix close method.

Also, be sure that satellite will disable power on LNBf at
cloe.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: add a simple DISEqC code, based on szap
Mauro Carvalho Chehab [Sun, 8 Jan 2012 01:23:27 +0000 (23:23 -0200)]
utils/dvb: add a simple DISEqC code, based on szap

This code is inspired on dvb-apps szap DISEqC code. It is
likely not enough, but it should be easy to replace it by
something more complete when needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add support for setting the LNBf type
Mauro Carvalho Chehab [Sat, 7 Jan 2012 22:47:24 +0000 (20:47 -0200)]
utils/dvb: Add support for setting the LNBf type

This is needed, in order for the tools to work with satellital
delivery systems.

Still needed to fill the DISEqC stuff.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/Makefile: Add DVB directory for compilation
Mauro Carvalho Chehab [Sat, 7 Jan 2012 13:01:51 +0000 (11:01 -0200)]
utils/Makefile: Add DVB directory for compilation

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: add an install target
Mauro Carvalho Chehab [Sat, 7 Jan 2012 13:00:48 +0000 (11:00 -0200)]
utils/dvb: add an install target

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Fix a few warnings
Mauro Carvalho Chehab [Sat, 7 Jan 2012 12:57:07 +0000 (10:57 -0200)]
utils/dvb: Fix a few warnings

dvb-format-convert.c: In function â€˜main’:
dvb-format-convert.c:92:6: warning: unused variable â€˜adapter’ [-Wunused-variable]
dvb-format-convert.c:58:23: warning: â€˜delsys’ may be used uninitialized in this function [-Wuninitialized]
dvb-format-convert.c:91:57: note: â€˜delsys’ was declared here
dvb-fe.c: In function â€˜dvb_set_compat_delivery_system’:
dvb-fe.c:272:6: warning: unused variable â€˜ncaps’ [-Wunused-variable]
dvb-fe.c:328:1: warning: control reaches end of non-void function [-Wreturn-type]
dvb-file.c: In function â€˜read_dvb_file’:
dvb-file.c:365:4: warning: suggest parentheses around â€˜&&’ within â€˜||’ [-Wparentheses]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add a README file
Mauro Carvalho Chehab [Sat, 7 Jan 2012 12:04:34 +0000 (10:04 -0200)]
utils/dvb: Add a README file

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: don't be verbose about dvb-fe stuff
Mauro Carvalho Chehab [Sat, 7 Jan 2012 11:05:41 +0000 (09:05 -0200)]
utils/dvb: don't be verbose about dvb-fe stuff

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add the service # to the vchannel
Mauro Carvalho Chehab [Sat, 7 Jan 2012 11:02:34 +0000 (09:02 -0200)]
utils/dvb: Add the service # to the vchannel

This avoids having duplicated vchannel numbers

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: allow zapping via virtual channel number
Mauro Carvalho Chehab [Sat, 7 Jan 2012 10:57:04 +0000 (08:57 -0200)]
utils/dvb: allow zapping via virtual channel number

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: read/write the virtual channel number
Mauro Carvalho Chehab [Sat, 7 Jan 2012 10:56:40 +0000 (08:56 -0200)]
utils/dvb: read/write the virtual channel number

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: fill the virtual channel information
Mauro Carvalho Chehab [Sat, 7 Jan 2012 10:40:09 +0000 (08:40 -0200)]
utils/dvb: fill the virtual channel information

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: properly fill LCN
Mauro Carvalho Chehab [Sat, 7 Jan 2012 10:20:57 +0000 (08:20 -0200)]
utils/dvb: properly fill LCN

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: remove ptr argument
Mauro Carvalho Chehab [Sat, 7 Jan 2012 10:05:47 +0000 (08:05 -0200)]
utils/dvb: remove ptr argument

Instead of using a pointer argument, use an index counter. This way,
it is easier to add more descriptor parser code, and use the
index, in order to fill the structs at the right place.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add some sanity check there
Mauro Carvalho Chehab [Sat, 7 Jan 2012 09:53:14 +0000 (07:53 -0200)]
utils/dvb: Add some sanity check there

Avoid changing something at the wrong place

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: move the table type to the parse_descriptor function
Mauro Carvalho Chehab [Sat, 7 Jan 2012 09:47:10 +0000 (07:47 -0200)]
utils/dvb: move the table type to the parse_descriptor function

This brings more flexibility for the code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add support for LCN descriptor
Mauro Carvalho Chehab [Sat, 7 Jan 2012 09:28:44 +0000 (07:28 -0200)]
utils/dvb: Add support for LCN descriptor

While this descriptor appears on several places, it took some
time to discover the format for it. Finally found it at:

http://mumudvb.braice.net/mumudrupal/sites/default/files/Specifiche_LCN.pdf

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add a few other descriptors
Mauro Carvalho Chehab [Sat, 7 Jan 2012 09:07:39 +0000 (07:07 -0200)]
utils/dvb: Add a few other descriptors

with the help of libdvbpsi, added a few other descriptors found at
some ISDB-T  channels.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add support for ISDB NIT most usual descriptors
Mauro Carvalho Chehab [Sat, 7 Jan 2012 08:27:41 +0000 (06:27 -0200)]
utils/dvb: Add support for ISDB NIT most usual descriptors

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Unknown descriptor should not be an error
Mauro Carvalho Chehab [Fri, 6 Jan 2012 22:18:11 +0000 (20:18 -0200)]
utils/dvb: Unknown descriptor should not be an error

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add support for detecting the virtual channel on ISDB-T
Mauro Carvalho Chehab [Fri, 6 Jan 2012 22:16:49 +0000 (20:16 -0200)]
utils/dvb: Add support for detecting the virtual channel on ISDB-T

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add a description for the parsed descriptors
Mauro Carvalho Chehab [Fri, 6 Jan 2012 21:56:18 +0000 (19:56 -0200)]
utils/dvb: Add a description for the parsed descriptors

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Fix descriptors parsing
Mauro Carvalho Chehab [Fri, 6 Jan 2012 21:49:01 +0000 (19:49 -0200)]
utils/dvb: Fix descriptors parsing

The descriptors parsing were failing. Fix its logic.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add ISDB-T specific descriptors, according with the specs
Mauro Carvalho Chehab [Fri, 6 Jan 2012 20:57:14 +0000 (18:57 -0200)]
utils/dvb: Add ISDB-T specific descriptors, according with the specs

Add the descriptors according with ABNT NBR 15603-1:2007
(corrected 2008 version)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: dvb tools: Set frontend on dvbv5-scan and dvbv5-zap
Mauro Carvalho Chehab [Thu, 5 Jan 2012 17:22:54 +0000 (15:22 -0200)]
utils/dvb: dvb tools: Set frontend on dvbv5-scan and dvbv5-zap

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: add support for setting the frontend type
Mauro Carvalho Chehab [Thu, 5 Jan 2012 13:07:09 +0000 (11:07 -0200)]
utils/dvb: add support for setting the frontend type

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add a file converter
Mauro Carvalho Chehab [Wed, 4 Jan 2012 16:09:56 +0000 (14:09 -0200)]
utils/dvb: Add a file converter

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add support for the new format
Mauro Carvalho Chehab [Wed, 4 Jan 2012 14:27:01 +0000 (12:27 -0200)]
utils/dvb: Add support for the new format

Now, by default, it will use the new format. Old formats are still
supported, via passing some extra options to it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: The comparation were inverted. fix it
Mauro Carvalho Chehab [Wed, 4 Jan 2012 14:26:43 +0000 (12:26 -0200)]
utils/dvb: The comparation were inverted. fix it

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: improve error messages for store/retrieve
Mauro Carvalho Chehab [Wed, 4 Jan 2012 13:12:05 +0000 (11:12 -0200)]
utils/dvb: improve error messages for store/retrieve

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: fix parser for new format
Mauro Carvalho Chehab [Wed, 4 Jan 2012 13:11:44 +0000 (11:11 -0200)]
utils/dvb: fix parser for new format

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Store delivery system at the properties
Mauro Carvalho Chehab [Wed, 4 Jan 2012 12:49:44 +0000 (10:49 -0200)]
utils/dvb: Store delivery system at the properties

This is needed when generating the channels file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Fix PID parsing on PAT table
Mauro Carvalho Chehab [Wed, 4 Jan 2012 11:50:44 +0000 (09:50 -0200)]
utils/dvb: Fix PID parsing on PAT table

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: remove a debug printf
Mauro Carvalho Chehab [Wed, 4 Jan 2012 11:43:41 +0000 (09:43 -0200)]
utils/dvb: remove a debug printf

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: fix a few warnings
Mauro Carvalho Chehab [Wed, 4 Jan 2012 11:42:48 +0000 (09:42 -0200)]
utils/dvb: fix a few warnings

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: add support for read the new format
Mauro Carvalho Chehab [Wed, 4 Jan 2012 11:37:38 +0000 (09:37 -0200)]
utils/dvb: add support for read the new format

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: use standard "channels.conf" file
Mauro Carvalho Chehab [Wed, 4 Jan 2012 00:03:59 +0000 (22:03 -0200)]
utils/dvb: use standard "channels.conf" file

Instead of using ~/.tzap/channels.conf file, uses a standard
channels file, without the PID's. Also, pass it as a parameter,
just like dvb-apps "scan" tool.

After this patch, the tool is working fine for ISDB-T. It
will likely work fine also for DVB-T.

Additional changes are required for DVB-C, in order to proccess
the NIT/SDT tables there, and for DVB-S, due to satellite
specifics.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: fix scan print
Mauro Carvalho Chehab [Tue, 3 Jan 2012 23:50:37 +0000 (21:50 -0200)]
utils/dvb: fix scan print

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Wait for carrier before scanning for tables
Mauro Carvalho Chehab [Tue, 3 Jan 2012 23:46:52 +0000 (21:46 -0200)]
utils/dvb: Wait for carrier before scanning for tables

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add some messages during scan
Mauro Carvalho Chehab [Tue, 3 Jan 2012 20:53:29 +0000 (18:53 -0200)]
utils/dvb: Add some messages during scan

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: comment debug prints
Mauro Carvalho Chehab [Tue, 3 Jan 2012 20:41:18 +0000 (18:41 -0200)]
utils/dvb: comment debug prints

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Make it scan all channels
Mauro Carvalho Chehab [Tue, 3 Jan 2012 20:28:48 +0000 (18:28 -0200)]
utils/dvb: Make it scan all channels

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: add a method for freeing dvb_description struct
Mauro Carvalho Chehab [Tue, 3 Jan 2012 19:54:51 +0000 (17:54 -0200)]
utils/dvb: add a method for freeing dvb_description struct

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: write channels into the file
Mauro Carvalho Chehab [Tue, 3 Jan 2012 19:39:06 +0000 (17:39 -0200)]
utils/dvb: write channels into the file

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add support for multiple audio and video pid's per service ID
Mauro Carvalho Chehab [Tue, 3 Jan 2012 18:04:50 +0000 (16:04 -0200)]
utils/dvb: Add support for multiple audio and video pid's per service ID

While the existing formats allow only one audio/video PID,
the new format is flexible enough to allow more than one.

So, allow it!

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add a parser for the NIT table
Mauro Carvalho Chehab [Tue, 3 Jan 2012 17:33:42 +0000 (15:33 -0200)]
utils/dvb: Add a parser for the NIT table

Also, comment the NIT other and SDT other, as they're not visible
here. An additional logic may be needed, in order to know if
those things are needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: parse also the PMT descriptors
Mauro Carvalho Chehab [Tue, 3 Jan 2012 16:04:48 +0000 (14:04 -0200)]
utils/dvb: parse also the PMT descriptors

There's no usage for them on a scan tool. Yet, send them to the
parser. This way, if ever needed, they could also be properly
parsed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: add support for transport descriptors
Mauro Carvalho Chehab [Tue, 3 Jan 2012 15:30:07 +0000 (13:30 -0200)]
utils/dvb: add support for transport descriptors

As this is tested with an ISDB-T channel, the only descriptor
found there is 0x41 (service_list_descriptor). This has no meaning
for a dvb-scan tool, so don't implement it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add a parser for descriptors
Mauro Carvalho Chehab [Tue, 3 Jan 2012 14:55:04 +0000 (12:55 -0200)]
utils/dvb: Add a parser for descriptors

The descriptors use EN 300 468 annex A for encoding strings.
Import the parser I wrote for it from dvb-utils scan.c, and add
the descriptors described at ETSI EN 300 468 V1.11.1 (2010-04).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Code cleanup
Mauro Carvalho Chehab [Tue, 3 Jan 2012 12:00:39 +0000 (10:00 -0200)]
utils/dvb: Code cleanup

Improve debug messages, remove some code duplication.

Also prepare for NIT and SDT parsers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Add a poll logic to avoid waiting forever for a pid
Mauro Carvalho Chehab [Tue, 3 Jan 2012 11:37:18 +0000 (09:37 -0200)]
utils/dvb: Add a poll logic to avoid waiting forever for a pid

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: add logic to parse PMT tables
Mauro Carvalho Chehab [Tue, 3 Jan 2012 10:25:32 +0000 (08:25 -0200)]
utils/dvb: add logic to parse PMT tables

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Start a dvbv5 scan application
Mauro Carvalho Chehab [Tue, 3 Jan 2012 00:09:10 +0000 (22:09 -0200)]
utils/dvb: Start a dvbv5 scan application

This application is based on dvbv5-zap application, plus a reading
at the DVB specs. It might be easier to start from some other DVB
scan tool, but reading from specs will help to be sure that it will
follow the latest standards. It also makes easier to develop a
DVB-API independent version of the library, and then write some code
to convert from its internal representation into the DVBv5
specifics.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Whitespace cleanup
Mauro Carvalho Chehab [Tue, 3 Jan 2012 00:08:50 +0000 (22:08 -0200)]
utils/dvb: Whitespace cleanup

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Fix a typo
Mauro Carvalho Chehab [Mon, 2 Jan 2012 11:42:12 +0000 (09:42 -0200)]
utils/dvb: Fix a typo

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Improve output data
Mauro Carvalho Chehab [Mon, 2 Jan 2012 11:24:46 +0000 (09:24 -0200)]
utils/dvb: Improve output data

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Don't print get_frontend props twice
Mauro Carvalho Chehab [Mon, 2 Jan 2012 11:23:58 +0000 (09:23 -0200)]
utils/dvb: Don't print get_frontend props twice

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Print the results of get_frontend after getting a lock
Mauro Carvalho Chehab [Mon, 2 Jan 2012 11:18:42 +0000 (09:18 -0200)]
utils/dvb: Print the results of get_frontend after getting a lock

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: add support for get_frontend call
Mauro Carvalho Chehab [Mon, 2 Jan 2012 11:12:11 +0000 (09:12 -0200)]
utils/dvb: add support for get_frontend call

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: improve ISDB-T usage
Mauro Carvalho Chehab [Mon, 2 Jan 2012 11:08:35 +0000 (09:08 -0200)]
utils/dvb: improve ISDB-T usage

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoutils/dvb: Allow forcing a DVBv3 call
Mauro Carvalho Chehab [Sun, 1 Jan 2012 13:57:22 +0000 (11:57 -0200)]
utils/dvb: Allow forcing a DVBv3 call

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>