Commit graph

12348 commits

Author SHA1 Message Date
Marek Szyprowski
4c2625db6f [media] media: vb2: fix incorrect return value
This patch fixes incorrect return value. Errors should be returned
as negative numbers.

Reported-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-19 07:57:25 -02:00
Mauro Carvalho Chehab
1c5c50685a [media] em28xx: implement VIDIOC_ENUM_FRAMESIZES
Pidgin uses gstreamer (and libv4l) to work. Without implementing this ioctl,
it won't detect properly the size range, and driver will fail.

So, this patch is required, in order to use an em27xx webcam, like
Silvercrest.

The pigdin/gstreamer/libv4l needs to be fixed, as it shouldn't assume
that all drivers will implement this optional ioctl, but, at least now,
devices with em28xx have a better chance of working with pidgin.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-19 01:51:42 -02:00
Florian Tobias Schandinat
ef26b7943c Merge branch 'for-florian' of git://gitorious.org/linux-omap-dss2/linux into fbdev-next 2011-10-15 00:19:52 +00:00
Steven Toth
a461e0ad3d [media] cx23885: Stop the risc video fifo before reconfiguring it
Safety reasons. We shouldn't be trying to reconfigure a risc
processor instruction queue unless it's stopped.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:23:20 -03:00
Steven Toth
19696f09da [media] cx23885: Avoid incorrect error handling and reporting
Previous driver over-reported errors and stopped the video fifo
(causing video to stop) if 1) A risc error occured 2) The risc processor
detected that it has missing lines in the video frame 3) The risc fifo
is about to overflow.

The previous driver reported all three of these cases as risc errors
when this is technically not correct. So, the function was cleaned up.

1. Ensure that risc opcode related errors are correctly shown as such,
   and not overly reported for non-risc-opcode cases.
2. Ensure that line sync and overflow errors are not reported as opcode errors.
3. Ensure that only the risc-op-code case can stop the fifo and dump channel
   / risc processor information.

The net result is that if video becomes unstable, cable disconnect, this will
not trigger a stop of the video firmware (due to missing lines errors).

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:22:55 -03:00
Steven Toth
d44aa2d7fc [media] cx23885: Avoid stopping the risc engine during buffer timeout
1. Removed the verbose 'dump channel state to console', very noisy in
   weak signal conditions.
2. No need for the video buffer timeout to stop the risc engine here.
   Clearer and easier to maintain if start_video_dma() is the single
   place that this is done.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:22:14 -03:00
Steven Toth
84f42af665 [media] cx23885: Removed a spurious function cx23885_set_scale()
Unused function removed.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:21:46 -03:00
Steven Toth
6c6f52fd60 [media] cx23885: v4l2 api compliance, set the audioset field correctly
Inform applications that multiple audio inputs are available on
non-tv inputs.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:21:34 -03:00
Steven Toth
fa1e0fd371 [media] cx23885: hook the audio selection functions into the main driver
Ensure audio is established at driver start.
Ensure the correct defaults are established for the audio path if
the cards struct has nothing defined.
Allow the caller to select one of the two baseband input paths.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:21:14 -03:00
Steven Toth
fc1a889df7 [media] cx23885: add generic functions for dealing with audio input selection
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:20:12 -03:00
Steven Toth
e92bcf8d8a [media] cx23885: fixes related to maximum number of inputs and range checking
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:19:46 -03:00
Steven Toth
2cb9ccd461 [media] cx23885: Initial support for the MPX-885 mini-card
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:19:27 -03:00
Steven Toth
52422e3cb1 [media] cx25840: Ensure AUDIO6 and AUDIO7 trigger line-in baseband use
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:19:07 -03:00
Steven Toth
33cdeb35f5 [media] cx23885: Enable audio line in support from the back panel
Add code to program the flatiron internal i2c ADC and pass the
appropriate audio mux enums to the cx25840 driver.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:18:50 -03:00
Steven Toth
8304be888c [media] cx23885: Allow the audio mux config to be specified on a per input basis
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:18:50 -03:00
Steven Toth
2ccdd9a59b [media] cx25840: Enable support for non-tuner LR1/LR2 audio inputs
The change effects cx23885 boards only and preserves support for existing
boards. Essentially, if we're using baseband audio into the cx23885 AV
core then we have to patch registers. The cx23885 driver will call
with either CX25840_AUDIO8 to signify tuner audio or AUDIO7 to
signify baseband audio. If/When we become more comfortable with this change
across a series of products then we may decide to relax the cx23885 only
restriction.

[liplianin@netup.ru: fix missing state declaration]

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:15:37 -03:00
Steven Toth
d9368da718 [media] cx23885: Name an internal i2c part and declare a bitfield by name
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:13:01 -03:00
Steven Toth
1ca3553aa4 [media] cx23885: Ensure VBI buffers timeout quickly - bugfix for vbi hangs during streaming
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:12:48 -03:00
Steven Toth
68776b30fe [media] cx23885: remove channel dump diagnostics when a vbi buffer times out
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:12:22 -03:00
Steven Toth
24465b4485 [media] cx23885: ensure video is streaming before allowing vbi to stream
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:12:01 -03:00
Steven Toth
af76e9f625 [media] cx23885: Ensure the VBI pixel format is established correctly
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:11:42 -03:00
Steven Toth
5ab27e6d31 [media] cx23885: add vbi buffer formatting, window changes and video core changes
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:11:15 -03:00
Steven Toth
4f9c41439c [media] cx23885: vbi line window adjustments
Coding style and printk's cleaned up in following patches.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:10:27 -03:00
Steven Toth
99d389095f [media] cx25840: enable raw cc processing only for the cx23885 hardware
This change is probably good for other boards also, but the change
has limited scope and is reasonably safe.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:10:07 -03:00
Steven Toth
f88fb8e938 [media] cx23885: minor printk cleanups and device registration
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:09:35 -03:00
Steven Toth
79776c89e0 [media] cx23885: initialize VBI support in the core, add IRQ support, register vbi device
Coding style and printk's are cleaned up in subsequent patches

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:09:20 -03:00
Steven Toth
b5f7405004 [media] cx23885: initial support for VBI with the cx23885
A handlful of coding style issue cleaned up in the following patches.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:08:46 -03:00
Steven Toth
6aa07d9e63 [media] cx23885: add two additional defines to simplify VBI register bitmap handling
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:08:28 -03:00
Steven Toth
3273961fe1 [media] cx23885: setup the dma mapping for raw audio support
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:03:46 -03:00
Steven Toth
efa762f597 [media] cx23885: minor function renaming to ensure uniformity
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:03:30 -03:00
Steven Toth
80f1e086e6 [media] cx23885: convert call clients into subdevices
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:02:25 -03:00
Mauro Carvalho Chehab
d5492fb9ed [media] cx23885: Don't use memset on vidioc_ callbacks
vidioc_g_tuner should not do any memset for the parameters. Core
already does that. In particular, V4L2 core now does some handling
for the tuner type, and the tuner-core module relies on that.

So, doing any memset there is a very bad idea.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 17:00:19 -03:00
Mijhail Moreyra
97ce5670fc [media] cx23885: hooks the alsa changes into the video subsystem
Signed-off-by: Mijhail Moreyra <mijhail.moreyra@gmail.com>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 16:59:42 -03:00
Mijhail Moreyra
b12ab3f81c [media] cx23885: correct the contrast, saturation and hue controls
Signed-off-by: Mijhail Moreyra <mijhail.moreyra@gmail.com>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 16:53:20 -03:00
Mijhail Moreyra
18d6447671 [media] cx23885: add definitions for HVR1500 to support audio
Signed-off-by: Mijhail Moreyra <mijhail.moreyra@gmail.com>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 16:52:35 -03:00
Mijhail Moreyra
9e44d63246 [media] cx23885: Add ALSA support
[stoth@kernellabs.com: add it to the makefile and fix snd_card binding]
[liplianin@netup.ru: videobuf: Remove the videobuf_sg_dma_map/unmap functions]

Signed-off-by: Mijhail Moreyra <mijhail.moreyra@gmail.com>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-14 16:44:54 -03:00
Lutz Sammer
39342dbb27 [media] stb0899: Fix slow and not locking DVB-S transponder(s)
In stb0899_status stb0899_check_data the first read of STB0899_VSTATUS
could read old (from previous search) LOOP status bit and the search
fails on a good frequency.

With the patch more transponder could be locked and locks about 2*
faster.

Signed-off-by: Lutz Sammer<johns98@gmx.net>
Reviewed-by: Manu Abraham<manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-11 18:02:57 -03:00
Dan Carpenter
06bd801c23 [media] rc/ir-lirc-codec: cleanup __user tags
The code here treated user pointers correctly, but the __user tags
weren't used correctly so it caused Sparse warnings:

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-11 17:48:36 -03:00
Malcolm Priestley
e305288547 [media] it913x-fe changes to power up and down of tuner
Currently the tuner is constantly powered causing these effects.
1. Remembering last tune channel causing corruptions of changing channel.
2. Causing corruption on other frontend.
3. Higher current in standby of demodulator with clock running.

