Frank Schaefer [Tue, 26 Mar 2013 16:38:37 +0000 (13:38 -0300)]
[media] em28xx: add chip id of the em2765
This chip can be found in the SpeedLink VAD Laplace webcam (1ae7:9003 and 1ae7:9004).
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Frank Schaefer [Tue, 26 Mar 2013 16:38:36 +0000 (13:38 -0300)]
[media] em28xx: add support for em25xx i2c bus B read/write/check device operations
The webcam "SpeedLink VAD Laplace" (em2765 + ov2640) uses a special algorithm
for i2c communication with the sensor, which is connected to a second i2c bus.
We don't know yet how to find out which devices support/use it.
It's very likely used by all em25xx and em276x+ bridges.
Tests with other em28xx chips (em2820, em2882/em2883) show, that this
algorithm always succeeds there although no slave device is connected.
The algorithm likely also works for real i2c client devices (OV2640 uses SCCB),
because the Windows driver seems to use it for probing Samsung and Kodak
sensors.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 26 Mar 2013 10:17:42 +0000 (07:17 -0300)]
[media] Fix undefined reference to `au8522_attach'
au8522_attach is dependent on CONFIG_DVB_AU8522_DTV, not CONFIG_DVB_AU8522.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Wei Yongjun [Tue, 26 Mar 2013 07:45:11 +0000 (04:45 -0300)]
[media] go7007: fix invalid use of sizeof in go7007_usb_i2c_master_xfer()
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>
Wei Yongjun [Tue, 26 Mar 2013 04:32:19 +0000 (01:32 -0300)]
[media] af9035: fix missing unlock on error in af9035_ctrl_msg()
Add the missing unlock before return from function af9035_ctrl_msg()
in the error handling case.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 25 Mar 2013 12:55:59 +0000 (09:55 -0300)]
[media] tuner-core: handle errors when getting signal strength/afc
If those callbacks fail, it should return zero, and not a random
value. The previous code assumed that all drivers would only change
signal strength if it succeeds, but this may not be true.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 25 Mar 2013 12:55:58 +0000 (09:55 -0300)]
[media] tuner-core: Remove the now uneeded checks at fe_has_signal/get_afc
Now that those functions are only used when the corresponding
function calls are defined, we don't need to check if those
function calls are present at the structure before using it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 25 Mar 2013 12:55:57 +0000 (09:55 -0300)]
[media] tuner-core: return afc instead of zero
While the driver gets AFC from the tuner, it doesn't return it
back via V4L2 API due to a mistake at the return. fix it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 25 Mar 2013 11:14:13 +0000 (08:14 -0300)]
[media] tuner-core: don't set has_signal/get_afc if not supported
If the tuner frontend does not support get_rf_strength, then don't set
the has_signal callback. Ditto for get_afc.
Both callbacks overwrite the signal and afc fields of struct v4l2_tuner
but that should only happen if the tuner can actually detect this. If
it can't, then it should leave those fields alone so other subdevices
can try and detect the signal/afc.
This fixes the bug where the au8522 detected a signal and then tuner-core
overwrote it with 0 since the xc5000 tuner does not support get_rf_strength.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 11 Mar 2013 19:22:13 +0000 (16:22 -0300)]
[media] au0828: improve firmware loading & locking
- open/close/read and poll need to take the core lock as well.
- when the tuner goes to sleep we should set std_set_in_tuner_core
to 0 since the tuner loses the firmware at that time.
- initialize the tuner if std_set_in_tuner_core == 0 whenever:
1) g/s_tuner, s_std or s_frequency is called
2) read or poll is called
3) streamon is called
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>
Hans Verkuil [Mon, 11 Mar 2013 19:18:31 +0000 (16:18 -0300)]
[media] au0828: fix initial video routing
After loading the module the initial video routing is not setup.
Explicitly call s_input to get this right.
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>
Hans Verkuil [Mon, 11 Mar 2013 19:12:17 +0000 (16:12 -0300)]
[media] au0828: don't change global state information on open()
Just opening a device shouldn't have any side-effects.
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>
Hans Verkuil [Mon, 11 Mar 2013 19:10:33 +0000 (16:10 -0300)]
[media] au0828: simplify i2c_gate_ctrl
Turn it into a simple function.
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>
Hans Verkuil [Mon, 11 Mar 2013 13:16:45 +0000 (10:16 -0300)]
[media] au0828: fix disconnect sequence
The driver crashed when the device was disconnected while an application
still had a device node open. Fixed by using the release() callback of struct
v4l2_device.
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>
Hans Verkuil [Fri, 15 Feb 2013 12:24:08 +0000 (09:24 -0300)]
[media] au8522_decoder: remove obsolete control ops
Now that au0828 has been converted to the control framework these
compatilibity ops are no longer needed.
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>
Hans Verkuil [Fri, 15 Feb 2013 12:22:37 +0000 (09:22 -0300)]
[media] au0828: replace deprecated current_norm by g_std
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>
Hans Verkuil [Mon, 11 Mar 2013 20:48:34 +0000 (17:48 -0300)]
[media] au0828: add try_fmt_vbi support, zero vbi.reserved, pix.priv
Also get rid of unnecessary format type check.
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>
Hans Verkuil [Fri, 15 Feb 2013 12:14:00 +0000 (09:14 -0300)]
[media] au0828: add prio, control event and log_status support
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>
Hans Verkuil [Fri, 15 Feb 2013 11:55:41 +0000 (08:55 -0300)]
[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>
Hans Verkuil [Fri, 15 Feb 2013 11:41:24 +0000 (08:41 -0300)]
[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>
Hans Verkuil [Fri, 15 Feb 2013 11:28:27 +0000 (08:28 -0300)]
[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>
Hans Verkuil [Fri, 22 Mar 2013 16:32:20 +0000 (13:32 -0300)]
[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>
Hans Verkuil [Fri, 15 Feb 2013 11:11:04 +0000 (08:11 -0300)]
[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>
Hans Verkuil [Fri, 15 Feb 2013 11:04:29 +0000 (08:04 -0300)]
[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>
Hans Verkuil [Mon, 25 Mar 2013 11:49:15 +0000 (08:49 -0300)]
[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>
Hans Verkuil [Mon, 18 Mar 2013 16:28:12 +0000 (13:28 -0300)]
[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>
Hans Verkuil [Mon, 18 Mar 2013 15:21:53 +0000 (12:21 -0300)]
[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>
Hans Verkuil [Mon, 18 Mar 2013 15:20:36 +0000 (12:20 -0300)]
[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>
Hans Verkuil [Mon, 18 Mar 2013 15:16:34 +0000 (12:16 -0300)]
[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>
Hans Verkuil [Mon, 18 Mar 2013 16:20:00 +0000 (13:20 -0300)]
[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>
Hans Verkuil [Wed, 6 Mar 2013 07:34:26 +0000 (04:34 -0300)]
[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>
Tushar Behera [Mon, 12 Nov 2012 07:01:29 +0000 (04:01 -0300)]
[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>
Hans Verkuil [Mon, 25 Mar 2013 08:47:48 +0000 (05:47 -0300)]
[media] solo6x10: prefix sources with 'solo6x10-'
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 25 Mar 2013 08:42:46 +0000 (05:42 -0300)]
[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>
Hans Verkuil [Mon, 18 Mar 2013 11:43:14 +0000 (08:43 -0300)]
[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>
Hans Verkuil [Fri, 15 Mar 2013 19:35:28 +0000 (16:35 -0300)]
[media] solo6x10: disable the 'priv' abuse
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 15 Mar 2013 16:16:49 +0000 (13:16 -0300)]
[media] solo6x10: fix sequence handling
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 15 Mar 2013 15:53:59 +0000 (12:53 -0300)]
[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>
Hans Verkuil [Fri, 15 Mar 2013 14:17:12 +0000 (11:17 -0300)]
[media] solo6x10: small big-endian fix
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 15 Mar 2013 14:16:56 +0000 (11:16 -0300)]
[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>
Hans Verkuil [Fri, 15 Mar 2013 15:53:17 +0000 (12:53 -0300)]
[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>
Hans Verkuil [Mon, 18 Mar 2013 11:21:33 +0000 (08:21 -0300)]
[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>
Hans Verkuil [Fri, 15 Mar 2013 15:09:35 +0000 (12:09 -0300)]
[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>
Hans Verkuil [Fri, 15 Mar 2013 15:11:17 +0000 (12:11 -0300)]
[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>
Hans Verkuil [Fri, 15 Mar 2013 15:04:14 +0000 (12:04 -0300)]
[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>
Hans Verkuil [Mon, 18 Mar 2013 11:41:13 +0000 (08:41 -0300)]
[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>
Hans Verkuil [Fri, 15 Mar 2013 14:56:46 +0000 (11:56 -0300)]
[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>
Hans Verkuil [Tue, 12 Mar 2013 21:47:03 +0000 (18:47 -0300)]
[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>
Hans Verkuil [Tue, 12 Mar 2013 21:43:21 +0000 (18:43 -0300)]
[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>
Hans Verkuil [Mon, 25 Mar 2013 08:38:14 +0000 (05:38 -0300)]
[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>
Hans Verkuil [Mon, 25 Mar 2013 08:36:44 +0000 (05:36 -0300)]
[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>
Hans Verkuil [Tue, 12 Mar 2013 21:03:20 +0000 (18:03 -0300)]
[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>
Hans Verkuil [Mon, 25 Mar 2013 08:35:17 +0000 (05:35 -0300)]
[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>
Alexander Shiyan [Mon, 25 Mar 2013 08:27:12 +0000 (05:27 -0300)]
[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>
Volokh Konstantin [Sat, 23 Mar 2013 22:28:28 +0000 (19:28 -0300)]
[media] tw2804: Revert ADC Control commit
523a4f7fbcf856fb1c2a4850f44edea6738ee37b
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>
Chen Gang [Mon, 25 Mar 2013 09:56:35 +0000 (06:56 -0300)]
[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>
Sachin Kamat [Mon, 25 Mar 2013 05:22:19 +0000 (02:22 -0300)]
[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>
Hans Verkuil [Mon, 25 Mar 2013 09:23:23 +0000 (06:23 -0300)]
[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>
Hans Verkuil [Sun, 17 Mar 2013 12:23:25 +0000 (09:23 -0300)]
[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>
Hans Verkuil [Mon, 25 Mar 2013 09:52:19 +0000 (06:52 -0300)]
[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>
Hans Verkuil [Mon, 25 Mar 2013 09:18:04 +0000 (06:18 -0300)]
[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>
Sachin Kamat [Mon, 25 Mar 2013 04:22:18 +0000 (01:22 -0300)]
[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>
Frank Schaefer [Sun, 24 Mar 2013 20:09:59 +0000 (17:09 -0300)]
[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>
Frank Schaefer [Sun, 24 Mar 2013 17:58:03 +0000 (14:58 -0300)]
[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>
Hans Verkuil [Tue, 12 Mar 2013 06:56:55 +0000 (03:56 -0300)]
[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>
Mauro Carvalho Chehab [Sun, 24 Mar 2013 16:51:21 +0000 (13:51 -0300)]
[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>
Hans Verkuil [Sun, 24 Mar 2013 09:08:00 +0000 (06:08 -0300)]
[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>
Hans Verkuil [Fri, 15 Feb 2013 18:22:56 +0000 (15:22 -0300)]
[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>
Hans Verkuil [Sun, 24 Mar 2013 09:09:29 +0000 (06:09 -0300)]
[media] DocBook/media/v4l: remove the documentation of the obsolete dv_preset API
This API is no longer used by any driver and so can be removed from the
documentation.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 15 Feb 2013 18:21:06 +0000 (15:21 -0300)]
[media] v4l2 core: remove the obsolete dv_preset support
These ioctls are no longer used by any drivers, so remove them.
[mchehab@redhat.com: Fix merge conflict]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 15 Feb 2013 18:19:33 +0000 (15:19 -0300)]
[media] v4l2-subdev: remove obsolete dv_preset ops
These ops are no longer used, so it's time to remove them.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 15 Feb 2013 18:18:04 +0000 (15:18 -0300)]
[media] v4l2-common: remove obsolete v4l_fill_dv_preset_info
It's no longer used, so it can now be removed.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 17 Mar 2013 13:15:03 +0000 (10:15 -0300)]
[media] go7007: add support for ADS Tech DVD Xpress DX2
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>
Hans Verkuil [Sun, 17 Mar 2013 12:26:40 +0000 (09:26 -0300)]
[media] tw9906: add Techwell tw9906 video decoder
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>
Hans Verkuil [Sun, 17 Mar 2013 13:56:20 +0000 (10:56 -0300)]
[media] go7007: drop firmware name in board config, make configs const
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>
Hans Verkuil [Sun, 17 Mar 2013 13:11:32 +0000 (10:11 -0300)]
[media] go7007: correct a header check: MPEG4 has a different GOP code
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>
Hans Verkuil [Sun, 17 Mar 2013 13:47:02 +0000 (10:47 -0300)]
[media] go7007: add back 'repeat sequence header' control
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>
Volokh Konstantin [Sun, 17 Mar 2013 10:16:37 +0000 (07:16 -0300)]
[media] go7007: Restore b_frame control
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>
Hans Verkuil [Mon, 11 Mar 2013 21:58:21 +0000 (18:58 -0300)]
[media] go7007: a small improvement to querystd handling
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 9 Mar 2013 15:59:44 +0000 (12:59 -0300)]
[media] MAINTAINERS: add the go7007 driver
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 11 Mar 2013 09:45:14 +0000 (06:45 -0300)]
[media] go7007-loader: add support for the other devices and move fw files
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>
Hans Verkuil [Sat, 9 Mar 2013 16:28:39 +0000 (13:28 -0300)]
[media] go7007-loader: renamed from s2250-loader
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>
Hans Verkuil [Thu, 7 Mar 2013 07:58:35 +0000 (04:58 -0300)]
[media] s2250: add comment describing the hardware
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 9 Mar 2013 15:10:35 +0000 (12:10 -0300)]
[media] go7007: remove cropping functions
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>
Hans Verkuil [Mon, 11 Mar 2013 09:34:22 +0000 (06:34 -0300)]
[media] go7007: embed struct video_device
Do not allocate it, but just embed in the go7007 struct.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 11 Mar 2013 09:52:27 +0000 (06:52 -0300)]
[media] go7007: convert to core locking and vb2
Convert this driver to videobuf2 and core locking.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 11 Mar 2013 09:18:20 +0000 (06:18 -0300)]
[media] go7007: drop struct go7007_file
Remove struct go7007_file: all fields contained in that struct are moved to
the go7007 struct since they are really global values. The lock has just
been deleted (what's the point of a per-fh lock??).
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 11 Mar 2013 09:12:10 +0000 (06:12 -0300)]
[media] go7007: set up the saa7115 audio clock correctly
The s_crystal_freq operation has to be called for the saa7115 to
set up the audio clock correctly.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 11 Mar 2013 09:11:03 +0000 (06:11 -0300)]
[media] go7007: simplify the PX-TV402U board ID handling
There really is no need to split out the board IDs for each tuner.
That's what the tuner_type is for, after all.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 11 Mar 2013 08:58:55 +0000 (05:58 -0300)]
[media] go7007: standardize MPEG handling support
The go7007 produces elementary streams, so we shouldn't use the STREAM_TYPE
control, since that is for multiplexed streams.
Instead use V4L2_PIX_FMT_MPEG1/2/4.
Initially set up all the values for MPEG-2 dvd-mode, and select the dvd_mode
field if those values match that setup precisely.
Clean up lots of obsolete code relating to the custom ioctls for the MPEG
support.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 11 Mar 2013 08:50:21 +0000 (05:50 -0300)]
[media] go7007: tuner/std related fixes
- The Adlink is initially detected as a sensor board, so the driver config
is set up as if it was a sensor. Later the driver discovers that it really
is a video capture card and that means that the driver configuration has
to be updated for a PAL/NTSC capture card.
- Setup the correct initial std based on the TV tuner type.
- Remember the exact std the user selected, don't map it to STD_PAL or NTSC.
- Use v4l2_disable_ioctl to disable ioctls based on the board config and
drop a lot of checking code in each of those ioctls since that is no longer
needed.
- enum_input should use tvnorms to fill its std field.
- configure the input, std and initial tuner frequency at driver initialization.
- fix std handling in the s2250 driver.
- the code handling scaling for devices without a scaler was broken. This is
now fixed.
- correctly set readbuffers and capability in g/s_parm.
- remove the bogus test for capturemode in s_parm.
- correctly implement enum_framesizes/intervals.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 9 Mar 2013 14:25:09 +0000 (11:25 -0300)]
[media] go7007: add log_status support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 9 Mar 2013 14:08:41 +0000 (11:08 -0300)]
[media] go7007: add prio and control event support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 3 Mar 2013 13:50:34 +0000 (10:50 -0300)]
[media] s2250: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 11 Mar 2013 08:19:59 +0000 (05:19 -0300)]
[media] go7007: convert to the control framework and remove obsolete JPEGCOMP support
Just add a read-only V4L2_CID_JPEG_ACTIVE_MARKER control to replace
the JPEGCOMP support.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 11 Mar 2013 07:48:30 +0000 (04:48 -0300)]
[media] go7007: fix unregister/disconnect handling
- use the v4l2_device's release() callback
- remove the unnecessary ref_count
- don't free usb data structures on disconnect, only do that in the final
release callback.
This is the correct way in order to safely handle disconnect and removal
of modules.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 9 Mar 2013 13:37:52 +0000 (10:37 -0300)]
[media] go7007: remember boot firmware
Don't load it everytime you stop encoding. Instead remember it.
Another reason for not loading it every time is that this could
be called from within the release() file operation, which turns
out to be deadly.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 9 Mar 2013 12:59:16 +0000 (09:59 -0300)]
[media] go7007: fix DMA related errors
- Don't pass data allocated on the stack to usb_control_msg.
- Use dma_mapping_error after calling dma_map_page().
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 17 Feb 2013 12:06:27 +0000 (09:06 -0300)]
[media] go7007: remove current_norm
It's deprecated and replaced by g_std. Since this driver already implements
g_std the use of current_norm can just be removed.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 9 Mar 2013 12:38:03 +0000 (09:38 -0300)]
[media] go7007: go7007: add device_caps and bus_info support to querycap
And don't set the version field, the core does that for you.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>