aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/media (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-05-02Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linuxLinus Torvalds1-5/+2
Pull i2c changes from Wolfram Sang: - an arbitration driver. While the driver is quite simple, it caused discussion if we need additional arbitration on top of the one specified in the I2C standard. Conclusion is that I accept a few generic mechanisms, but not very specific ones. - the core lost the detach_adapter() call. It has no users anymore and was in the way for other cleanups. attach_adapter() is sadly still there since there are users waiting to be converted. - the core gained a bus recovery infrastructure. I2C defines a way to recover if the data line is stalled. This mechanism is now in the core and drivers can now pass some data to make use of it. - bigger driver cleanups for designware, s3c2410 - removing superfluous refcounting from drivers - removing Ben Dooks as second maintainer due to inactivity. Thanks for all your work so far, Ben! - bugfixes, feature additions, devicetree fixups, simplifications... * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits) i2c: xiic: must always write 16-bit words to TX_FIFO i2c: octeon: use HZ in timeout value i2c: octeon: Fix i2c fail problem when a process is terminated by a signal i2c: designware-pci: drop superfluous {get|put}_device i2c: designware-plat: drop superfluous {get|put}_device i2c: davinci: drop superfluous {get|put}_device MAINTAINERS: Ben Dooks is inactive regarding I2C i2c: mux: Add i2c-arb-gpio-challenge 'mux' driver i2c: at91: convert to dma_request_slave_channel_compat() i2c: mxs: do error checking and handling in PIO mode i2c: mxs: remove races in PIO code i2c-designware: switch to use runtime PM autosuspend i2c-designware: use usleep_range() in the busy-loop i2c-designware: enable/disable the controller properly i2c-designware: use dynamic adapter numbering on Lynxpoint i2c-designware-pci: use managed functions pcim_* and devm_* i2c-designware-pci: use dev_err() instead of printk() i2c-designware: move to managed functions (devm_*) i2c: remove CONFIG_HOTPLUG ifdefs i2c: s3c2410: Add SMBus emulation for block read ...
2013-04-22[media] solo6x10: Fix pixelformat accepted/reported by the encoderIsmael Luceno1-11/+32
The 6010 produces MPEG-4 part 2, while 6110 produces H.264. Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-22[media] go7007: dubious one-bit signed bitfieldsDan Carpenter1-2/+2
Because they're signed, "is_video" and "is_audio" can be 0 and -1 instead of 0 and 1 as intended. It doesn't cause a bug, but it makes Sparse complain: drivers/staging/media/go7007/go7007-priv.h:94:31: error: dubious one-bit signed bitfield drivers/staging/media/go7007/go7007-priv.h:95:31: error: dubious one-bit signed bitfield Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-22[media] solo6x10: Update the encoder mode on VIDIOC_S_FMTIsmael Luceno1-0/+1
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] staging/media: fix go7007 dependencies and buildRandy Dunlap1-1/+1
VIDEO_GO7007 uses usb interfaces so it should depend on USB. It also selects CYPRESS_FIRMWARE, which depends on USB. Fixes build errors and a kconfig warning: go7007-loader.c:(.text+0xcc7d0): undefined reference to `usb_get_dev' go7007-loader.c:(.init.text+0x49f0): undefined reference to `usb_register_driver' go7007-loader.c:(.exit.text+0x17ce): undefined reference to `usb_deregister' warning: (DVB_USB_AZ6007 && VIDEO_GO7007) selects CYPRESS_FIRMWARE which has unmet direct dependencies (MEDIA_SUPPORT && USB) Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] dt3155v4l: fix timestamp handlingHans Verkuil1-1/+3
Use the monotonic clock and set the timestamp_type that vb2 expects. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] dt3155v4l: fix incorrect mutex lockingHans Verkuil1-1/+2
A mutex_unlock was missing in the 'success' path of the open() call, and also at one error path in the same function. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-02i2c: Ignore return value of i2c_del_adapter()Lars-Peter Clausen1-5/+2
i2c_del_adapter() always returns 0. So all checks testing whether it will be non zero will always evaluate to false and the conditional code is dead code. This patch updates all callers of i2c_del_mux_adapter() to ignore the return value and assume that it will always succeed (which it will). In a subsequent patch the return type of i2c_del_adapter() will be made void. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Reviewed-by: Jean Delvare <khali@linux-fr.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-03-29[media] media: move dvb-usb-v2/cypress_firmware.c to media/commonHans Verkuil3-8/+5
Loading the cypress firmware is not dvb specific and should be common functionality. Move the source to media/common and make it a standalone module. As a result we can remove the dependency on dvb-usb in go7007, which has nothing to do with dvb. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] solo6x10: The size of the thresholds ioctls was too largeHans Verkuil2-2/+9
On powerpc the maximum size for the ioctl argument is 8191, and it was 8192. However, the 64x64 array of threshold values is more than is actually needed in practice for PAL and NTSC formats. A 45x45 array will do just fine. So change the size accordingly to fix this problem. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] ioctl numbers are unsigned intMauro Carvalho Chehab1-1/+1
ioctl's number is unsigned int. Fix it at vidioc_default. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] staging: davinci: Fix typo in staging/media/davinciMasanari Iida4-9/+9
Correct spelling typo in staging/media/davinci Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-26[media] go7007: fix invalid use of sizeof in go7007_usb_i2c_master_xfer()Wei Yongjun1-1/+1
sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: prefix sources with 'solo6x10-'Hans Verkuil12-1/+3
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: rename headersHans Verkuil9-7/+7
Prefix the headers with 'solo6x10-'. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: clean up motion detection handlingHans Verkuil3-54/+97
An earlier patch temporarily disabled regional motion detection. This patch adds it back: the 'Motion Detection Enable' control is now a 'Motion Detection Mode'. And to set/get the regional thresholds two new ioctls were added to get/set those thresholds. The BUF_FLAG constants were also updated to prevent clashing with existing buffer flags. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: disable the 'priv' abuseHans Verkuil1-0/+8
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: fix sequence handlingHans Verkuil3-2/+6
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: use V4L2_PIX_FMT_MPEG4, not _FMT_MPEGHans Verkuil1-12/+6
FMT_MPEG is for multiplexed streams, not elementary streams. The same is true for the V4L2_CID_MPEG_VIDEO_ENCODING control. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: small big-endian fixHans Verkuil1-1/+1
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: also stop DMA if the SOLO_PCI_ERR_P2M_DESC is raisedHans Verkuil1-1/+1
Otherwise the computer will hang. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: drop video_type and add proper s_std supportHans Verkuil6-52/+67
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: add call to pci_dma_mapping_errorHans Verkuil1-0/+2
Check the result of the dma mapping. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: fix 'BUG: key ffff88081a2a9b58 not in .data!'Hans Verkuil1-0/+1
Caused by a missing sysfs_attr_init(). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: convert the display node to vb2Hans Verkuil4-207/+103
As a consequence the ioctl op has been replaced by unlocked_ioctl. Since we are now using the core lock the locking scheme has been simplified as well. The main reason for converting this driver to vb2 was that the locking scheme in v4l2.c was hopeless. It was easier to just convert the driver then to try and salvage a threading and videobuf nightmare. The videobuf2 framework is far, far superior compared to the old videobuf. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: convert encoder nodes to vb2Hans Verkuil3-379/+140
As a consequence the ioctl op has been replaced by unlocked_ioctl. Since we are now using the core lock the locking scheme has been simplified as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: move global fields in solo_enc_fh to solo_enc_devHans Verkuil2-221/+175
All fields in solo_enc_fh do not belong there since they refer to global properties. After moving all these fields to solo_enc_dev the solo_dev_fh struct can be removed completely. Note that this also kills the 'listener' feature of this driver. This feature (where multiple filehandles can read the video) is illegal in the V4L2 API. Do this in userspace: it's much more efficient to copy memory than it is to DMA to every listener. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: move global fields in solo_dev_fh to solo_devHans Verkuil2-137/+101
All fields in solo_dev_fh do not belong there since they refer to global properties. After moving all these fields to solo_dev the solo_dev_fh struct can be removed completely. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: add support for prio and control event handlingHans Verkuil2-3/+33
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: fix various format-related compliancy issuesHans Verkuil2-35/+46
- try_fmt should never return -EBUSY. - invalid pix->field values were not mapped to a valid value. - the priv field of struct v4l2_pix_format wasn't zeroed. - the try_fmt error code was not checked in set_fmt. - enum_framesizes/intervals is valid for both MJPEG and MPEG pixel formats. - enum_frameintervals didn't check width and height and reported the wrong range. - s_parm didn't set readbuffers. - don't fail on invalid colorspace, just replace with the valid colorspace. - bytesperline should be 0 for compressed formats. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: add control frameworkHans Verkuil5-329/+132
Note that the MOTION_THRESHOLD functionality has been temporarily reduced: only the global threshold can be set, not the per-block. This will be addressed in a later patch: controls are not the proper way to do this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: add v4l2_deviceHans Verkuil4-4/+10
Add support for struct v4l2_device. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: fix querycap and update driver versionHans Verkuil3-20/+9
Setup correct bus_info, let the v4l2 core set the version and add device_caps support. Also update the module version to 3.0.0 since this is a major upgrade. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] solo6x10: sync to latest code from Bluecherry's git repoHans Verkuil19-1732/+2376
Synced to commit e9815ac5503ae60cfbf6ff8037035de8f62e2846 from branch next in git repository https://github.com/bluecherrydvr/solo6x10.git Only removed some code under #if LINUX_VERSION_CODE < some-kernel-version, renamed the driver back to solo6x10 from solo6x10-edge, removed the unnecessary compat.h header and kept the slab.h includes. Otherwise the code is identical. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] staging: lirc_sir: remove dead codeAlexander Shiyan1-10/+0
lirc_sir uses the CONFIG_SA1100_BITSY Kconfig macro. But its Kconfig symbol was removed in v2.4.13. So remove dead code associated with it. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] go7007: using strlcpy instead of strncpyChen Gang1-1/+1
For NUL terminated string, need always set '\0' in the end. Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] go7007: Remove unneeded version.h header includeSachin Kamat1-1/+0
version.h header inclusion is not necessary as detected by versioncheck. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] go7007: don't continue if firmware can't be loadedHans Verkuil2-55/+55
The go7007 driver would continue during probe if no firmware could be loaded. Without firmware the probe() should return an error, so do that. Also move the registration of devices to the end of the probe() sequence: once devices appear the full driver functionality should be available. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] go7007: update the READMEHans Verkuil1-8/+134
Include the patch required to add support for the go7007 to saa7134. To be applied once the driver is moved out of staging. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25[media] saa7134-go7007: convert to a subdev and the control frameworkHans Verkuil2-47/+72
The only thing missing after this to make the Sensoray model 614 board work is to hook it up to the saa7134 driver, but that will have to wait until this driver goes out of staging. Signed-off-by: Pete Eberlein <pete@sensoray.com> [hans.verkuil@cisco.com: updated to make it merge correctly] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] go7007: add support for ADS Tech DVD Xpress DX2Hans Verkuil5-3/+75
Taken from the 0.9.8-5 version of the out-of-tree wis-go7007 driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] go7007: drop firmware name in board config, make configs constHans Verkuil5-34/+25
The firmware is always the same, so drop it from the board configs. Also make the board configs const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] go7007: correct a header check: MPEG4 has a different GOP codeHans Verkuil1-2/+4
Actually it's called "Group of VOP" start code in MPEG4 terminology. Taken from the 0.9.8-5 version of the out-of-tree wis-go7007 driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] go7007: add back 'repeat sequence header' controlHans Verkuil2-1/+5
But now as a proper standard MPEG control. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] go7007: Restore b_frame controlVolokh Konstantin2-2/+7
Signed-off-by: Volokh Konstantin <volokh84@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] go7007: a small improvement to querystd handlingHans Verkuil1-4/+4
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] go7007-loader: add support for the other devices and move fw filesHans Verkuil4-92/+68
Add support for the other devices that need to load the boot firmware. All firmware files are now placed in a single go7007 directory. Also remove the device_extension_s stuff: this is clearly a left-over from the olden days. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] go7007-loader: renamed from s2250-loaderHans Verkuil4-70/+54
All s2250 names are renamed to go7007. This will be the generic go7007 firmware loader for any go7007 device, not just for the s2250/1. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] s2250: add comment describing the hardwareHans Verkuil1-0/+7
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] go7007: remove cropping functionsHans Verkuil1-92/+0
Remove these dummy cropping functions: cropping was never implemented. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>