Power sequence now follows;
Power Up
Tuner on -> Frontend suspend off -> Tuner clk on
Power Down
Frontend suspend on -> Tuner clk off -> Tuner off

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-08 08:03:27 -03:00
Javier Martinez Canillas
64933337e3 [media] tvp5150: Add video format registers configuration values
The tvp5150 video decoder has two operation modes to configure the video
standard used.

If auto-switch mode is enable, the device can sense the signal and detect which
video standard the device is operating. Also the device can be forced to use a
user defined video standard.

Each operation mode uses a different register and the bitmask values to
represent each standard is different.

So we add video standard constants for both autoswitch and no-autoswitch mode.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-08 08:01:52 -03:00
Paul Gortmaker
86caf81138 [media] drivers/media: fix dependencies in video mt9t001/mt9p031
Both mt9t001.c and mt9p031.c have two identical issues, those
being that they will need module.h inclusion for the upcoming
cleanup going on there, and that their dependencies don't limit
selection of configs that will fail to compile as follows:

The related config options are CONFIG_MEDIA_CONTROLLER and
CONFIG_VIDEO_V4L2_SUBDEV_API.  Looking at the code, it appears
that the driver was never intended to work without these enabled,
so add a dependency on CONFIG_VIDEO_V4L2_SUBDEV_API, which in
turn already has a dependency on CONFIG_MEDIA_CONTROLLER.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-08 08:01:46 -03:00
Mauro Carvalho Chehab
d56ae6fbf3 [media] em28xx: Add VIDIOC_QUERYSTD support
Allow subdevs to return the detected standards

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-08 08:01:40 -03:00
Mauro Carvalho Chehab
5d1ed98683 [media] msp3400: Add standards detection to the driver
As msp3400 allows standards detection, add support for it. That
efectivelly means that devices with msp3400 can now implement
VIDIOC_QUERYSTD, and it will provide very good detection for
the standard, specially if combined with a video decoder detection.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-08 08:01:34 -03:00
Mauro Carvalho Chehab
a5abdb6044 [media] pvrusb2: initialize standards mask before detecting standard
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-08 08:00:54 -03:00
Mauro Carvalho Chehab
e41567a61d [media] saa7115: Trust that V4L2 core will fill the mask
Instead of using V4L2_STD_ALL when no standard is detected,
trust that the maximum allowed standards are already filled by
the V4L2 core. It is better this way, as the bridge and/or the audio
decoder may have some extra restrictions to some video standards.

This also allow other devices like audio and tuners to contribute to
standards detection, when they support such feature.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-08 08:00:44 -03:00
Mauro Carvalho Chehab
8715e6cbae [media] v4l2-ioctl: Fill the default value for VIDIOC_QUERYSTD
According with the V4L2 API spec:

	"When detection is not possible or fails, the set must contain
	 all standards supported by the current video input or output."

The V4L2 core has the mask with all supported standards already. So,
apply it. Driver and subdevs can then just remove standards from the
mask, as they're able of detecting audio, video and frames frequency.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-08 08:00:35 -03:00
Mauro Carvalho Chehab
7383a47395 [media] pvrusb2: implement VIDIOC_QUERYSTD
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-08 08:00:26 -03:00
Mauro Carvalho Chehab
b728666ba5 [media] saa7115: Fix standards detection
There are several bugs at saa7115 standards detection:

After the fix, the driver is returning the proper standards,
as tested with 3 different broadcast sources:

On an invalid channel (without any TV signal):
[ 4394.931630] saa7115 15-0021: Status byte 2 (0x1f)=0xe0
[ 4394.931635] saa7115 15-0021: detected std mask = 00ffffff

With a PAL/M signal:
[ 4410.836855] saa7115 15-0021: Status byte 2 (0x1f)=0xb1
[ 4410.837727] saa7115 15-0021: Status byte 1 (0x1e)=0x82
[ 4410.837731] saa7115 15-0021: detected std mask = 00000900

With a NTSC/M signal:
[ 4422.383893] saa7115 15-0021: Status byte 2 (0x1f)=0xb1
[ 4422.384768] saa7115 15-0021: Status byte 1 (0x1e)=0x81
[ 4422.384772] saa7115 15-0021: detected std mask = 0000b000

Tests were done with a WinTV PVR USB2 Model 29xx card.

Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-08 08:00:17 -03:00
Rafael J. Wysocki
9696cc9007 Merge branch 'pm-qos' into pm-for-linus
* pm-qos:
  PM / QoS: Update Documentation for the pm_qos and dev_pm_qos frameworks
  PM / QoS: Add function dev_pm_qos_read_value() (v3)
  PM QoS: Add global notification mechanism for device constraints
  PM QoS: Implement per-device PM QoS constraints
  PM QoS: Generalize and export constraints management code
  PM QoS: Reorganize data structs
  PM QoS: Code reorganization
  PM QoS: Minor clean-ups
  PM QoS: Move and rename the implementation files
2011-10-07 23:17:07 +02:00
David S. Miller
88c5100c28 Merge branch 'master' of github.com:davem330/net
Conflicts:
	net/batman-adv/soft-interface.c
2011-10-07 13:38:43 -04:00
Archit Taneja
11354dd58d OMAPDSS/OMAP_VOUT: Fix incorrect OMAP3-alpha compatibility setting
On OMAP3, in order to enable alpha blending for LCD and TV managers, we needed
to set LCDALPHABLENDERENABLE/TVALPHABLENDERENABLE bits in DISPC_CONFIG. On
OMAP4, alpha blending is always enabled by default, if the above bits are set,
we switch to an OMAP3 compatibility mode where the zorder values in the pipeline
attribute registers are ignored and a fixed priority is configured.

Rename the manager_info member "alpha_enabled" to "partial_alpha_enabled" for
more clarity. Introduce two dss_features FEAT_ALPHA_FIXED_ZORDER and
FEAT_ALPHA_FREE_ZORDER which represent OMAP3-alpha compatibility mode and OMAP4
alpha mode respectively. Introduce an overlay cap for ZORDER. The DSS2 user is
expected to check for the ZORDER cap, if an overlay doesn't have this cap, the
user is expected to set the parameter partial_alpha_enabled. If the overlay has
ZORDER cap, the DSS2 user can assume that alpha blending is already enabled.

Don't support OMAP3 compatibility mode for now. Trying to read/write to
alpha_blending_enabled sysfs attribute issues a warning for OMAP4 and does not
set the LCDALPHABLENDERENABLE/TVALPHABLENDERENABLE bits.

Change alpha_enabled to partial_alpha_enabled in the omap_vout driver. Use
overlay cap "OMAP_DSS_OVL_CAP_GLOBAL_ALPHA" to check if overlay supports alpha
blending or not. Replace this with checks for VIDEO1 pipeline.

Cc: linux-media@vger.kernel.org
Cc: Lajos Molnar <molnar@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-10-03 16:51:54 +03:00
Dan Carpenter
2f4cf2c3a9 [media] dib9000: release a lock on error
This lock should be released as well on the error path.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Patrick Boettcher <Patrick.Boettcher@dibcom.fr>
Cc: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-30 13:32:56 -03:00
Dan Carpenter
4c4364e022 [media] mxl111sf: fix a couple precedence bugs
Negate has higher precedence than bitwise AND.  I2C_M_RD is 0x1 so
the original code is equivelent to just checking if (!msg->flags).

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Steven Toth <stoth@kernellabs.com>
Cc: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-30 13:32:00 -03:00
Tomi Valkeinen
212b0d50e2 OMAPDSS: remove vaddr from overlay info
overlay_info struct, used to configure overlays, currently includes both
physical and virtual addresses for the pixels. The vaddr was added to
support more exotic configurations where CPU would be used to update a
display, but it is not currently used and there has been no interest in
the feature. Using CPU to update a screen is also less interesting now
that OMAP4 has two LCD outputs.

This patch removes the vaddr field, and modifies the users of omapdss
accordingly. This makes the use of omapdss a bit simpler, as the user
doesn't need to think if it needs to give the vaddr.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-09-30 16:17:32 +03:00
Joe Perches
bfb9035c98 treewide: Correct spelling of successfully in comments
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-27 18:08:04 +02:00
Paul Bolle
395cf9691d doc: fix broken references
There are numerous broken references to Documentation files (in other
Documentation files, in comments, etc.). These broken references are
caused by typo's in the references, and by renames or removals of the
Documentation files. Some broken references are simply odd.

Fix these broken references, sometimes by dropping the irrelevant text
they were part of.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-27 18:08:04 +02:00
Mauro Carvalho Chehab
9e83b3e434 Revert "[media] siano: apply debug flag to module level"
This reverts commit ea3709435c.

As reported by Stephen Rothwell:

After merging the v4l-dvb tree, today's linux-next build (x86_64
allmodconfig) failed like this:

ERROR: "sms_dbg" [drivers/media/dvb/siano/smsusb.ko] undefined!
ERROR: "sms_dbg" [drivers/media/dvb/siano/smsdvb.ko] undefined!

