Commit Graph

519519 Commits

Author SHA1 Message Date
Hans Verkuil 99cabb1871 [media] cobalt: fix 64-bit division link error
[linuxtv-media:master 1023/1029] ERROR: "__aeabi_uldivmod" [drivers/media/pci/cobalt/cobalt.ko] undefined!

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 11:19:30 -03:00
Hans Verkuil 86bad00a2f [media] cobalt: fix irqs used for the adv7511 transmitter
The interrupt bit assignments use for the adv7511 were off by one.
This means that the current scheme (bit << (4 * stream_index)) can
no longer be used.

Fix this by precalculating and storing the correct masks in the
cobalt_stream struct.

This wasn't noticed before because the adv7511 interrupts are very
rare. But for CEC support these interrupts are essential, so this made
me realize that it wasn't working correctly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 11:19:01 -03:00
Mauro Carvalho Chehab 1e35c77dd1 [media] DocBook: Update DocBook version and fix a few legacy things
The DVB part of the media API documentation has several
legacy things on it:
	- Examples that don't work;
	- APIs unused and deprecated;
	- places mentioning the wrong API version.

Fix them and bump the documentation version, in order to
reflect the cleanup efforts to make it more consistent with
the current status of the API.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 11:16:58 -03:00
Mauro Carvalho Chehab 87db4553a8 [media] DocBook: Fix arguments on some ioctl documentation
Due to a cut-and-paste error, the argument is missing or wrong
on 3 ioctl documentation. Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 11:15:35 -03:00
Mauro Carvalho Chehab ac99edd2e1 [media] DocBook: cleaup the notes about DTV properties
The notes there are somewhat confusing and assumes that the
reader would have read the DVBv3 way. This is not true anymore,
as the DVBv3 is now on a separate section that is marked as
deprecated.

So, cleanup the notes.

While here, add a note about using libdvbv5, instead of using
the DVBv5 API directly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 11:15:02 -03:00
Mauro Carvalho Chehab e3dae8623d [media] DocBook: Add an example for using FE_SET_PROPERTY
In order to make it clearer about how to use the DVBv5 calls,
add an example of its usage. That should make it clearer about
what's actually required for the DVBv5 calls to work.

While here, also mentions the libdvbv5 library.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 11:13:30 -03:00
Mauro Carvalho Chehab 38fbb98668 [media] DocBook: improve documentation of the properties structs
Rename the tytle of the struct documentation to reflect
the name of the structures, and use links to do cross-ref.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 11:13:02 -03:00
Mauro Carvalho Chehab 9df4fc5b8f [media] DocBook: improve documentation for hierarchy
Format it as a table and links it with the legacy API xml.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 11:11:35 -03:00
Mauro Carvalho Chehab 903142e53c [media] DocBook: improve documentation for guard interval
Format it as a table and add more details, in special for
DTMB guard intervals.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 11:10:05 -03:00
Mauro Carvalho Chehab 2d457b8a90 [media] DocBook: improve documentation for FEC fields
Format it as a table and add more details. Also, remove the
duplicated occurrences.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 11:08:12 -03:00
Mauro Carvalho Chehab b174fb71e8 [media] DocBook: move fe_bandwidth to the frontend legacy section
fe_bandwidth/fe_bandwidth_t is used only on DVBv3 API. So, move
it to the frontend legacy xml, and convert it into a table.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 11:06:29 -03:00
Mauro Carvalho Chehab 0577a2f6d8 [media] DocBook: improve documentation for OFDM transmission mode
Format it as a table and add more details, in special, for
the DTMB modes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 11:04:05 -03:00
Mauro Carvalho Chehab 58e11cc3c1 [media] DocBook: improve documentation for DVB spectral inversion
Format it as a table and provide more details.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 11:02:25 -03:00
Mauro Carvalho Chehab 01f18d9633 [media] DocBook: cross-reference enum fe_modulation where needed
At frontend legacy API description, there are three places
where fe_modulation_t is defined. Cross-reference it to point
to the right place at the documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 11:00:48 -03:00
Mauro Carvalho Chehab edcf3cdfcd [media] DocBook/Makefile: improve typedef parser
The typedef parser is wrong and doesn't get some of the
types defined at the DVB API. Improve it, as we want to add
cross-references to those types.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 10:56:45 -03:00
Mauro Carvalho Chehab 704db8050d [media] DocBook: some fixes at FE_GET_INFO
There are a few issues at FE_GET_INFO documentation:
- name is a string, not a pointer to a string;
- the return text should be after the paragraph.

