Commit graph

361228 commits

Author SHA1 Message Date
Hans Verkuil e8c26f45b1 [media] au0828: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 15:10:22 -03:00
Hans Verkuil a2cf96f929 [media] au0828: fix audio input handling
- V4L2_CAP_AUDIO was set, but enumaudio was not implemented.
- audioset was never filled by enum_input
- ctrl_ainput was never updated when switching the video input
- g_audio was broken due to faulty logic: g_audio should set the
  index, it doesn't receive it from the user.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 15:10:20 -03:00
Hans Verkuil 38823b29e7 [media] au0828: fix intendation coding style issue
No code change, just fixing a wrong indentation.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 15:10:16 -03:00
Hans Verkuil e1cf6587d5 [media] au0828: frequency handling fixes
- define an initial frequency
- return an error if g_frequency is called for an invalid tuner index
- get the clamped frequency value after setting it: i.e. the tuner driver
  may clamp the given frequency to a valid frequency range and ctrl_freq
  should get that actual clamped frequency.
- remove obsolete tuner type checks (done by the core).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 15:10:02 -03:00
Hans Verkuil 59e0548453 [media] au0828: fix querycap
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 15:10:00 -03:00
Hans Verkuil 5a4bdb4b34 [media] au8522_decoder: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 15:09:59 -03:00
Hans Verkuil e3f7586310 [media] DocBook media: document 3.10 changes
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 09:39:21 -03:00
Hans Verkuil b5958dc329 [media] DocBook media: add VIDIOC_DBG_G_CHIP_NAME documentation
And update the other debug ioctls accordingly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 09:35:50 -03:00
Hans Verkuil 3b2d17b4ba [media] em28xx: add support for g_chip_name
Add support for vidioc_g_chip_name, allowing AC97 to be implemented as a
second chip on the bridge with the name "ac97". v4l2-dbg can just match the
name with that string in order to detect a ac97-compliant set of registers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 09:34:22 -03:00
Hans Verkuil c7622fc948 [media] stk1160: remove V4L2_CHIP_MATCH_AC97 placeholder
It was just a placeholder and we want to get rid of the AC97 matching
define.
Also replace MATCH_HOST with MATCH_BRIDGE since we are here anyway.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 09:32:21 -03:00
Hans Verkuil 79b0c64005 [media] v4l2: add new VIDIOC_DBG_G_CHIP_NAME ioctl
Simplify the debugging ioctls by creating the VIDIOC_DBG_G_CHIP_NAME ioctl.
This will eventually replace VIDIOC_DBG_G_CHIP_IDENT. Chip matching is done
by the name or index of subdevices or an index to a bridge chip. Most of this
can all be done automatically, so most drivers just need to provide get/set
register ops.
In particular, it is now possible to get/set subdev registers without
requiring assistance of the bridge driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 09:31:05 -03:00
Hans Verkuil 820eac0ef8 [media] DocBook media: fix syntax problems in dvbproperty.xml
Caught by xmllint.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 09:25:53 -03:00
Hans Verkuil 9d5f4839cc [media] v4l2-common: remove obsolete check for ' at the end of a driver name
During the transition to sub-devices several years ago non-subdev drivers
had a ' at the end of their driver name to tell them apart from already
converted drivers. This check was a left-over from that time and can be
removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 09:24:01 -03:00
Tushar Behera 9b6f5dc07a [media] videobuf2-core: print current state of buffer in vb2_buffer_done
In vb2_buffer_done, it would be better the print the value of 'state'
(current state of buffer) than to print 'vb->state' which is always
VB2_BUF_STATE_ACTIVE.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 09:15:53 -03:00
Hans Verkuil 7bce33daea [media] solo6x10: prefix sources with 'solo6x10-'
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:54:05 -03:00
Hans Verkuil dad7fab933 [media] solo6x10: rename headers
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 08:52:40 -03:00
Hans Verkuil f5df0b7ff5 [media] solo6x10: clean up motion detection handling
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 08:51:50 -03:00
Hans Verkuil 6999687347 [media] solo6x10: disable the 'priv' abuse
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:50:22 -03:00
Hans Verkuil 15513c12e3 [media] solo6x10: fix sequence handling
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:49:48 -03:00
Hans Verkuil 9a8bfe9fe9 [media] solo6x10: use V4L2_PIX_FMT_MPEG4, not _FMT_MPEG
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 08:49:34 -03:00
Hans Verkuil 225642853a [media] solo6x10: small big-endian fix
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:48:59 -03:00
Hans Verkuil 4718892f0f [media] solo6x10: also stop DMA if the SOLO_PCI_ERR_P2M_DESC is raised
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 08:48:28 -03:00
Hans Verkuil 4c211ed7e5 [media] solo6x10: drop video_type and add proper s_std support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:48:10 -03:00
Hans Verkuil f43afb1e21 [media] solo6x10: add call to pci_dma_mapping_error
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 08:47:21 -03:00
Hans Verkuil ff82ad223d [media] solo6x10: fix 'BUG: key ffff88081a2a9b58 not in .data!'
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 08:47:08 -03:00
Hans Verkuil a4056c2fb4 [media] solo6x10: convert the display node to vb2
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 08:46:42 -03:00
Hans Verkuil 382c31a943 [media] solo6x10: convert encoder nodes to vb2
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 08:46:03 -03:00
Hans Verkuil a7eb931d63 [media] solo6x10: move global fields in solo_enc_fh to solo_enc_dev
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 08:45:10 -03:00
Hans Verkuil 6a2e65d54e [media] solo6x10: move global fields in solo_dev_fh to solo_dev
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 08:44:37 -03:00
Hans Verkuil 941604977c [media] solo6x10: add support for prio and control event handling
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:44:08 -03:00
Hans Verkuil 016afda4fb [media] solo6x10: fix various format-related compliancy issues
- 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 08:43:34 -03:00
Hans Verkuil c813bd3c8d [media] solo6x10: add control framework
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 08:42:22 -03:00
Hans Verkuil d9ebd623c1 [media] solo6x10: add v4l2_device
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 08:40:29 -03:00
Hans Verkuil 20c5f4925e [media] solo6x10: fix querycap and update driver version
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 08:26:07 -03:00
Hans Verkuil dcae5dacbc [media] solo6x10: sync to latest code from Bluecherry's git repo
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 08:25:07 -03:00
Alexander Shiyan c535cc6c71 [media] staging: lirc_sir: remove dead code
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 08:21:20 -03:00
Volokh Konstantin 8dbee53b2a [media] tw2804: Revert ADC Control commit 523a4f7fbc
Case: In AdLink MPG24 there is bt878 exists (it captures one frame of all video
inputs), Video Signal for it one transmits through tw2804 chip, so we can't
control ADC (shut on/off) on tw2804, as some another can use bttv capture way.

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-25 08:13:40 -03:00
Chen Gang 136d9f3a41 [media] go7007: using strlcpy instead of strncpy
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 08:12:54 -03:00
Sachin Kamat 70f31c91e1 [media] go7007: Remove unneeded version.h header include
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 08:12:27 -03:00
Hans Verkuil d4a2cea4f2 [media] tw9603/6.c: use two separate const tables for the 50/60hz setup
Using two separate tables to setup the registers for 50 or 60 hz is
better than the non-const table that is filled in at runtime.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:11:43 -03:00
Hans Verkuil 59aea928d5 [media] go7007: don't continue if firmware can't be loaded
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 08:10:55 -03:00
Hans Verkuil 7118b4431b [media] go7007: update the README
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 08:09:18 -03:00
Hans Verkuil 0a522228c1 [media] saa7134-go7007: convert to a subdev and the control framework
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-25 08:08:26 -03:00
Sachin Kamat b12f7dd51a [media] tw9906: Remove unneeded version.h header include
version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 07:55:41 -03:00
Frank Schaefer fa74aca3a3 [media] em28xx-i2c: fix coding style of multi line comments
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 07:51:52 -03:00
Frank Schaefer d230d5ad0b [media] em28xx-i2c: do not break strings across lines
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 07:50:24 -03:00
Hans Verkuil af2d68d1be [media] vivi: add v4l2_ctrl_modify_range test case
Update the brighness range depending on the selected input. Useful for
testing control range events.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 14:11:22 -03:00
Mauro Carvalho Chehab b781e6be79 [media] sony-btf-mpx: v4l2_tuner struct is now constant
A patchset applied earlier changed v4l2_tuner struct parameter at
vidioc_s_tuner to const. Do this change at sony_btf_mpx_s_tuner(),
in order to remove this warning:

	drivers/media/i2c/sony-btf-mpx.c:335:2: warning: initialization from incompatible pointer type [enabled by default]
	drivers/media/i2c/sony-btf-mpx.c:335:2: warning: (near initialization for 'sony_btf_mpx_tuner_ops.s_tuner') [enabled by default]

Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 14:04:34 -03:00
Hans Verkuil 4e5f113007 [media] DocBook/media/v4l: Update version number and document 3.10 changes
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 13:49:46 -03:00
Hans Verkuil 81b8cd9284 [media] videodev2.h: remove obsolete DV_PRESET API
This API is now obsolete and can be removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 13:49:43 -03:00