Caused by commit ea3709435c ("[media] siano: apply debug flag to module
level").

Relevant config:
CONFIG_SMS_SIANO_MDTV=m
CONFIG_SMS_USB_DRV=m
CONFIG_SMS_SDIO_DRV=m

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-26 16:50:14 -03:00
Michael Olbrich
0f910bf000 [media] v4l: mem2mem: add wait_{prepare,finish} ops to m2m_testdev
These are necessary to prevent dead-locks e.g. if one thread waits
in dqbuf at one end and another tries to queue a buffer at the
other end.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Pawel Osciak <pawel@osciak.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-26 08:14:46 -03:00
Tomasz Stanislawski
0689133b7f [media] s5p-tv: fix mbus configuration
This patch fixes mbus configuration between Mixer, SDO and HDMI.  The SDO
accepts only YUV444 on input. The HDMI in DVI mode accepts only RGB888. Now
Mixer is choosing proper output format depending on mbus format.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-26 08:04:31 -03:00
Tomasz Stanislawski
17b27478cc [media] s5p-tv: hdmi: use DVI mode
Current version of the driver does not support HDMI features
not present in DVI standard. Therefore DVI mode is used to
keep compatibility with DVI devices.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-26 08:04:16 -03:00
Hatim Ali
0f6c5653f8 [media] s5p-tv: Add PM_RUNTIME dependency
The TVOUT driver requires PM_RUNTIME support for proper clock
enabling.

Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-26 08:03:44 -03:00
Chris Rankin
778f295080 [media] em28xx: replug locking cleanup
Simplifies the locking by moving the em28xx_init_extension() call until
em28xx_usb_probe() has finished with the dev->lock mutex. It therefore
makes the second and subsequent "plugging" events logically identical to
the first "plugging" event when the em28xx-dvb and em28xx-alsa modules
must be loaded (i.e. registered).

Basically, em28xx_usb_probe() requests that em28xx-dvb be loaded and
also triggers udev to initialise the V4L2 devices. These two events are
serialised by the dev->lock mutex but the order that they happen in is
undefined. But this has always been the case anyway.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-25 23:12:35 -03:00
Chris Rankin
f055815fd0 [media] em28xx: remove unused prototypes
This patch just removes the prototypes for the two functions that I've already
deleted in my previous patches.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-25 23:11:54 -03:00
Chris Rankin
b868a537b6 [media] em28xx: fix deadlock when unplugging and replugging a DVB adapter
This fixes the deadlock that occurs with either multiple PCTV 290e adapters or when a single PCTV 290e adapter is replugged.

For DVB devices, the device lock must now *not* be held when adding/removing either a device or an extension to the respective lists. (Because em28xx_init_dvb() will want to take the lock instead).

Conversely, for Audio-Only devices, the device lock *must* be held when adding/removing either a device or an extension to the respective lists.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-25 09:47:59 -03:00
Guy Martin
4a6c4a9567 [media] stv090x: set status bits when there is no lock
Currently, the stv090x driver only set the status bits to SCVYL when
there is a lock. This patch set the right bits even if there is no lock.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-25 08:45:18 -03:00
Hans Petter Selasky
aad04c7743 [media] Increase a timeout, so that bad scheduling does not accidentially cause a timeout
--HPS

>From 18faaafc9cbbe478bb49023bbeae490149048560 Mon Sep 17 00:00:00 2001

Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-25 08:44:10 -03:00
Marko Ristola
79d06d4dff [media] Refactor Mantis DMA transfer to deliver 16Kb TS data per interrupt
With VDR streaming HDTV into network, generating an interrupt once per 16kb,
implemented in this patch, seems to support more robust throughput with HDTV.

Fix leaking almost 64kb data from the previous TS after changing the TS.
One effect of the old version was, that the DMA transfer and driver's
DMA buffer access might happen at the same time - a race condition.

Signed-off-by: Marko M. Ristola <marko.ristola@kolumbus.fi>
Reviewed-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-25 08:43:06 -03:00
Florent AUDEBERT
fa0d118739 [media] stb0899: Removed an extra byte sent at init on DiSEqC bus
I noticed a stray 0x00 at init on DiSEqC bus (KNC1 DVB-S2) with a DiSEqC
tool analyzer.

I removed the register from initialization table and all seem to go well
(at least for my KNC board).

Signed-off-by: Florent Audebert <florent.audebert@anevia.com>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-25 08:41:23 -03:00
Chris Rankin
d7222e7d6f [media] em28xx: fix race on disconnect
This patch closes the race on the device and extension lists at USB disconnect
time. Previously, the device was removed from the device list during
em28xx_release_resources(), and then passed to the em28xx_close_extension()
function so that all extensions could run their fini() operations. However, this
left a (brief, theoretical, highly unlikely ;-)) window between these two calls
during which a new module could call em28xx_register_extension(). The result
would have been that the em28xx_usb_disconnect() function would also have passed
the device to the new extension's fini() function, despite never having called
the extension's init() function.

This patch also restores em28xx_close_extension()'s symmetry with
em28xx_init_extension(), and establishes the property that every device in the
device list must have been initialised for every extension in the extension list.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-24 12:12:48 -03:00
Andy Walls
bd829e9d1d [media] cx23885, cx25840: Provide IR Rx timeout event reports
(Resending because Mauro reported losing some emails on IRC)

Provide CX2388[578] IR receive timeout (RTO) reports in the
final space raw event sent up the chain to the raw IR pulse
decoders. This should allow the lirc decoder to actually
measure the inter-transmission gap properly.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-24 12:00:32 -03:00
Sylwester Nawrocki
5b3bdfce67 [media] m5mols: Remove superfluous irq field from the platform data struct
There is no need to put the IRQ number in driver's private platform
data structure as this can also be passed in struct i2c_lient.irq.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-24 00:23:03 -03:00
Sylwester Nawrocki
12ecf56d1a [media] s5p-fimc: Convert to use generic media bus polarity flags
Switch to generic media bus signal polarity flags and allow
configuring the FIELD signal polarity.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-24 00:22:31 -03:00
Igor M. Liplianin
4e2c53fde6 [media] dvb: Add support for pctv452e
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-24 00:07:42 -03:00
Pekka Enberg
600836cc7b [media] media, rc: Use static inline functions to kill warnings
This patch converts some ifdef'd wrapper functions from macros to static inline
functions to kill the following warnings issued by GCC:

    CC [M]  drivers/media/rc/ir-raw.o
  drivers/media/rc/ir-raw.c: In function ‘init_decoders’:
  drivers/media/rc/ir-raw.c:353:2: warning: statement with no effect [-Wunused-value]
  drivers/media/rc/ir-raw.c:354:2: warning: statement with no effect [-Wunused-value]
  drivers/media/rc/ir-raw.c:355:2: warning: statement with no effect [-Wunused-value]
  drivers/media/rc/ir-raw.c:356:2: warning: statement with no effect [-Wunused-value]
  drivers/media/rc/ir-raw.c:357:2: warning: statement with no effect [-Wunused-value]
  drivers/media/rc/ir-raw.c:359:2: warning: statement with no effect [-Wunused-value]

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: "David Härdeman" <david@hardeman.nu>
Cc: Jarod Wilson <jarod@redhat.com>
Cc: <linux-media@vger.kernel.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:50:52 -03:00
Jean-François Moine
ee7dd4e06e [media] gspca - main: Display the subdriver name and version at probe time
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:31:52 -03:00
Jean-François Moine
f22123faed [media] gspca - main: Version change to 2.14.0
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:31:43 -03:00
Frank Schaefer
114cfbdf49 [media] gspca - sn9c20x: Fix status LED device 0c45:62b3
Tested with webcam "SilverCrest WC2130".

Signed-off-by: Frank Schaefer <fschaefer.oss@googlemail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:31:21 -03:00
Wolfram Sang
e177129935 [media] gspca - zc3xx: New webcam 03f0:1b07 HP Premium Starter Cam
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:31:12 -03:00
Jean-François Moine
6507b4232c [media] gspca - spca1528: Don't force the USB transfer alternate setting
As the choice of the alternate setting has been enhanced in the gspca main,
forcing its number here is no more useful.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:31:03 -03:00
Jean-François Moine
3e12950d86 [media] gspca - spca1528: Change the JPEG quality of the images
The JPEG quality was guessed as around 82%. Information in ms-win drivers
says it should be 85%.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:30:39 -03:00
Jean-François Moine
0dd8269627 [media] gspca - spca1528: Add some comments and update copyright
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:30:24 -03:00
Jean-François Moine
9ba4a4ba3c [media] gspca - spca1528: Increase the status waiting time
Some webcams ask for a greater time to start.
This patch increases the delay before timeout error on capture start.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:30:06 -03:00
Jean-François Moine
8f12b1ab2f [media] gspca - topro: New subdriver for Topro webcams
This driver is based on Anders Blomdell's source proposed in april 2009.
It has been extended to handle the tp6810 bridge and the soi763a sensor.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:28:49 -03:00
Jean-François Moine
4274d84ce8 [media] gspca - main: Handle the xHCI error on usb_set_interface()
This patch is adapted from a patch from Sarah Sharp (2010/05/03).
The xHCD handler checks the USB bandwidth on usb_set_interface()
instead of on usb_submit_urb().
Now, the same treatment is applied in case of error of both functions.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:23:07 -03:00
Jean-François Moine
27b12023d7 [media] gspca - main: Use a better altsetting for image transfer
Previously image transfer used to use the highest altsetting, which, most of
the time, took the whole USB bandwidth.
Now, the altsetting is chosen according to an estimation of the bandwidth
needed for image transfer.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:22:36 -03:00
Jean-François Moine
2d06d5dd2d [media] gspca - benq: Remove the useless function sd_isoc_init
The sd_isoc_init() did only a set interface which is done in gspca main.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:20:15 -03:00
tvboxspy
7c2808e2fd [media] it913x-fe: correct tuner settings
Correct tuner settings for more accuracy. This now makes the tuner
 section more compatible with other versions of the IT913X
 series.