While here, better to bold that two fields of the structure used
by FE_GET_INFO are actually deprecated.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:48:21 -03:00
Mauro Carvalho Chehab 997eb9039d [media] DocBook: Better document enum fe_modulation
Instead of using programlisting, use a table, as this provides
a better view of the structure.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:46:40 -03:00
Mauro Carvalho Chehab 2c2bc8ff97 [media] DocBook: add a proper description for dvb_frontend_info.fe_type
The fe_type is deprecated at the DVB API. However, it may still
be used by legacy DVBv3 applications. While this works with old
devices, modern devices may support more than one delivery
system.

Add an explanation about that and a point to what should be
used, instead, in order for legacy apps to support newer hardware.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:44:47 -03:00
Mauro Carvalho Chehab be1ad6e76e [media] DocBook: Provide a high-level description for DVB frontend
Instead of just showing ioctls, let's add an introdutory text
briefly explaining the DVB frontend API.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:44:14 -03:00
Mauro Carvalho Chehab d27518ca0c [media] DocBook: fix FE_READ_STATUS argument description
What's written there about the arguments for this ioctl
is bogus: it doesn't return an enum (or a typedef)
for enum fe_status. Instead, it returns a bitmask with the
values defined by enum fe_status.

Also, the size of the integer returned is not 16 bits, but,
instead, sizeof(fe_status_t), e. g. sizeof(enum), with is
arch-dependent.

This should of course be fixed, but this should be done on
a separate patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:43:09 -03:00
Mauro Carvalho Chehab b60da5b203 [media] DocBook: better organize the function descriptions for frontend
Move the function ioctl definitions to the end of the chapter,
at their importance. That makes the document better organized,
as the DVB frontend system call index will look like:

	open()
	close()
	ioctl FE_GET_INFO — Query DVB frontend capabilities and returns information about the front-end. This call only requires read-only access to the device
	ioctl FE_READ_STATUS — Returns status information about the front-end. This call only requires read-only access to the device
	ioctl FE_SET_PROPERTY, FE_GET_PROPERTY — FE_SET_PROPERTY sets one or more frontend properties. FE_GET_PROPERTY returns one or more frontend properties.
	ioctl FE_DISEQC_RESET_OVERLOAD — Restores the power to the antenna subsystem, if it was powered off due to power overload.
	ioctl FE_DISEQC_SEND_MASTER_CMD — Sends a DiSEqC command
	ioctl FE_DISEQC_RECV_SLAVE_REPLY — Receives reply from a DiSEqC 2.0 command
	ioctl FE_DISEQC_SEND_BURST — Sends a 22KHz tone burst for 2x1 mini DiSEqC satellite selection.
	ioctl FE_SET_TONE — Sets/resets the generation of the continuous 22kHz tone.
	ioctl FE_SET_VOLTAGE — Allow setting the DC level sent to the antenna subsystem.
	ioctl FE_ENABLE_HIGH_LNB_VOLTAGE — Select output DC level between normal LNBf voltages or higher LNBf voltages.
	ioctl FE_SET_FRONTEND_TUNE_MODE — Allow setting tuner mode flags to the frontend.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:42:55 -03:00
Mauro Carvalho Chehab 26b2574fbb [media] DocBook: better document FE_DISEQC_RESET_OVERLOAD
Use the new format for the ioctl documentation and put the
struct dvb_diseqc_slave_reply together with the ioctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:42:31 -03:00
Mauro Carvalho Chehab db2a4ee870 [media] DocBook: better document FE_DISEQC_SEND_MASTER_CMD
Use the new format for the ioctl documentation and put the
struct dvb_diseqc_slave_reply together with the ioctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:41:28 -03:00
Mauro Carvalho Chehab 32b6443658 [media] DocBook: better document FE_DISEQC_RECV_SLAVE_REPLY
Use the new format for the ioctl documentation and put the
struct dvb_diseqc_slave_reply together with the ioctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:39:27 -03:00
Mauro Carvalho Chehab 81959d996a [media] DocBook: better document FE_DISEQC_SEND_BURST ioctl
Use the proper format for FE_DISEQC_SEND_BURST documentation
and  improve the documentation.

