summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-10-20[media] v4l2: add support for SDR transmitterAntti Palosaari
New IOCTL ops: vidioc_enum_fmt_sdr_out vidioc_g_fmt_sdr_out vidioc_s_fmt_sdr_out vidioc_try_fmt_sdr_out New vb2 buffertype: V4L2_BUF_TYPE_SDR_OUTPUT New v4l2 capability: V4L2_CAP_SDR_OUTPUT Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] DocBook: document tuner RF gain controlAntti Palosaari
Add brief description for tuner RF gain control. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] v4l2: add RF gain controlAntti Palosaari
Add new RF tuner gain control named RF Gain. That is aimed for first amplifier chip right after antenna connector. There is existing LNA Gain control, which is quite same, but it is aimed for cases amplifier is integrated to tuner chip. Some designs have both, as almost all recent tuner silicons has integrated LNA/RF amplifier in any case. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] v4l2: rename V4L2_TUNER_ADC to V4L2_TUNER_SDRAntti Palosaari
SDR receiver has ADC (Analog-to-Digital Converter) and SDR transmitter has DAC (Digital-to-Analog Converter). Originally I though it could be good idea to have own type for receiver and transmitter, but now I feel one common type for SDR is enough. So lets rename it. Signed-off-by: Antti Palosaari <crope@iki.fi> Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> [hans.verkuil@cisco.com: this was added in 4.4, so update 4.2 to 4.4] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] media/vivid-osd: fix info leak in ioctlSalva Peiró
The vivid_fb_ioctl() code fails to initialize the 16 _reserved bytes of struct fb_vblank after the ->hcount member. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Salva Peiró <speirofr@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] media: videobuf2: Move v4l2-specific stuff to videobuf2-v4l2Junghak Sung
Move v4l2-specific stuff from videobu2-core to videobuf2-v4l2 without doing any functional changes. Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] media: videobuf2: Prepare to divide videobuf2Junghak Sung
Prepare to divide videobuf2 - Separate vb2 trace events from v4l2 trace event. - Make wrapper functions that will move to v4l2-side. - Make vb2_core_* functions that will remain in core-side. - Add a callback function table for buffer operation which makes vb2-core to be able to invoke a v4l2-side functions. - Rename internal functions as vb2_*. Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] media: videobuf2: Replace v4l2-specific data with vb2 dataJunghak Sung
Simple changes that replace v4l2-specific data with vb2 data in videobuf2-core. enum v4l2_buf_type --> int enum v4l2_memory --> enum vb2_memory VIDEO_MAX_FRAME --> VB2_MAX_FRAME VIDEO_MAX_PLANES --> VB2_MAX_PLANES struct v4l2_fh *owner --> void *owner V4L2_TYPE_IS_MULTIPLANAR() --> is_multiplanar V4L2_TYPE_IS_OUTPUT() --> is_output Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] media: videobuf2: Change queue_setup argumentJunghak Sung
Replace struct v4l2_format * with void * to make queue_setup() for common use. And then, modify all device drivers related with this change. Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> [hans.verkuil@cisco.com: fix missing const in fimc-lite.c] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] s5p-mfc: use MFC_BUF_FLAG_EOS to identify last buffers in decoder ↵Andrzej Hajda
capture queue MFC driver never delivered EOS event to apps feeding constantly its capture buffer with fresh buffers. The patch fixes it by marking last buffers returned by MFC with MFC_BUF_FLAG_EOS flag and firing EOS event on de-queuing such buffers. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] s5p-mfc: end-of-stream handling for newer encodersAndrzej Hajda
MFC encoder supports end-of-stream handling for encoder in version 5 of hardware. This patch adds it also for newer version. It was successfully tested on MFC-v8. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] s5p-mfc: fix spelling errorsIngi Kim
This patch fixes spelling errors in mfc encoder. inavild -> invaild Signed-off-by: Ingi Kim <ingi2.kim@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] media: vb2 dma-sg: Fully cache synchronise buffers in prepare and finishTiffany Lin
In videobuf2 dma-sg memory types the prepare and finish ops, instead of passing the number of entries in the original scatterlist as the "nents" parameter to dma_sync_sg_for_device() and dma_sync_sg_for_cpu(), the value returned by dma_map_sg() was used. Albeit this has been suggested in comments of some implementations (which have since been corrected), this is wrong. Fixes: d790b7eda953 ("vb2-dma-sg: move dma_(un)map_sg here") Cc: stable@vger.kernel.org # for v3.19 and up Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] media: vb2 dma-contig: Fully cache synchronise buffers in prepare ↵Tiffany Lin
and finish In videobuf2 dma-contig memory type the prepare and finish ops, instead of passing the number of entries in the original scatterlist as the "nents" parameter to dma_sync_sg_for_device() and dma_sync_sg_for_cpu(), the value returned by dma_map_sg() was used. Albeit this has been suggested in comments of some implementations (which have since been corrected), this is wrong. Fixes: 199d101efdba ("v4l: vb2-dma-contig: add prepare/finish to dma-contig allocator") Cc: stable@vger.kernel.org # for v3.8 and up Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] smiapp: Export OF module alias informationJavier Martinez Canillas
The I2C core always reports the MODALIAS uevent as "i2c:<client name" regardless if the driver was matched using the I2C id_table or the of_match_table. So technically there's no need for a driver to export the OF table since currently it's not used. In fact, the I2C device ID table is mandatory for I2C drivers since a i2c_device_id is passed to the driver's probe function even if the I2C core used the OF table to match the driver. And since the I2C core uses different tables, OF-only drivers needs to have duplicated data that has to be kept in sync and also the dev node compatible manufacturer prefix is stripped when reporting the MODALIAS. To avoid the above, the I2C core behavior may be changed in the future to not require an I2C device table for OF-only drivers and report the OF module alias. So, it's better to also export the OF table to prevent breaking module autoloading if that happens. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-10[media] DocBook: Remove kdapi.xmlMauro Carvalho Chehab
Now that the Demux kABI is documented at device-drivers.xml, remove it from the API docbook. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-10[media] DocBook: Add documentation about the demux APIMauro Carvalho Chehab
There are several stuff at media's kdapi.xml that don't belong there, as it documents the Kernel internal ABI, and not the userspace API. Add the documentation here. The hole kdapi.xml will be removed on a latter patch, after we finish documenting what's there at the proper places. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-10[media] demux.h: Convert MPEG-TS demux caps to an enumMauro Carvalho Chehab
While we can't document #defines, documenting enums are well supported by kernel-doc. So, convert the bitmap defines into an enum. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-10[media] demux.h: Convert TS filter type into enumMauro Carvalho Chehab
The usage of #define at the kABI is fine, but it doesn't allow adding a proper description. As those defines deserve a proper documentation, let's convert them into an enum and document them at device-drivers DocBook. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-10[media] DocBook: document typedef dmx_section_cb at demux.hMauro Carvalho Chehab
The dvb/kdapi.tmpl has already an extensive documentation about this callback. Now that we've added function typedefs at kernel-doc, add such documentation at demux.h, for it to appear at device-drivers DocBook. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-10[media] DocBook: document typedef dmx_ts_cb at demux.hMauro Carvalho Chehab
The dvb/kdapi.tmpl has already an extensive documentation about this callback. Now that we've added function typedefs at kernel-doc, add such documentation at demux.h, for it to appear at device-drivers DocBook. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-10kernel-doc: better format typedef function outputMauro Carvalho Chehab
A typedef function looks more likely a function and not a normal typedef. Change the code to use the output_function_*, in order to properly parse the function prototype parameters. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-10kernel-doc: Add a parser for function typedefsMauro Carvalho Chehab
The current typedef parser only works for non-function typedefs. As we need to also document some function typedefs, add a parser for it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-10[media] demux.h: make checkpatch.ph happyMauro Carvalho Chehab
There are lots of CodingStyle violations here. Now that we're touching a log on this header files, adding the documentation here, make sure that this will follow the Kernel CodingStyle. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-10[media] DocBook: document the other structs/enums of demux.hMauro Carvalho Chehab
Document the following data types: struct dmx_ts_feed struct dmx_section_filter struct dmx_section_feed enum dmx_frontend_source struct dmx_frontend Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-07[media] dvb: Remove unused frontend sources at demux.h and sync docMauro Carvalho Chehab
The DVB core has a provision for other frontend sources, but no drivers use it. The kdapi.xml contains provision for some other frontend source types, but it is not in sync with the code. So, remove the unused types and sync both files. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-06[media] dvb: get rid of enum dmx_successMauro Carvalho Chehab
This enum is not actually used anymore. The only value used from the enum is DMX_OK, passed as a parameter on two callbacks. Yet, this value is not used anywhere. So, just remove it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-06[media] DocBook: finish documenting struct dmx_demuxMauro Carvalho Chehab
There are two callbacks still not documented: .//drivers/media/dvb-core/demux.h:422: warning: No description found for parameter 'get_pes_pids' .//drivers/media/dvb-core/demux.h:422: warning: No description found for parameter 'get_stc' The purpose of first one is clear. The second one is used only on the obsolete av7110 driver, and its purpose is not clear, as it just returns a 64-bit word from the firmware to userspace. Let's document get_pes_pids and mark get_stc as private, adding a comment to not use it, while this is not documented. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-06[media] dvb: don't keep support for undocumented featuresMauro Carvalho Chehab
There are two DVB demux callbacks and ioctls that aren't documented and aren't used at all by the DVB core or by any DVB driver upstream. Let's comment out the code for those two ioctls and remove on some future version. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-06[media] DocBook: update documented fields at struct dmx_demuxMauro Carvalho Chehab
There are a few inconsistencies between the old documentation that got imported into the header and the current status. Update them, and use the proper doc-nano nomenclature for struct artuments "@", instead of foo(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-06[media] DocBook: Move struct dmx_demux kABI doc to demux.hMauro Carvalho Chehab
The DocBook/media/dvb/kdapi.xml contains the description of the kABI for DVB. The problem is that, by being maintained on a separate file and not being updated for years, it got outdated. So, for example, some callback parameters were changed, but the DocBook were still using the old stuff. As a first step to fix it, let's move the documentation of struct dmx_demux into demux.h and fix the parameters used there. For now, don't document any other field nor touch the descriptions that got moved, letting this job to other patches. That makes easier to review the patch. PS.: Please notice that an additional patch will be needed in order to fix the return values (some uses non-existent return codes) and to the functions and callbacks mentioned at the descriptions. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-06[media] dvb_ca_en50221.h: Make checkpatch.pl happyMauro Carvalho Chehab
There are several CodingStyle violations at the DVB code. While we won't be fixing them as a hole, let's fix at least the headers, as we're touching on them already in order to properly document them. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-06[media] DocBook: document struct dvb_ca_en50221Mauro Carvalho Chehab
This struct is already documented at the header file, but it is not using Kernel doc-nano format. Convert to it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-05[media] lirc_dev.h: Make checkpatch happyMauro Carvalho Chehab
Remove warnings about bad whitespacing at function struct parameters. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-05[media] DocBook: Convert struct lirc_driver to doc-nano formatMauro Carvalho Chehab
The struct lirc_driver is already documented, but on some internal format. Convert it to Kernel doc-nano format and add documentation for some additional parameters that are also present at the structure. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-05[media] DocBook: Document tveeprom.hMauro Carvalho Chehab
This header declares the code and structures used to parse Hauppauge eeproms. As this is part of the V4L2 common, and used by several drivers, let's properly document it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-05[media] tveeprom: Remove two unused fields from structMauro Carvalho Chehab
The digitizer* fields aren't used. Remove them. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-05[media] DocBook: add documentation for tuner-types.hMauro Carvalho Chehab
The tuner-types.h is part of the V4L2 core and should be touched for every new tuner added. So, it deserves to be documented at the device-drivers DocBook. Add it to device-drivers.tmpl and add descriptions for enum param_type and struct tuner_range. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-05[media] DocBook: convert struct tuner_parms to doc-nano formatMauro Carvalho Chehab
The struct tuner_params is almost fully documented, but using a non-standard way. Convert it to doc-nano format, and add descriptions for the parameters that aren't documented yet. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-05[media] tuner.h: Make checkpatch.pl happierMauro Carvalho Chehab
Remove some bad whitespaces before tabs and fix the initial comment to be compliant with Kernel coding style. Now, the only complains are about long comment lines at the defines. Those warnings should be ok to be kept. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-05[media] DocBook: Document include/media/tuner.hMauro Carvalho Chehab
This is part of the V4L2 core, so its kABI should be documented at device-drivers DocBook. Add the meta-tags for that. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-05[media] DocBook: Fix remaining issues with VB2 core documentationMauro Carvalho Chehab
Right now, "private:" tag should be lower-case, otherwise the scripts/kernel-doc won't do the right thing. Also, no fields after "private:" should be documented. As we don't want to strip the documentation, let's untag. This way, it will be seen only at the file, and not at the DocBooks. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-03[media] drxd: use kzalloc in drxd_attach()Rasmus Villemoes
This saves a little .text and removes the sizeof(...) style inconsistency. Use sizeof(*state) in accordance with CodingStyle. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-03[media] i2c: fix platform_no_drv_owner.cocci warningsFengguang Wu
drivers/media/i2c/ml86v7667.c:430:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-03[media] vivid: Add an option to configure the maximum number of devicesEzequiel Garcia
The vivid driver currently has a hard-coded limit of 64 devices, however there's nothing that prevents the creation of even more devices. This commit adds a new driver option (which defaults to 64) to allow this maximum number to be configurable. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-03[media] vivid: Fix iteration in driver removal pathEzequiel Garcia
When the diver is removed and all the resources are deallocated, we should be iterating through the created devices only. Currently, the iteration ends when vivid_devs[i] is NULL. Since the array contains VIVID_MAX_DEVS elements, it will oops if n_devs=VIVID_MAX_DEVS because in that case, no element is NULL. Fixes: c88a96b023d8 ('[media] vivid: add core driver code') Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-03[media] media: am437x-vpfe: fix handling platform_get_irq resultAndrzej Hajda
The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-03[media] staging: media: omap4iss: fix handling platform_get_irq resultAndrzej Hajda
The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-03[media] cx231xx: fix handling cx231xx_read_i2c_data resultAndrzej Hajda
The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-03[media] Add Terratec H7 Revision 4 to DVBSky driverErik Andresen
Adds Terratec H7 Rev. 4 with USB id 0ccd:10a5 to DVBSky driver. Signed-off-by: Erik Andresen <erik@vontaene.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>