TODOs
Version 2 chip

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:08:17 -03:00
tvboxspy
2ba0f94796 [media] it913x: add remote control support
Add remote support for KWORLD UB499-2T-T09

The remote supplied is the same as KWORLD_315U.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:08:07 -03:00
Arvydas Sidorenko
7b1c8f58fc [media] stk-webcam.c: webcam LED bug fix
This is an improved version of the patch I sent a little ago.

The problem was:
	On my DC-1125 webcam chip from Syntek, whenever the webcam turns
	on, the LED light on it is turned on also and never turns off again unless
	system is shut downed or restarted.

The previous version seemed to break some other laptop webcam work. Thanks
to Andrea Anacleto for the bug report and solution.

Signed-off-by: Andrea Anacleto <andreaanacleto@libero.it>
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:07:59 -03:00
Martin Hostettler
69967a71ae [media] v4l subdev: add dispatching for VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER
Ioctls on the subdevs node currently don't dispatch the register access debug
driver callbacks. Add the dispatching with the same security checks are for
non subdev video nodes (i.e. only capable(CAP_SYS_ADMIN may call the register
access ioctls).

Signed-off-by: Martin Hostettler <martin@neutronstar.dyndns.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:07:56 -03:00
Manjunath Hadli
eb39a303d5 [media] davinci vpbe: remove unused macro
remove VPBE_DISPLAY_SD_BUF_SIZE as it is no longer used.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:07:49 -03:00
Jose Alberto Reguero
8c0bc03c80 [media] ttusb2: TT CT-3650 CI support
Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 23:07:35 -03:00
Stephan Lachowsky
25ad8a8dde [media] uvcvideo: Add a mapping for H.264 payloads
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 20:07:59 -03:00
Al Cooper
3e0ac6717b [media] media: Fix a UVC performance problem on systems with non-coherent DMA
The UVC driver uses usb_alloc_coherent() to allocate DMA data buffers.
On systems without coherent DMA this ends up allocating buffers in
uncached memory. The subsequent memcpy's done to coalesce the DMA
chunks into contiguous buffers then run VERY slowly. On a MIPS test
system the memcpy is about 200 times slower. This issue prevents the
system from keeping up with 720p YUYV data at 10fps.

The following patch uses kmalloc to alloc the DMA buffers instead of
usb_alloc_coherent on systems without coherent DMA. With this patch
the system was easily able to keep up with 720p at 10fps.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 20:07:47 -03:00
Laurent Pinchart
227bd5b353 [media] uvcvideo: Remove deprecated UVCIOC ioctls
The UVCIOC_CTRL_ADD, UVCIOC_CTRL_MAP_OLD, UVCIOC_CTRL_GET and
UVCIOC_CTRL_SET ioctls are deprecated and were scheduled for removal for
v2.6.42. As v2.6.42 == v3.2, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 20:06:51 -03:00
Arne Caspari
fd3e9f2f9a [media] uvcvideo: Detect The Imaging Source CCD cameras by vendor and product ID
The Imaging Source CCD cameras use a vendor specific interface class
even though they are actually UVC compliant.

Signed-off-by: Arne Caspari <arne@unicap-imaging.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 20:06:30 -03:00
Mauro Carvalho Chehab
547d42eac1 [media] rc tables: include linux/module.h
Prevents errors when merging with -next:

drivers/media/rc/keymaps/rc-snapstream-firefly.c:105:16: error: expected declaration specifiers or ‘...’ before string constant
drivers/media/rc/keymaps/rc-snapstream-firefly.c:106:15: error: expected declaration specifiers or ‘...’ before string constant

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 15:33:27 -03:00
Igor M. Liplianin
cff4fa8415 [media] altera-stapl: it is time to move out from staging
[mchehab@redhat.com: Fix a merge conflict]
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 15:00:57 -03:00
Igor M. Liplianin
08347cdd2d [media] cx23885: fix type error
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 14:52:39 -03:00
Mauro Carvalho Chehab
be30497085 [media] move tm6000 to drivers/media/video
The serious bugs got fixed already.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23 09:32:35 -03:00
Anssi Hannula
3a7a62378b [media] ati_remote: update Kconfig description
The ati_remote driver supports more remotes nowadays, update the
description to reflect that.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-22 10:55:10 -03:00
Anssi Hannula
999d6bc9b1 [media] ati_remote: add support for SnapStream Firefly remote
The protocol differs by having two toggle bits in the scancode. Since
one of the bits is otherwise unused, we can safely handle the bits
unconditionally.

[mchehab@redhat.com: Fix some bad whitespacing]
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-22 10:54:40 -03:00
Anssi Hannula
175fcecf79 [media] ati_remote: add keymap for Medion X10 RF remote
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-22 10:53:18 -03:00
Anssi Hannula
0224e0401f [media] ati_remote: fix check for a weird byte
The ati_remote_dump() function tries to not print "Weird byte" warning
for 1-byte responses that contain 0xff or 0x00, but it doesn't work
properly as it simply falls back to the "Weird data" warning in the else
clause.

Fix that by adding an inner if clause.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-22 10:52:35 -03:00
Anssi Hannula
44fd0b600f [media] ati_remote: parent input devices to usb interface
Parent the input devices to usb_interface instead of usb_device. This
fixes (at least) persistent input device nodes.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-22 10:52:03 -03:00
Anssi Hannula
c34516e599 [media] ati_remote: migrate to the rc subsystem
The keycode mangling algorithm is kept the same, so the new external
keymap has the same values as the old static table.

[mchehab@redhat.com: Fix some bad whitespacing]
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-22 10:51:31 -03:00
Anssi Hannula
9688efda3f [media] move ati_remote driver from input/misc to media/rc
The driver will be migrated to the RC driver API in a following
commit.

[mchehab@redhat.com: Fix some bad whitespacing]
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-22 10:47:41 -03:00
Andy Shevchenko
653822b927 [media] adp1653: set media entity type
The type of a media entity is default for this driver. This patch makes it
explicitly defined as MEDIA_ENT_T_V4L2_SUBDEV_FLASH.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-22 10:26:46 -03:00
Mats Randgaard
425b91c94a [media] TVP7002: Changed register values
Register values changed according to the data sheet and Texas Instruments DaVinci_PSP_03_02_00_37.
	- TVP7002_RGB_COARSE_CLAMP_CTL changed to the default value in data sheet.
 	- TVP7002_HPLL_PHASE_SEL deleted because the registers write to reserved bits. The default value works fine.

Signed-off-by: Mats Randgaard <mats.randgaard@tandberg.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-22 10:25:38 -03:00
Mats Randgaard
ab0ab19032 [media] TVP7002: Return V4L2_DV_INVALID if any of the errors occur
Signed-off-by: Mats Randgaard <mats.randgaard@tandberg.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-22 10:25:14 -03:00
David S. Miller
8decf86879 Merge branch 'master' of github.com:davem330/net
Conflicts:
	MAINTAINERS
	drivers/net/Kconfig
	drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
	drivers/net/ethernet/broadcom/tg3.c
	drivers/net/wireless/iwlwifi/iwl-pci.c
	drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
	drivers/net/wireless/rt2x00/rt2800usb.c
	drivers/net/wireless/wl12xx/main.c
2011-09-22 03:23:13 -04:00
Joerg Roedel
e74d83aad3 [media] omap3isp: Fix build error in ispccdc.c
The following build error occurs with 3.1-rc5:

  CC      drivers/media/video/omap3isp/ispccdc.o

This patch adds the missing 'linux/slab.h' include to fix the problem.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 22:18:26 -03:00
Laurent Pinchart
4d9b2ebd33 [media] uvcvideo: Fix crash when linking entities
The uvc_mc_register_entity() function wrongfully selects the
media_entity associated with a UVC entity when creating links. This
results in access to uninitialized media_entity structures and can hit a
BUG_ON statement in media_entity_create_link(). Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 22:18:07 -03:00
Dave Young
236c5441d7 [media] v4l: Make sure we hold a reference to the v4l2_device before using it
v4l2_device_disconnect() calls dev_get_drvdata() and dev_set_drvdata()
on the device it received in v4l2_device_register(). Get a reference to
the device in v4l2_device_register() to make sure it won't disappear as
long as we need it.

Reported-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 22:17:53 -03:00
Hans Verkuil
8280b662df [media] v4l: Fix use-after-free case in v4l2_device_release
Drivers that have no v4l2_device release callback might free the
v4l2_device instance in the video_device release callback. Make sure we
don't access the v4l2_device instance after it gets freed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 22:17:43 -03:00
Ming Lei
dd182e5416 [media] uvcvideo: Set alternate setting 0 on resume if the bus has been reset
If the bus has been reset on resume, set the alternate setting to 0.
This should be the default value, but some devices crash or otherwise
misbehave if they don't receive a SET_INTERFACE request before any other
video control request.

Microdia's 0c45:6437 camera has been found to require this change or it
will stop sending video data after resume.

uvc_video.c]

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 22:17:14 -03:00
archit taneja
5ebbf72dc5 [media] OMAP_VOUT: Fix build break caused by update_mode removal in DSS2
The DSS2 driver does not support the configuration of the update_mode of a
panel anymore. Remove the setting of update_mode done in omap_vout_probe().
Ignore configuration of TE since omap_vout driver doesn't support manual update
displays anyway.