Keep the enum fe_sec_mini_cmd description together with
the ioctl, as both are used together.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:36:37 -03:00
Mauro Carvalho Chehab 6dc59e7a19 [media] DocBook: better document FE_SET_TONE ioctl
Use the proper format for FE_SET_TONE documentation and
improve the documentation.

Keep the enum fe_sec_tone_mode description together with
the ioctl, as both are used together.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:35:51 -03:00
Mauro Carvalho Chehab d6b6d346e5 [media] DocBook: better document FE_SET_VOLTAGE ioctl
Use the proper format for FE_SET_VOLTAGE documentation and fix
the documentation. The description for the enum is not 100%,
and it is missing the voltage off value.

Also, it is better to keep the enum description together with
the ioctl, as both are used together.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:33:45 -03:00
Mauro Carvalho Chehab 50f88f3da0 [media] DocBook: reformat FE_ENABLE_HIGH_LNB_VOLTAGE ioctl
Use the proper format for FE_ENABLE_HIGH_LNB_VOLTAGE documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:32:13 -03:00
Mauro Carvalho Chehab 3d7f9c9b17 [media] DocBook: reformat FE_SET_FRONTEND_TUNE_MODE ioctl
Use the proper format for FE_SET_FRONTEND_TUNE_MODE documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:31:02 -03:00
Mauro Carvalho Chehab 0f16290e6f [media] DocBook: move FE_GET_PROPERTY to its own xml file
That helps the xref logic at the Makefile to point to the
right place. Also, it becomes more organized and easier to
maintain if each ioctl have its own xml file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:28:57 -03:00
Mauro Carvalho Chehab 09c3b4a0af [media] DocBook: Rename ioctl xml files
for the xml files describing ioctls, use the same nomenclature
as on V4L2: the ioctl name, in lower case, using - instead of _.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:27:55 -03:00
Mauro Carvalho Chehab 55d4423a2d [media] DocBook: Fix false positive undefined ioctl references
The new code that detects undocumented ioctls hits some false
positives:

This one is not documented, nor it should, as this is
there just to reserve namespace:

	Warning: can't find reference for VIDIOC_RESERVED ioctl

But those are already documented together with other ioctls:

	Warning: can't find reference for VIDIOC_UNSUBSCRIBE_EVENT ioctl
	Warning: can't find reference for FE_GET_PROPERTY ioctl
	Warning: can't find reference for VIDIOC_SUBDEV_G_EDID ioctl
	Warning: can't find reference for VIDIOC_SUBDEV_S_EDID ioctl
	Warning: can't find reference for VIDIOC_SUBDEV_S_DV_TIMINGS ioctl
	Warning: can't find reference for VIDIOC_SUBDEV_G_DV_TIMINGS ioctl
	Warning: can't find reference for VIDIOC_SUBDEV_QUERY_DV_TIMINGS ioctl

So, we need to just be sure to point to the right documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 09:25:20 -03:00
Mauro Carvalho Chehab 3246c385f3 [media] DocBook: remove duplicated ioctl from v4l2-subdev
Those ioctls are already parsed. No need to explicitly add
them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:43:30 -03:00
Mauro Carvalho Chehab 87e4d63748 [media] DocBook: Improve xref check for undocumented ioctls
There are several badly documented undocumented ioctls.
Currently, it just generates an empty link. Instead of doing that,
only add references to the ones that exists, and add a warning
for all references that weren't found.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:42:59 -03:00
Mauro Carvalho Chehab c569eb707a [media] DocBook: Add xref links for DTV propeties
Create xref links for all DTV properties and link the frontend.h
to each. Also use them at the DVB frontent API example.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:41:27 -03:00
Mauro Carvalho Chehab e4aa18d33c [media] DocBook: Improve the description of the properties API
Make the text clearer about what the properties API does.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:40:09 -03:00
Mauro Carvalho Chehab 277dfcb4e0 [media] DocBook: Merge FE_SET_PROPERTY/FE_GET_PROPERTY ioctl description
Instead of having two refentries, merge them into just one,
like what's done with other similar ioctls at V4L2 side.

