summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-05-30[media] DocBook: fix FE_READ_STATUS argument descriptionMauro Carvalho Chehab
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[media] DocBook: better organize the function descriptions for frontendMauro Carvalho Chehab
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[media] DocBook: better document FE_DISEQC_RESET_OVERLOADMauro Carvalho Chehab
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[media] DocBook: better document FE_DISEQC_SEND_MASTER_CMDMauro Carvalho Chehab
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[media] DocBook: better document FE_DISEQC_RECV_SLAVE_REPLYMauro Carvalho Chehab
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[media] DocBook: better document FE_DISEQC_SEND_BURST ioctlMauro Carvalho Chehab
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[media] DocBook: better document FE_SET_TONE ioctlMauro Carvalho Chehab
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[media] DocBook: better document FE_SET_VOLTAGE ioctlMauro Carvalho Chehab
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[media] DocBook: reformat FE_ENABLE_HIGH_LNB_VOLTAGE ioctlMauro Carvalho Chehab
Use the proper format for FE_ENABLE_HIGH_LNB_VOLTAGE documentation. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] DocBook: reformat FE_SET_FRONTEND_TUNE_MODE ioctlMauro Carvalho Chehab
Use the proper format for FE_SET_FRONTEND_TUNE_MODE documentation. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] DocBook: move FE_GET_PROPERTY to its own xml fileMauro Carvalho Chehab
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[media] DocBook: Rename ioctl xml filesMauro Carvalho Chehab
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[media] DocBook: Fix false positive undefined ioctl referencesMauro Carvalho Chehab
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[media] DocBook: remove duplicated ioctl from v4l2-subdevMauro Carvalho Chehab
Those ioctls are already parsed. No need to explicitly add them. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] DocBook: Improve xref check for undocumented ioctlsMauro Carvalho Chehab
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[media] DocBook: Add xref links for DTV propetiesMauro Carvalho Chehab
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[media] DocBook: Improve the description of the properties APIMauro Carvalho Chehab
Make the text clearer about what the properties API does. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] DocBook: Merge FE_SET_PROPERTY/FE_GET_PROPERTY ioctl descriptionMauro Carvalho Chehab
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[media] DocBook: fix xref to the FE open() functionMauro Carvalho Chehab
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[media] DocBook: rewrite FE_GET_PROPERTY/FE_SET_PROPERTY to use the std wayMauro Carvalho Chehab
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[media] DocBook: move DVB properties to happen earlier at the documentMauro Carvalho Chehab
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[media] DocBook: improve documentation for FE_READ_STATUSMauro Carvalho Chehab
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[media] DocBook: move FE_GET_INFO to a separate xml fileMauro Carvalho Chehab
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[media] DocBook: reformat FE_GET_INFO ioctl documentationMauro Carvalho Chehab
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[media] dvb: split enum from typedefs at frontend.hMauro Carvalho Chehab
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[media] DocBook: move DVBv3 frontend bits to a separate sectionMauro Carvalho Chehab
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[media] DocBook: Improve DVB frontend descriptionMauro Carvalho Chehab
The DVB frontend API got bitrotten. Update it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] DocBook: fix emphasis at the DVB documentationMauro Carvalho Chehab
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[media] DocBook: add drawing with a typical media deviceMauro Carvalho Chehab
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[media] DocBook: add a note about the ALSA APIMauro Carvalho Chehab
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[media] DocBook: Update DVB supported standards at introductionMauro Carvalho Chehab
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[media] cx24120: Assume ucb registers is a counterJemma Denson
The ucblocks register is probably a counter and not a rate; assume it is so and change the calculations as required. Signed-off-by: Jemma Denson <jdenson@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] dvb-core: fix 32-bit overflow during bandwidth calculationAntti Palosaari
Frontend bandwidth calculation overflows on very high DVB-S/S2 symbol rates. Use mult_frac() macro in order to keep calculation correct. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] e4000: Fix rangehigh valueMauro Carvalho Chehab
As reported by smatch: drivers/media/tuners/e4000.c:287:32: warning: constant 2208000000 is so big it is long long drivers/media/tuners/e4000.c:287:32: warning: decimal constant 2208000000 is between LONG_MAX and ULONG_MAX. For C99 that means long long, C90 compilers are very likely to produce unsigned long (and a warning) here drivers/media/tuners/e4000.c:287:3: warning: this decimal constant is unsigned only in ISO C90 .rangehigh = 2208000000, ^ Cc: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] e4000: implement V4L2 subdevice tuner and core opsAntti Palosaari
Implement V4L2 subdevice tuner and core ops. After that this driver is hybrid driver implementing both V4L2 and DVB ops. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] e4000: various small changesAntti Palosaari
* Rename device state from 's' to 'dev'. * Move single include to driver private header. * Change error handling type of each function to one I tend use nowadays. * Remove dummy register write from init. Even Windows driver does this multiple times remove it as I have never seen any I2C errors. * Define I2C client pointer for each function and use it. * Do not clean tuner ops during driver remove - not needed. * Disable sysfs device bind / unbind. We are not allowed manually bind / unbind device from the driver currently. * Rename some other variables. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] e4000: revise synthesizer calculationAntti Palosaari
Update synthesizer calculation to model I prefer nowadays. It is mostly just renaming some variables to ones I think are most standard. Also add 'schematic' of synthesizer following my current understanding. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] rtl2832_sdr: cleanup some set_bit() callsDan Carpenter
This code works fine but static checkers complain. The test_bit() function takes the bit number and not a mask. Then the other issue is that we were using USB_STATE_URB_BUF which is BIT(0) instead of URB_BUF. Also we were open coding that instead of using the test/clear/set_bit() functions. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] cobalt: add new driverHans Verkuil
The cobalt device is a PCIe card with 4 HDMI inputs (adv7604) and a connector that can be used to hook up an adv7511 transmitter or an adv7842 receiver daughterboard. This device is used within Cisco but is sadly not available outside of Cisco. Nevertheless it is a very interesting driver that can serve as an example of how to support HDMI hardware and how to use the popular adv devices. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] adv7604/adv7842: replace FMT_CHANGED by V4L2_DEVICE_NOTIFY_EVENTHans Verkuil
This makes it easier for the bridge driver to just passthrough such events to the corresponding device node. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] v4l2-subdev: allow subdev to send an event to the v4l2_device notify ↵jean-michel.hautbois@vodalys.com
function All drivers use custom notifications, in particular when source changes. The bridge only has to map the subdev that sends it to whatever video node it is connected to. Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] vb2: allow requeuing buffers while streamingHans Verkuil
vb2_buffer_done() already allows STATE_QUEUED, but currently only when not streaming. It is useful to allow it while streaming as well, as this makes it possible for drivers to requeue buffers while waiting for a stable video signal. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] adv7842: Make output format configurable through pad format operationsHans Verkuil
Replace the dummy video format operations by pad format operations that configure the output format. Copied from the adv7604 driver. Note: while arch/blackfin/mach-bf609/boards/ezkit.c uses adv7842_platform_data this source has not been updated because it is broken since the very beginning. It depends on a struct adv7842_output_format that does not exist. And besides that gcc has no support for bf609 so nobody can compile it except by installing a toolchain from ADI. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] cx24120: fix minor checkpatch-errorPatrick Boettcher
Remove multiple blank likes. Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] cx24120: Update comment & fix typoJemma Denson
These state vars are used for more than just ber calculation, also fix typo. Signed-off-by: Jemma Denson <jdenson@gmail.com> Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] cx24120: Check for lock before updating BER & UCBJemma Denson
BER & UCB aren't available unless we're locked; don't update dvbv5 stats when not locked and mark these counters as unavailable. Signed-off-by: Jemma Denson <jdenson@gmail.com> Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] cx24120: Convert ucblocks to dvbv5 statsJemma Denson
DVBv3 is a legacy API. Drivers should use DVBv5, in order to support modern applications. So, implement UCB using dvbv5. Signed-off-by: Jemma Denson <jdenson@gmail.com> Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] cx24120: Convert read_ber to retrieve from cacheJemma Denson
Instead of reading BER again for DVBv3 call, use the value from the cache. Signed-off-by: Jemma Denson <jdenson@gmail.com> Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] cx24120: Add in dvbv5 stats for bit error rateJemma Denson
DVBv3 is a legacy API. Drivers should use DVBv5, in order to support modern applications. So, implement BER using dvbv5. Signed-off-by: Jemma Denson <jdenson@gmail.com> Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20[media] cx24120: constify static dataMauro Carvalho Chehab
Use const on the static data, as gcc may optimize better the code. Also, would prevent that some code would override the data there. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de>