Signed-off-by: Archit Taneja <archit@ti.com>
Tested-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 22:16:08 -03:00
Lutz Sammer
699cc1962c [media] TT-budget S2-3200 cannot tune on HB13E DVBS2 transponder
The FEC fix patch fixed locking on 11,681 Ghz, but not on 12,692 Ghz for
me.

Reviewed-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 17:06:56 -03:00
tvboxspy
810fda9bcc [media] [2/2,ver,1.90] DM04/QQBOX Reduce USB buffer size
Reduced unused buffer size to 64.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 16:55:30 -03:00
tvboxspy
95c21c4158 [media] [1/2,ver,1.89] DM04/QQBOX Interupt Urb and Timing changes
Reduce buffer size of Interupt urb to 128 bytes and polling
interval to 8.

The devices buffer appears to only handle a maxium of 40 bytes.
If the buffer is full a slowing effect is noticed causing occasionnal
dropped streaming packets.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 16:55:17 -03:00
Yang Ruirui
69803ecf3a [media] v4l2: uvcvideo use after free bug fix
Unplugging uvc video camera trigger following oops:

eeepc kernel: [ 1393.500719] usb 3-2: USB disconnect, device number 4
eeepc kernel: [ 1393.504351] uvcvideo: Failed to resubmit video URB (-19).
eeepc kernel: [ 1495.428853] BUG: unable to handle kernel paging request at 6b6b6bcb
eeepc kernel: [ 1495.429017] IP: [<b0358d37>] dev_get_drvdata+0x17/0x20
eeepc kernel: [ 1495.429017] *pde = 00000000
eeepc kernel: [ 1495.429017] Oops: 0000 [#1] DEBUG_PAGEALLOC
eeepc kernel: [ 1495.429017]
eeepc kernel: [ 1495.429017] Pid: 3476, comm: cheese Not tainted 3.1.0-rc3-00270-g7a54f5e-dirty #485 ASUSTeK Computer INC. 900/900
eeepc kernel: [ 1495.429017] EIP: 0060:[<b0358d37>] EFLAGS: 00010202 CPU: 0
eeepc kernel: [ 1495.429017] EIP is at dev_get_drvdata+0x17/0x20
eeepc kernel: [ 1495.429017] EAX: 6b6b6b6b EBX: eb08d870 ECX: 00000000 EDX: eb08d930
eeepc kernel: [ 1495.429017] ESI: eb08d870 EDI: eb08d870 EBP: d3249cac ESP: d3249cac
eeepc kernel: [ 1495.429017]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
eeepc kernel: [ 1495.429017] Process cheese (pid: 3476, ti=d3248000 task=df46d870 task.ti=d3248000)
eeepc kernel: [ 1495.429017] Stack:
eeepc kernel: [ 1495.429017]  d3249cb8 b03e77a1 d307b840 d3249ccc b03e77d1 d307b840 eb08d870 eb08d830
eeepc kernel: [ 1495.429017]  d3249ce4 b03ed3b7 00000246 d307b840 eb08d870 d3021b80 d3249cec b03ed565
eeepc kernel: [ 1495.429017]  d3249cfc b03e044d e8323d10 b06e013c d3249d18 b0355fb9 fffffffe d3249d1c
eeepc kernel: [ 1495.429017] Call Trace:
eeepc kernel: [ 1495.429017]  [<b03e77a1>] v4l2_device_disconnect+0x11/0x30
eeepc kernel: [ 1495.429017]  [<b03e77d1>] v4l2_device_unregister+0x11/0x50
eeepc kernel: [ 1495.429017]  [<b03ed3b7>] uvc_delete+0x37/0x110
eeepc kernel: [ 1495.429017]  [<b03ed565>] uvc_release+0x25/0x30
eeepc kernel: [ 1495.429017]  [<b03e044d>] v4l2_device_release+0x9d/0xc0
eeepc kernel: [ 1495.429017]  [<b0355fb9>] device_release+0x19/0x90
eeepc kernel: [ 1495.429017]  [<b03adfdc>] ? usb_hcd_unlink_urb+0x7c/0x90
eeepc kernel: [ 1495.429017]  [<b026b99c>] kobject_release+0x3c/0x90
eeepc kernel: [ 1495.429017]  [<b026b960>] ? kobject_del+0x30/0x30
eeepc kernel: [ 1495.429017]  [<b026ca4c>] kref_put+0x2c/0x60
eeepc kernel: [ 1495.429017]  [<b026b88d>] kobject_put+0x1d/0x50
eeepc kernel: [ 1495.429017]  [<b03b2385>] ? usb_autopm_put_interface+0x25/0x30
eeepc kernel: [ 1495.429017]  [<b03f0e5d>] ? uvc_v4l2_release+0x5d/0xd0
eeepc kernel: [ 1495.429017]  [<b0355d2f>] put_device+0xf/0x20
eeepc kernel: [ 1495.429017]  [<b03dfa96>] v4l2_release+0x56/0x60
eeepc kernel: [ 1495.429017]  [<b019c8dc>] fput+0xcc/0x220
eeepc kernel: [ 1495.429017]  [<b01990f4>] filp_close+0x44/0x70
eeepc kernel: [ 1495.429017]  [<b012b238>] put_files_struct+0x158/0x180
eeepc kernel: [ 1495.429017]  [<b012b100>] ? put_files_struct+0x20/0x180
eeepc kernel: [ 1495.429017]  [<b012b2a0>] exit_files+0x40/0x50
eeepc kernel: [ 1495.429017]  [<b012b9e7>] do_exit+0x5a7/0x660
eeepc kernel: [ 1495.429017]  [<b0135f72>] ? __dequeue_signal+0x12/0x120
eeepc kernel: [ 1495.429017]  [<b055edf2>] ? _raw_spin_unlock_irq+0x22/0x30
eeepc kernel: [ 1495.429017]  [<b012badc>] do_group_exit+0x3c/0xb0
eeepc kernel: [ 1495.429017]  [<b015792b>] ? trace_hardirqs_on+0xb/0x10
eeepc kernel: [ 1495.429017]  [<b013755f>] get_signal_to_deliver+0x18f/0x570
eeepc kernel: [ 1495.429017]  [<b01020f7>] do_signal+0x47/0x9e0
eeepc kernel: [ 1495.429017]  [<b055edf2>] ? _raw_spin_unlock_irq+0x22/0x30
eeepc kernel: [ 1495.429017]  [<b015792b>] ? trace_hardirqs_on+0xb/0x10
eeepc kernel: [ 1495.429017]  [<b0123300>] ? T.1034+0x30/0xc0
eeepc kernel: [ 1495.429017]  [<b055c45f>] ? schedule+0x29f/0x640
eeepc kernel: [ 1495.429017]  [<b0102ac8>] do_notify_resume+0x38/0x40
eeepc kernel: [ 1495.429017]  [<b055f154>] work_notifysig+0x9/0x11
eeepc kernel: [ 1495.429017] Code: e5 5d 83 f8 01 19 c0 f7 d0 83 e0 f0 c3 8d b4 26 00 00 00 00 55 85 c0 89 e5 75 09 31 c0 5d c3 90 8d 74 26 00 8b 40 04 85 c0 74 f0 <8b> 40 60 5d c3 8d 74 26 00 55 89 e5 53 89 c3 83 ec 04 8b 40 04
eeepc kernel: [ 1495.429017] EIP: [<b0358d37>] dev_get_drvdata+0x17/0x20 SS:ESP 0068:d3249cac
eeepc kernel: [ 1495.429017] CR2: 000000006b6b6bcb
eeepc kernel: [ 1495.466975] uvcvideo: Failed to resubmit video URB (-27).
eeepc kernel: [ 1495.467860] uvcvideo: Failed to resubmit video URB (-27).
eeepc kernel: last message repeated 3 times
eeepc kernel: [ 1495.512610] ---[ end trace 73ec16848794e5a5 ]---

For uvc device, dev->vdev.dev is the &intf->dev,
uvc_delete code is as below:
	usb_put_intf(dev->intf);
	usb_put_dev(dev->udev);

	uvc_status_cleanup(dev);
	uvc_ctrl_cleanup_device(dev);

	if (dev->vdev.dev)
		v4l2_device_unregister(&dev->vdev);

Fix it by get_device in v4l2_device_register and put_device in v4l2_device_disconnect

Reported-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 16:52:52 -03:00
Chris Rankin
9da9f356dc [media] em28xx: Fix em28xx_devused cleanup logic on error
On 04/09/11 00:49, Mauro Carvalho Chehab wrote:
> This is an automatic generated email to let you know that the following patch were queued at the
> http://git.linuxtv.org/media_tree.git tree:
>
> Subject: [media] em28xx: use atomic bit operations for devices-in-use mask
> Author:  Chris Rankin<rankincj@yahoo.com>
> Date:    Sat Aug 20 08:21:03 2011 -0300
>
> Use atomic bit operations for the em28xx_devused mask, to prevent an
> unlikely race condition should two adapters be plugged in
> simultaneously. The operations also clearer than explicit bit
> manipulation anyway.
>
> Signed-off-by: Chris Rankin<rankincj@yahoo.com>
> Signed-off-by: Mauro Carvalho Chehab<mchehab@redhat.com>
>
>   drivers/media/video/em28xx/em28xx-cards.c |   33 ++++++++++++++---------------

I think you missed this line in the merge.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 16:45:54 -03:00
Laurent Pinchart
0a54b86a71 [media] mt9t001: Aptina (Micron) MT9T001 3MP sensor driver
The MT9T001 is a parallel 3MP sensor from Aptina (formerly Micron)
controlled through I2C.

The driver creates a V4L2 subdevice. It currently supports binning and
cropping, and the gain, exposure, test pattern and black level controls.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 15:31:08 -03:00
Laurent Pinchart
5b6c3ef0e4 [media] omap3isp: video: Avoid crashes when pipeline set stream operation fails
If streaming can't be enabled on the pipeline, the DMA buffers queue is
not emptied. If the buffers then get freed the queue will end up
referencing free memory. This is usually not an issue, as the DMA queue
will be reinitialized the next time streaming is enabled, before
enabling the hardware.

However, if the sensor connected at the pipeline input is free-running,
the CCDC will start generating interrupts as soon as it gets powered up,
before the streaming gets enabled on the hardware. This will make the
CCDC interrupt handler access freed memory, causing a crash.

Reinitialize the DMA buffers queue in isp_video_streamon() if the error
path to make sure this situation won't happen.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 15:30:13 -03:00
Laurent Pinchart
c62e2a19d2 [media] omap3isp: Don't fail streamon when the sensor doesn't implement s_stream
The code handles subdevs with no s_stream operation correctly, but
returns -ENOIOCTLCMD by mistake if the first subdev in the chain has no
s_stream operation. Return 0 in that case.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 15:30:00 -03:00
Kamil Debski
1e393e90ab [media] media: s5p-mfc: fix section mismatch
Fix section mismatch in the MFC driver.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 14:53:37 -03:00
Randy Dunlap
ae11e354b8 [media] [-mmotm] media: video/adp1653.c needs module.h
adp1653.c uses interfaces that are provided by <linux/module.h>
and needs to include that header file to fix build errors.

and more.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 14:51:51 -03:00
Jarod Wilson
6f6b90c923 [media] imon: don't parse scancodes until intf configured
The imon devices have either 1 or 2 usb interfaces on them, each wired
up to its own urb callback. The interface 0 urb callback is wired up
before the imon context's rc_dev pointer is filled in, which is
necessary for imon 0xffdc device auto-detection to work properly, but we
need to make sure we don't actually run the callback routines until
we've entirely filled in the necessary bits for each given interface,
lest we wind up oopsing. Technically, any imon device could have hit
this, but the issue is exacerbated on the 0xffdc devices, which send a
constant stream of interrupts, even when they have no valid key data.

CC: Andy Walls <awalls@md.metrocast.net>
CC: Chris W <lkml@psychogeeks.com>
Reported-by: Chris W <lkml@psychogeeks.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 14:48:15 -03:00
tvboxspy
59152b1cf1 [media] STV0288 frontend provide wider carrier search and DVB-S2 drop out. resend
The following patch provides wider carrier search.

As with existing code search starts at MSB aligned. The boundary
is widened to start at -9.  In order to save time, if no carrier is
detected at the start it advances to the next alignment until carrier
is found.

The stv0288 will detect a DVB-S2 carrier on all steps , a
time out of 11 steps is introduced to drop out of the loop.

In stv0288_set_symbol carrier and timing loops are restored to
default values (inittab) before setting the symbol rate on each tune. A
slight drift was noticed with full scan in the higher IF frequencies of
each band.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 14:43:49 -03:00
Sylwester Nawrocki
6783fe5f16 [media] noon010pc30: Remove g_chip_ident operation handler
It is now not needed as the sensor identification is done
through the media controller API.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 14:31:34 -03:00
Sylwester Nawrocki
3accb18ca1 [media] v4l: Move SR030PC30, NOON010PC30, M5MOLS drivers to the right location
SR030PC30, NOON010PC30, M5MOLS are camera sensors so better place
for them is under the "Camera sensors" Kconfig section.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 14:29:49 -03:00
Sylwester Nawrocki
bc3603248f [media] noon010pc30: Improve s_power operation handling
Remove the now unneeded check for the platform data in s_power
handler and the platform data pointer in struct noon010_info.
Also do not reset the configured output resolution and pixel
format when cycling sensor's power.
Add small delay for proper reset signal shape.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 14:28:36 -03:00
Sylwester Nawrocki
6426e14a7e [media] noon010pc30: Conversion to the media controller API
Replace g/s_mbus_fmt ops with the pad level get/set_fmt operations.
Add media entity initialization and set subdev flags so the host driver
creates a subdev device node for the driver.
A mutex was added for serializing the subdev operations. When setting
format is attempted during streaming an (EBUSY) error will be returned.

After the device is powered up it will now remain in "power sleep"
mode until s_stream(1) is called. The "power sleep" mode is used
to suspend/resume frame generation at the sensor's output through
s_stream op.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 14:28:12 -03:00
Thomas Meyer
fbc09d3aa1 [media] davinci vpbe: Use resource_size()
Use resource_size function on resource object
 instead of explicit computation.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/resource_size.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 14:10:34 -03:00
Michael Grzeschik
096b703fb6 [media] mt9m111: move lastpage to struct mt9m111 for multi instances
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 14:03:24 -03:00
Sylwester Nawrocki
e553000a14 [media] sr030pc30: Remove empty s_stream op
s_stream does nothing in current form so remove it.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 12:48:45 -03:00
Hans Verkuil
6f43dbfd8f [media] saa7115: use the new auto cluster support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:51:49 -03:00
Hans Verkuil
34ebdc97b9 [media] pwc: add support for VIDIOC_LOG_STATUS
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:51:20 -03:00
Hans Verkuil
380834d674 [media] vivi: add support for VIDIOC_LOG_STATUS
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:51:10 -03:00
Hans Verkuil
43d23f3629 [media] pwc: switch to the new auto-cluster volatile handling
Now that the auto cluster core changed to a different scheme of how to
handle volatile controls (including how to switch from auto to manual mode)
the pwc code can be simplified to use that new core support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:50:54 -03:00
Hans Verkuil
5626b8c75b [media] v4l2-ctrls: implement new volatile autocluster scheme
The problem tackled in this patch is how to handle volatile autoclusters
correctly. A volatile autocluster is a cluster of related controls where one
control is the control that toggles between manual and auto mode and the other
controls are the values for the manual mode. For example autogain and gain,
autoexposure and exposure, etc.

If the hardware lets you read out the automatically calculated manual values
while in automode, then those manual controls should be marked volatile.

gain value as calculated by the autogain circuitry, then you would mark the
gain control as volatile (i.e. continuously changing).

The question in such use cases is what to do when switching from the auto
mode to the manual mode. Should we switch to the last set manual values or
should the volatile values be copied and used as the initial manual values.

For example: suppose the mode is manual gain and gain is set to 5. Then
autogain is turned on and the gain is set by the hardware to 2. Finally
the user switches back to manual gain. What should the gain be? 2 or 5?

After a long discussion the decisions was made to keep the last value as
calculated by the auto mode (so 2 in the example above).

The reason is that webcams that do such things will adapt themselves to
the current light conditions and when you switch back to manual mode you
expect that you keep the same picture. If you would switch back to old
manual values, then that would give you a suddenly different picture,
which is jarring for the user.

Additionally, this would be difficult to implement in applications that
store and restore the control values at application exit and start.

If you want to keep the old manual values when you switch from auto to
manual, then there would have to be a way for applications to get hold
of those old values while in auto mode, but there isn't.

So this patch will do all the heavy lifting in v4l2-ctrls.c: if you go
from auto mode to manual mode and the manual controls are volatile, then
g_volatile_ctrl will be called to get the current values for the manual
controls before switching to manual mode.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:48:30 -03:00
Steven Toth
de2fb698c6 [media] saa7164: Adding support for HVR2200 card id 0x8953
Thanks to Greg Tangey for prompting me to merge this.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:16:31 -03:00
Antti Palosaari
d102b739f3 [media] tda10071: change sleeps to more suitable ones
msleep() => usleep_range()

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:09:10 -03:00
Antti Palosaari
75d404ec04 [media] tda10071: do not download last byte of fw
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:09:00 -03:00
Chris Rankin
f6c226b550 [media] em28xx: ERROR: "em28xx_add_into_devlist" [drivers/media/video/em28xx/em28xx.ko] undefined!
Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:08:51 -03:00
Michael Krufky
ee03a6795e [media] opera1: fix ERROR: do not use assignment in if condition
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:08:09 -03:00
Michael Krufky
d12f51aa7b [media] m920x: fix ERROR: do not use assignment in if condition
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:07:32 -03:00
Michael Krufky
331423c46d [media] digitv: fix ERROR: do not use assignment in if condition
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:07:26 -03:00
Michael Krufky
d4dd5ce7ca [media] dibusb-mb: fix ERROR: do not use assignment in if condition
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:07:20 -03:00
Michael Krufky
d9abcd743e [media] dibusb-common: fix ERROR: do not use assignment in if condition
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:07:10 -03:00
Michael Krufky
310df3662e [media] cxusb: fix ERROR: do not use assignment in if condition
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:06:57 -03:00
Michael Krufky
2b7a7c30e3 [media] dvb-usb-dvb: ERROR: space required after that ','
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:06:40 -03:00
Michael Krufky
1645c879ff [media] ttusb2: fix ERROR: space required after that ','
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:06:25 -03:00
Michael Krufky
4594303b87 [media] dibusb-mb: fix ERROR: space required after that ','
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:06:16 -03:00
Michael Krufky
b6bd5de2b1 [media] dibusb-common: fix ERROR: space required after that ','
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:06:02 -03:00
Michael Krufky
2a77631333 [media] dib0700: fix ERROR: space required after that ','
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:05:34 -03:00
Michael Krufky
9a9677afed [media] dib0700: fix ERROR: space required before that '&'
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:05:10 -03:00
Michael Krufky
6e1ce98df1 [media] dib0700: fix WARNING: suspect code indent for conditional statements
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:05:00 -03:00
Michael Krufky
e3e59b085e [media] dib0700: fix WARNING: please, no spaces at the start of a line
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:04:48 -03:00
Michael Krufky
1251312a5c [media] mxl111sf: use adap->num_frontends_initialized to determine which frontend is being attached
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:04:35 -03:00
Antti Palosaari
36588715fc [media] em28xx: add support for PCTV DVB-S2 Stick 460e [2013:024f]
It is based of...
* Empia EM28174
* NXP TDA10071 & Conexant CX24118A combo
* Allegro A8293

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:01:47 -03:00
Antti Palosaari
de8e420350 [media] tda10071: NXP TDA10071 DVB-S/S2 driver
NXP TDA10071 DVB-S/S2 demodulator & Conexant CX24118A tuner combo driver

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:01:16 -03:00
Antti Palosaari
85bc9b510a [media] a8293: Allegro A8293 SEC driver
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 09:59:06 -03:00
Hans Verkuil
88365105d6 [media] v4l2-ctrls: replace is_volatile with V4L2_CTRL_FLAG_VOLATILE
With the new flag there is no need anymore to have a separate is_volatile
field. Modify all users to use the new flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 09:52:21 -03:00
Arvydas Sidorenko
b57ce4179b [media] drivers/media/video/stk-webcam.c: coding style issue
checkpatch.pl gave some coding style errors, so on the way to the first
patch I added the fix to them.

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-18 08:13:10 -03:00
Arvydas Sidorenko
47a7e6f8d2 [media] drivers/media/video/stk-webcam.c: webcam LED bug fix
The probem was on my DC-1125 webcam chip from Syntek. Whenever the webcam turns
on, the LED light on it is turn on also and never turns off again unless system
is shut downed or restarted.

This patch will fix this issue - the LED will be turned off whenever the device
is released.

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-18 08:11:28 -03:00
Daniel Drake
e27412f5a5 [media] mmp_camera: add MODULE_ALIAS
This enables module autoloading.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-18 08:05:43 -03:00
Simon Farnsworth
09fc9802c3 [media] cx18: Fix videobuf capture
When we moved to 3.0, we found that the cx18 driver was oopsing on close with:

NULL pointer deref at:

[ 2290.461009] Call Trace:
[ 2290.461009]  [<c046007b>] ? pm_qos_add_request+0xc/0x6e
[ 2290.461009]  [<c082631c>] __mutex_lock_common+0x87/0x125
[ 2290.461009]  [<f8970e92>] ? cx18_queue_flush+0x31/0x87 [cx18]
[ 2290.461009]  [<c0436b85>] ? __might_sleep+0x29/0xe4
[ 2290.461009]  [<c0826515>] __mutex_lock_slowpath+0x25/0x27
[ 2290.461009]  [<c08264b2>] ? mutex_lock+0x2e/0x3b
[ 2290.461009]  [<c08264b2>] mutex_lock+0x2e/0x3b
[ 2290.461009]  [<f88d3137>] videobuf_queue_lock+0x13/0x15 [videobuf_core]
[ 2290.461009]  [<f88d3f86>] __videobuf_free+0xfc/0x112 [videobuf_core]
[ 2290.461009]  [<f89741e6>] cx18_v4l2_close+0x158/0x172 [cx18]
[ 2290.461009]  [<c0507522>] ? cpumask_next+0x1a/0x1d
[ 2290.461009]  [<f88a319d>] v4l2_release+0x35/0x52 [videodev]
[ 2290.461009]  [<c04f5717>] fput+0x100/0x1a5
[ 2290.461009]  [<c04f2e09>] filp_close+0x5c/0x64
[ 2290.461009]  [<c04f2e70>] sys_close+0x5f/0x93
[ 2290.461009]  [<c082cd5f>] sysenter_do_call+0x12/0x28

Some digging showed that a merge at some previous point partially
added broken mmap() support, causing this trace. Remove the broken
code completely.

On top of that, the calculation in place for "buffer full" depended on
UYUV instead of HM12, while our GStreamer code was picking HM12 in
some circumstances.

Finally, the V4L2_CAP_STREAMING capability was never exposed. Patch it
into the YUV encoder node only.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-18 08:03:39 -03:00
Chris Rankin
16e3d2f4fa [media] EM28xx - Fix memory leak on disconnect or error
Release the dev->alt_max_pkt_size buffer in all cases.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-18 07:58:01 -03:00
Mauro Carvalho Chehab
7577911244 Merge tag 'v3.1-rc6' into staging/for_v3.2
* tag 'v3.1-rc6': (1902 commits)
  Linux 3.1-rc6
  ioctl: register LTTng ioctl
  fuse: fix memory leak
  fuse: fix flock breakage
  Btrfs: add dummy extent if dst offset excceeds file end in
  Btrfs: calc file extent num_bytes correctly in file clone
  btrfs: xattr: fix attribute removal
  Btrfs: fix wrong nbytes information of the inode
  Btrfs: fix the file extent gap when doing direct IO
  Btrfs: fix unclosed transaction handle in btrfs_cont_expand
  Btrfs: fix misuse of trans block rsv
  Btrfs: reset to appropriate block rsv after orphan operations
  Btrfs: skip locking if searching the commit root in csum lookup
  btrfs: fix warning in iput for bad-inode
  Btrfs: fix an oops when deleting snapshots
  [media] vp7045: fix buffer setup
  [media] nuvoton-cir: simplify raw IR sample handling
  [media] [Resend] viacam: Don't explode if pci_find_bus() returns NULL
  [media] v4l2: Fix documentation of the codec device controls
  [media] gspca - sonixj: Fix the darkness of sensor om6802 in 320x240
  ...
2011-09-17 10:29:49 -03:00
Jiri Kosina
e060c38434 Merge branch 'master' into for-next
Fast-forward merge with Linus to be able to merge patches
based on more recent version of the tree.
2011-09-15 15:08:18 +02:00
Jesper Juhl
10e4ac572e viacam: Don't explode if pci_find_bus() returns NULL
In the unlikely case that pci_find_bus() should return NULL
viacam_serial_is_enabled() is going to dereference a NULL pointer and
blow up. Better safe than sorry, so be defensive and check the
pointer.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-15 14:58:48 +02:00
Justin P. Mattock
699324871f treewide: remove extra semicolons from various parts of the kernel
This is a resend from the original, changing the title from PATCH to
RFC(since this is a review for commit, and I should have put that the first go around).
and also removing some of the commit's with ia64 and bash since it is significant.
let me know if I might have missed anything etc..

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-15 14:50:49 +02:00
Joerg Roedel
7b6d45f139 iommu/omap: Fix build error with !IOMMU_SUPPORT
Without this patch it is possible to select the VIDEO_OMAP3
driver which then selects OMAP_IOVMM. But the omap iommu
driver is not compiled without IOMMU_SUPPORT enabled. Fix
that by forcing OMAP_IOMMU and OMAP_IOVMM are enabled before
VIDEO_OMAP3 can be selected.

Cc: Ohad Ben-Cohen <ohad@wizery.com>
Cc: iommu@lists.linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-09-14 16:06:04 +02:00
Javier Martin
418d93ac0b [media] mt9p031: Aptina (Micron) MT9P031 5MP sensor driver
The MT9P031 is a parallel 12-bit 5MP sensor from Aptina (formerly
Micron) controlled through I2C.

The driver creates a V4L2 subdevice. It currently supports skipping,
cropping, automatic binning, and gain, exposure, h/v flip and test
pattern controls.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:49:28 -03:00
Laurent Pinchart
b98d32f7e5 [media] omap3isp: Move platform data definitions from isp.h to media/omap3isp.h
drivers/media/video/omap3isp/isp.h is not a proper location for a header
that needs to be included from board code. Move the platform data
definitions to media/omap3isp.h.

Board code still needs to include isp.h to get the struct isp_device
definition and access OMAP3 ISP platform callbacks. Those callbacks will
be replaced by more generic code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:49:27 -03:00
Michael Jones
61e6561fae [media] omap3isp: queue: fail QBUF if user buffer is too small
Add buffer length check to sanity checks for USERPTR QBUF.

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:49:27 -03:00
Laurent Pinchart
00542edf07 [media] omap3isp: Don't accept pipelines with no video source as valid
Make sure the pipeline has a valid video source (either a subdev with no
sink pad, or a non-subdev entity) at stream-on time and return -EPIPE if
no video source can be found.

Reported-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:49:27 -03:00
Florian Mickler
fc61ccd35f [media] vp7045: fix buffer setup
dvb_usb_device_init calls the frontend_attach method of this driver which
uses vp7045_usb_ob. In order to have a buffer ready in vp7045_usb_op, it has to
be allocated before that happens.

Luckily we can use the whole private data as the buffer as it gets separately
allocated on the heap via kzalloc in dvb_usb_device_init and is thus apt for
use via usb_control_msg.

This fixes a
	BUG: unable to handle kernel paging request at 0000000000001e78

reported by Tino Keitel and diagnosed by Dan Carpenter.

Cc: stable@kernel.org # For v3.0 and upper
Tested-by: Tino Keitel <tino.keitel@tikei.de>
Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:33:41 -03:00
Jarod Wilson
de4ed0c111 [media] nuvoton-cir: simplify raw IR sample handling
The nuvoton-cir driver was storing up consecutive pulse-pulse and
space-space samples internally, for no good reason, since
ir_raw_event_store_with_filter() already merges back to back like
samples types for us. This should also fix a regression introduced late
in 3.0 that related to a timeout change, which actually becomes correct
when coupled with this change. Tested with RC6 and RC5 on my own
nuvoton-cir hardware atop vanilla 3.0.0, after verifying quirky
behavior in 3.0 due to the timeout change.

Reported-by: Stephan Raue <sraue@openelec.tv>
CC: Stephan Raue <sraue@openelec.tv>
CC: stable@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:33:40 -03:00
Jesper Juhl
c8814df3a5 [media] [Resend] viacam: Don't explode if pci_find_bus() returns NULL
In the unlikely case that pci_find_bus() should return NULL
viacam_serial_is_enabled() is going to dereference a NULL pointer and
blow up. Better safe than sorry, so be defensive and check the
pointer.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:33:39 -03:00
Jean-François Moine
5b5cfc3674 [media] gspca - sonixj: Fix the darkness of sensor om6802 in 320x240
The images are clearer with a lower bridge clock.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:33:37 -03:00
Luiz Carlos Ramos
313c68e644 [media] gspca - sonixj: Fix wrong register mask for sensor om6802
The bug was introduced by git commit 0e4d413af1, giving very dark images.

Signed-off-by: Luiz Carlos Ramos <lramos.prof@yahoo.com.br>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:33:37 -03:00
Jean-François Moine
55c53e1f24 [media] gspca - ov519: Fix LED inversion of some ov519 webcams
The list of the webcams which have LED inversion was rebuild scanning
ms-win .inf files.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:33:36 -03:00
Dan Carpenter
4264a8b638 [media] pwc: precedence bug in pwc_init_controls()
'!' has higher precedence than '&' so we need parenthesis here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:33:35 -03:00
Jean-François Moine
b796fb6ed0 [media] gspca - main: Better values for V4L2_FMT_FLAG_COMPRESSED
In vidioc_enum_fmt_vid_cap, the 'compressed' flag was set from the
pixelformat, and all pixelformats were not treated.
Now, images are told as compressed when the image size is smaller than
its number of pixels.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:27:41 -03:00
Jean-François Moine
480992b357 [media] gspca - main: Fix the isochronous transfer interval
For USB speeds different of 'low', the bInterval value is logarithmic.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:27:05 -03:00
Jean-François Moine
8d64d4f67e [media] gspca - ov534_9: New sensor ov9712 and new webcam 05a9:8065
The webcam is build from an Omnivision test kit which contains a OV538 bridge
and a OV9712 sensor.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:26:54 -03:00
Jean-François Moine
7592e03776 [media] gspca - ov534_9: Use the new control mechanism
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:25:53 -03:00
Jean-François Moine
d701a48a4b [media] gspca - kinect: Remove the gspca_debug definition
The variable gspca_debug is defined and settable in gspca main.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:25:22 -03:00
Jean-François Moine
b813b0ca13 [media] gspca - sonixj: Cleanup source and remove useless instructions
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:24:40 -03:00
Jean-François Moine
2458df4324 [media] gspca - sonixj: Increase the exposure for sensor soi768
Lower exposure values give too dark images.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:24:21 -03:00
Jean-François Moine
abe8cee744 [media] gspca - sonixj: Adjust the contrast control
The contrast was too low. Higher values are better.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:24:12 -03:00
Jean-François Moine
7d84a179b1 [media] gspca - jeilinj: Cleanup code
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:24:04 -03:00
Jean-François Moine
822f6e2a9a [media] gspca - sonixj: Fix the darkness of sensor om6802 in 320x240
The images are clearer with a lower bridge clock.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:23:46 -03:00
Jean-François Moine
72a16e8c7a [media] gspca - ov519: Fix LED inversion of some ov519 webcams
The list of the webcams which have LED inversion was rebuild scanning
ms-win .inf files.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-11 09:23:06 -03:00
Michael Krufky
2d04c13a50 [media] dvb-usb: improve sanity check of adap->active_fe in dvb_usb_ctrl_feed
The check for (adap->active_fe < 0) at the top of dvb_usb_ctrl_feed is a sanity
check to ensure that adap->active_fe is valid.  Improve that sanity check
by also checking for (adap->active_fe >= adap->num_frontends_initialized)

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-09 15:28:04 -03:00
Michael Krufky
4b5d01e9f6 [media] dvb-usb: fix streaming failure on channel change
This fixes a bug introduced by a previous changeset entitled,
[media] dvb-usb: refactor MFE code for individual streaming config per frontend

As reported by Antti Palosaari, This error is shown by VLC when channel changed:

[0x7f1bbc000cd0] dvb access error: DMXSetFilter: failed with -1 (Invalid argument)
[0x7f1bbc000cd0] dvb access error: DMXSetFilter failed
[0x7f1bbc32f910] main stream error: cannot pre fill buffer

After my own investigations, I've determined that this error case occurs when
the application stops streaming but leaves the frontend and dvr devices open.
A typical example of this usage would be a channel change operation while
watching live television. The error occurs when the application attempts to
stream after tuning to the new channel.

To prevent this error, don't set adap->active_fe to -1 unless the application
closes the device.

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-09 15:11:55 -03:00
Tony Jago
62dd28d0c6 [media] saa7164: Add support for another HVR2200 hardware revision
Hauppauge have released a new model rev, sub id 8940, this adds
support.

[stoth@kernellabs.com: I modified Tony's patch slightly in relation to the
 card numbering in saa7164.h, appending rather than inserting the new card
 - normal practise]
Signed-off-by: Tony Jago <tony@hammertelecom.com.au>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-08 14:27:59 -03:00
Sylwester Nawrocki
8f401543ec [media] s5p-fimc: Remove single-planar capability flags
The driver supports only multi-planar API and conversion to single-planar
API should be done in libv4l2. Remove misleading single planar capability
flags to avoid problems in applications and libv4l2.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06 17:51:18 -03:00