That makes the entry cleaner and will allow to add the associated
structures together with the refentry.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:37:26 -03:00
Mauro Carvalho Chehab c130d88b01 [media] DocBook: fix xref to the FE open() function
Instead of going to the V4L2 open(), use the xref to the
proper place at the frontend ioctls that were already
reformatted.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:37:05 -03:00
Mauro Carvalho Chehab ffec8bceac [media] DocBook: rewrite FE_GET_PROPERTY/FE_SET_PROPERTY to use the std way
Use the standard way of documenting ioctls for FE_GET_PROPERTY
and FE_SET_PROPERTY.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:36:03 -03:00
Mauro Carvalho Chehab 56599d4196 [media] DocBook: move DVB properties to happen earlier at the document
The DVBv5 API uses DVB properties as the main way to set the frontend
and collect statistics. Move the definition to happen earlier, in
order to reflect its importance.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:34:47 -03:00
Mauro Carvalho Chehab 5b233e1a91 [media] DocBook: improve documentation for FE_READ_STATUS
Move the ioctl and enum fe_status to a separate xml file and
put it into a better format.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:33:50 -03:00
Mauro Carvalho Chehab 002563e991 [media] DocBook: move FE_GET_INFO to a separate xml file
Keeping everything altogether makes harder to reorganize the
DocBook. So, move the FE_GET_INFO ioctl and the associated structures
into a separate file.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:32:49 -03:00
Mauro Carvalho Chehab bb38c5474e [media] DocBook: reformat FE_GET_INFO ioctl documentation
The DVB part of the docbook has a completely different format
than the V4L2 part, as it was written as a separate document.

As the V4L2 documentation is on better shape, and its format
allows adding more information, let's use it for FE_GET_INFO
and gradually update the non-legacy DVB ioctls using the new
format.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:30:53 -03:00
Mauro Carvalho Chehab 97f411d917 [media] dvb: split enum from typedefs at frontend.h
Using typedefs is already bad enough, but doing it together
with enum declaration is even worse.

Also, it breaks the scripts at DocBook that would be generating
reference pointers for the enums.

Well, we can't get rid of typedef right now, but let's at least
declare it on a separate line, and let the scripts to generate
the cross-reference, as this is needed for the next DocBook
patches.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:29:27 -03:00
Mauro Carvalho Chehab a8d3e4b4d9 [media] DocBook: move DVBv3 frontend bits to a separate section
Although the recommended usage is the DVBv5 API calls, the
documentation doesn't make it clear about what's the recommended
calls and what's legacy.

So, move the legacy API bits to a separate xml, putting them into
a new section.

Please notice that more changes are needed, since some of the
bits there are cross-referenced elsewhere.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:28:28 -03:00
Mauro Carvalho Chehab ee072ed7e3 [media] DocBook: Improve DVB frontend description
The DVB frontend API got bitrotten. Update it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:26:05 -03:00
Mauro Carvalho Chehab 0b0f1a0056 [media] DocBook: fix emphasis at the DVB documentation
Currently, it is using 'role="tt"', but this is not defined at
the DocBook 4.5 spec. The net result is that no emphasis happens.

So, replace them to bold emphasis.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:26:05 -03:00
Mauro Carvalho Chehab a1ef3eeabe [media] DocBook: add drawing with a typical media device
An illustration of what's considered a typical media device
may help people to better understand the contents of the media
infrastructure API docbook. So, add it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:25:19 -03:00
Mauro Carvalho Chehab 9f67bc5203 [media] DocBook: add a note about the ALSA API
The Docbook mistakenly makes to believe that all needed APIs for
media devices are there. Add a note there pointing that some
sub-devices are actually be controlled via ALSA API.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:14:42 -03:00
Mauro Carvalho Chehab 39b9ce2c6c [media] DocBook: Update DVB supported standards at introduction
The list of standards at the media docbook is incomplete, and it
is mentioning that the DVB-S2 & friends is "currently being updated".
That's wrong, as such update occurred back in 2008.

So, provide a more complete list of supported standards and add
a reference to the actual list.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30 08:13:20 -03:00