* /home/v4l/v4l/patchwork: (93 commits)
[media] media: dvb-usb: print mac address via native %pM
[media] s5p-tv: Use module_i2c_driver in sii9234_drv.c file
[media] media: gpio-ir-recv: add allowed_protos for platform data
[media] s5p-jpeg: Use module_platform_driver in jpeg-core.c file
[media] saa7134: fix spelling of detach in label
[media] cx88-blackbird: replace ioctl by unlocked_ioctl
[media] cx88: don't use current_norm
[media] cx88: fix a number of v4l2-compliance violations
[media] cx88: support control events
[media] cx88: add priority support
[media] cx88: move fmt, width and height to cx8800_dev
[media] cx88: remove radio and type from cx8800_fh
[media] cx88: convert cx88-blackbird to the control framework
[media] cx88: each device node gets the right controls
[media] cx88: first phase to convert cx88 to the control framework
[media] cx88: fix querycap
[media] v4l2-framework.txt: Update the locking documentation
[media] pwc: v4l2-compliance fixes
[media] pwc: use the new vb2 helpers
[media] v4l2-dev.c: also add debug support for the fops
...
* /home/v4l/v4l/for_upstream:
[media] omap3isp: preview: Fix contrast and brightness handling
[media] omap3isp: preview: Fix output size computation depending on input format
[media] winbond-cir: Initialise timeout, driver_type and allowed_protos
[media] winbond-cir: Fix txandrx module info
[media] cx23885: Silence unknown command warnings
[media] cx23885: add support for HVR-1255 analog (cx23888 variant)
[media] cx23885: make analog support work for HVR_1250 (cx23885 variant)
[media] cx25840: fix vsrc/hsrc usage on cx23888 designs
[media] cx25840: fix regression in HVR-1800 analog audio
[media] cx25840: fix regression in analog support hue/saturation controls
[media] cx25840: fix regression in HVR-1800 analog support
[media] s5p-mfc: Fixed setup of custom controls in decoder and encoder
[media] cx231xx: don't DMA to random addresses
[media] em28xx: fix em28xx-rc load
[media] dvb-core: Release semaphore on error path dvb_register_device()
[media] omap3isp: preview: Fix contrast and brightness handling
Commit bac387efbb88cf0e8df6f46a38387897cea464ee ("omap3isp: preview:
Simplify configuration parameters access") added three fields to the
preview_update structure, but failed to properly update the related
initializers. Fix this.
[media] omap3isp: preview: Fix output size computation depending on input format
The preview engine crops 4 columns and 4 lines when CFA is enabled.
Commit b2da46e52fe7871cba36e1a435844502c0eccf39 ("omap3isp: preview: Add
support for greyscale input") inverted the condition by mistake, fix
this.
Du, Changbin [Tue, 3 Jul 2012 09:27:19 +0000 (06:27 -0300)]
[media] media: gpio-ir-recv: add allowed_protos for platform data
It's better to give platform code a chance to specify the allowed
protocols to use.
[mchehab@redhat.com: fix merge conflict with a patch that made
half of this change] Signed-off-by: Du, Changbin <changbin.du@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 25 May 2012 15:15:30 +0000 (12:15 -0300)]
[media] cx88: don't use current_norm
current_norm can only be used if there is a single device node since it is
local to the device node. In this case multiple device nodes share a single
tuner.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 25 May 2012 15:04:10 +0000 (12:04 -0300)]
[media] cx88: fix a number of v4l2-compliance violations
- missing COMPRESSED flag for MPEG formats
- set colorspace
- set sizeimage
- add tuner index checks
- setup the frequency ranges correctly
- add missing g_chip_ident ioctl
- fix audmode handling
- don't handle vbi formats on a video node and vice versa.
cx88 now passes the v4l2-compliance tests.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 2 Jul 2012 08:43:34 +0000 (05:43 -0300)]
[media] v4l2-framework.txt: Update the locking documentation
This documents the new queue->lock and how to use it. It also removes the
documentation of v4l2_disable_ioctl_locking: this is only used in gspca and
will be removed once gspca has been converted to vb2.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 22 Jun 2012 10:29:35 +0000 (07:29 -0300)]
[media] v4l2-dev/ioctl.c: add vb2_queue support to video_device
This prepares struct video_device for easier integration with vb2.
It also introduces a new lock that protects the vb2_queue. It is up
to the driver to use it or not. And the driver can associate an owner
filehandle with the queue to check whether queuing requests are
permitted for the calling filehandle.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 22 Jun 2012 08:44:14 +0000 (05:44 -0300)]
[media] vb2-core: add support for count == 0 in create_bufs
This also fixes incorrect error handling in create_bufs: the return code
of __vb2_queue_alloc is the number of allocated buffers, and not a
traditional error code.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 22 Jun 2012 09:37:38 +0000 (06:37 -0300)]
[media] v4l2-dev.c: add debug sysfs entry
Since this could theoretically change the debug value while in the middle
of v4l2-ioctl.c, we make a copy of vfd->debug to ensure consistent debug
behavior.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 4 Jun 2012 08:23:40 +0000 (05:23 -0300)]
[media] v4l2-ioctl.c: move a block of code down, no other changes
A block of code is moved down in the code to make later changes easier.
Do just the move without other changes to keep the diff readable for the
upcoming patch.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx23885: add support for HVR-1255 analog (cx23888 variant)
Get the HVR-1255 analog support working for all supported inputs. This
includes introduction of a new board profile for an OEM variant which
doesn't have all the same inputs as the retail version of the board.
Validated with the following boards:
HVR-1255 (0070:2259)
Thanks to Steven Toth and Hauppauge for loaning me various boards to
regression test with.
[media] cx23885: make analog support work for HVR_1250 (cx23885 variant)
The analog support in the cx23885 driver was completely broken for the
HVR-1250. Add the necessary code.
Note that this only implements analog for the composite and s-video
inputs. The tuner input continues to be non-functional due to a lack of
analog support in the mt2131 driver.
Validated with the following boards:
HVR-1250 (0070:7911)
Thanks to Steven Toth and Hauppauge for loaning me various boards to
regression test with.
[media] cx25840: fix vsrc/hsrc usage on cx23888 designs
The location of the vsrc/hsrc registers moved in the cx23888, causing
the s_mbus call to fail prematurely indicating that "720x480 is not a
valid size". The function bailed out before many pertinent registers
were set related to the scaler (causing unexpected results in video
rendering when doing raw video capture).
[media] cx25840: fix regression in HVR-1800 analog audio
The refactoring of the cx25840 driver to support the cx23888 caused breakage
with the existing support for cx23885/cx23887 analog audio support. Tweak
the code so that it only uses the code if it really is a cx23888 instead of
applying it to all cx2388x based devices.
[media] cx25840: fix regression in analog support hue/saturation controls
Fix regression in HVR-1800 analog support hue/saturation controls.
The changes made for the cx23888 caused regressions in the analog
support for cx23885/cx23887 based boards (partly due to changes in the
locations of the hue/saturation controls). As a result the wrong
registers were being overwritten.
Add code to use the correct registers if it's a cx23888
[media] cx25840: fix regression in HVR-1800 analog support
The refactoring of the cx25840 driver to support the cx23888 caused breakage
with the existing support for cx23885/cx23887 analog support. Rework the
routines such that the new code is only used for the 888.
Thomas Betker [Sun, 1 Jul 2012 13:22:08 +0000 (10:22 -0300)]
[media] bttv-cards.c: Allow radio for CHP05x/CHP06x
Add ".has_radio = 1" for BTTV_BOARD_MAGICTVIEW061 because there are
some CHP05x/CHP06x boards with a radio tuner.
I still have an analog Askey Magic TView card (CHP051, PCI 144f:3002)
which I use for radio only. This worked fine with kernel 2.6.37
(openSUSE 11.4), but no longer works with kernel 3.1.10 (openSUSE 12.1).
The reason apparently is that ".has_radio = 1" is missing in
bttv-cards.c for BTTV_BOARD_MAGICTVIEW061; when I add this line and
recompile the kernel, radio is working again. The line is still missing
in the latest git tree, for which I have generated the attached patch.
I can't test what will happen for CHP05x/CHP06x devices without radio;
however, it seems that other cards also have the problem that there are
some boards with radio and some without, so I hope that this can be
sorted out.
Signed-off-by: Thomas Betker <thomas.betker@freenet.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[PATCH] media: add Analog Devices ADV7393 video encoder driver
Add ADV7393 I²C-based video encoder driver. This driver has been tested on
custom hardware. It has been tested for composite output. It is derived from the
ADV7343 driver.
[media] [V3] stv090x: variable 'no_signal' set but not used
Remove variable and ignore return value of stv090x_chk_signal().
Tested by compilation only.
[mchehab@redhat.com: instead of reverting and applying V3,
applied just the diff patch, for the sake of a cleaner history] Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Reviewed-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Thu, 21 Jun 2012 09:35:04 +0000 (06:35 -0300)]
[media] uvcvideo: Fix alternate setting selection
The alternate setting number is not equal to the alternate setting index
in the interface alternate settings table. Use the alternate setting
number from the interface descriptor when calling usb_set_interface().
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jayakrishnan [Fri, 9 Mar 2012 13:10:49 +0000 (10:10 -0300)]
[media] uvcvideo: Fix frame drop in bulk video stream
When video endpoint is configured as bulk, a ZLP is sent after every
video frames with size as multiple of 512 bytes. This is done so that
host can detect end of transfer and pass data for processing.
Still, frames that are multiple of 16K in size gets dropped. The ZLP
sent by camera is ignored by uvc_video_decode_bulk(). The makes sure
that the ZLP is not part of a video frame before ignoring it. If ZLP
follows a video frame, then it triggers completion callback.
[mchehab@redhat.com: Fix a small CodingStyle issue] Signed-off-by: Jayakrishnan Memana <jayakrishnan.memana@maxim-ic.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Mon, 14 May 2012 07:34:34 +0000 (04:34 -0300)]
[media] uvcvideo: Document the struct uvc_xu_control_query query field
Several developers have reported that the lack of macros for the struct
uvc_xu_control_query query field in uvcvideo.h was confusing and forced
them to look at the driver source code to find out what applications
were supposed to pass in that field.
Add a comment to the header to clarify the expected usage of the query
field.
This patch simply fixes some logging calls:
- Use KERN_INFO when printing the chip status.
- Add a missing space when logging the drxk_gate_ctrl call.
- Use the same logging text as always if the scu_command in GetQAMLockStatus fails.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] drxk: Make the QAM demodulator command parameters configurable
Currently there are two different implementations (in the firmware) for
the QAM demodulator command: one takes 4 and the other takes 2
parameters. The driver shows an error in dmesg When using the
4-parameter command with firmware that implements the 2-parameter
command. Unfortunately this happens every time when chaning the
frequency (on DVB-C).
This patch simply makes configurable, how many command parameters will
be used. All existing drxk_config instances using the "drxk_a3.mc" were
updated because this firmware is the only loadable firmware where the
QAM demodulator command takes 4 parameters. Some firmwares in the ROM
might also use it. The drxk instances in the em28xx-dvb driver were also
updated to silence the warnings.
If no qam_demod_parameter_count is given in the drxk_config struct, then
the correct number of parameters will be auto-detected.
[mchehab@redhat.com: Fix a small CodingStyle issue at one comment] Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Tue, 26 Jun 2012 07:40:38 +0000 (04:40 -0300)]
[media] drxk: fix a '&' vs '|' bug
IQM_AF_CLKNEG_CLKNEGDATA__M is 0x2 and
IQM_AF_CLKNEG_CLKNEGDATA_CLK_ADC_DATA_POS is 0. (clkNeg | 0x2) is never
equal to zero so the condition can never be true.
I consulted with Ralph Metzler and the '|' should be changed to a '&'.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> CC: Ralph Metzler <rjkm@metzlerbros.de> Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] Kconfig: Split the core support options from the driver ones
Better arrange the remote controller driver items to happen after the
core support, on their proper menus, and making clerarer what is media
core options and what is media driver options.
David Dillow [Mon, 18 Jun 2012 03:15:21 +0000 (00:15 -0300)]
[media] cx231xx: don't DMA to random addresses
Commit 7a6f6c29d264cdd2fe0eb3d923217eed5f0ad134 (cx231xx: use
URB_NO_TRANSFER_DMA_MAP) was intended to avoid mapping the DMA buffer
for URB twice. This works for the URBs allocated with usb_alloc_urb(),
as those are allocated from cohernent DMA pools, but the flag was also
added for the VBI and audio URBs, which have a manually allocated area.
This leaves the random trash in the structure after allocation as the
DMA address, corrupting memory and preventing VBI and audio from
working. Letting the USB core map the buffers solves the problem.
Signed-off-by: David Dillow <dave@thedillows.org> Cc: Sri Deevi <srinivasa.deevi@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
David Dillow [Mon, 18 Jun 2012 03:20:06 +0000 (00:20 -0300)]
[media] cx231xx: use TRANSFER_TYPE enum for cleanup
Most calls to cx231xx_capture_start() already use the values from
TRANSFER_TYPE, but cx231xx_capture_start() and
cx231xx_initialize_stream_xfer() were hand coding the values.
Use the named values (81 is never passed in), and simplify
cx231xx_capture_start(), as the switch statements were identical and
pcb_config->config_num is a u8, so any non-zero config got the same
result.
Signed-off-by: David Dillow <dave@thedillows.org> Cc: Sri Deevi <srinivasa.deevi@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
David Dillow [Mon, 18 Jun 2012 03:15:21 +0000 (00:15 -0300)]
[media] cx231xx: don't DMA to random addresses
Commit 7a6f6c29d264cdd2fe0eb3d923217eed5f0ad134 (cx231xx: use
URB_NO_TRANSFER_DMA_MAP) was intended to avoid mapping the DMA buffer
for URB twice. This works for the URBs allocated with usb_alloc_urb(),
as those are allocated from cohernent DMA pools, but the flag was also
added for the VBI and audio URBs, which have a manually allocated area.
This leaves the random trash in the structure after allocation as the
DMA address, corrupting memory and preventing VBI and audio from
working. Letting the USB core map the buffers solves the problem.
Cc: stable@kernel.org Signed-off-by: David Dillow <dave@thedillows.org> Cc: Sri Deevi <srinivasa.deevi@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
changeset 2b719d7baf (v4l: drop v4l2_buffer.input and V4L2_BUF_FLAG_INPUT)
broke compilation on x86_64:
v4l2-compat-ioctl32.c: In function 'get_v4l2_buffer32':
v4l2-compat-ioctl32.c:391:4: error: expected ')' before 'return'
...
v4l2-compat-ioctl32.c: In function 'put_v4l2_buffer32':
v4l2-compat-ioctl32.c:475:4: error: expected ')' before 'return'
...
[media] media: only show V4L devices based on device type selection
After this patch, the MEDIA*_SUPPORT will be used as a filter,
exposing only devices that are pertinent to one of the 3
V4L types: webcam/grabber, radio, analog TV.
In the past, it was possible to have either DVB or V4L2 core
as module and the other as builtin. Such config never make much
sense, and created several issues in order to make the Kconfig
dependency to work, as all drivers that depend on both (most
TV drivers) would need to be compiled as 'm'. Due to that,
the VIDEO_MEDIA config option were added.
Instead of such weird approach, let's just use the MEDIA_SUPPORT
=y or =m to select if the media subsystem core will be either
builtin or module, simplifying the building system logic.
Also, fix the tuners configuration, by enabling them only if
a tuner is required. So, if just webcam/grabbers support is
selected, no tuner option will be selected. Also, if only digital
TV is selected, no analog tuner support is selected.
That removes the need of using EXPERT customise options, when
analog TV is not selected.
<m> Multimedia support --->
[ ] Cameras/video grabbers support
[ ] Analog TV support
[ ] Digital TV support
[ ] AM/FM radio receivers/transmitters support
[ ] Remote Controller support
This provides an interface that is clearer to end users that
are compiling the Kernel, and will allow the building system
to automatically unselect drivers for unused functions.
xc5000 is just a tuner, not a decoder, so both DMB-TH and ISDB-T should
work properly there: it is just a matter of teaching the driver what
saw filter should be used and how to calculate the center frequency.
Dmitry Lifshitz [Wed, 13 Jun 2012 10:49:30 +0000 (07:49 -0300)]
[media] tvp5150: fix kernel crash if chip is unavailable
tvp5150 driver probe function doesn't check if the chip is present.
Thus the driver can be loaded without having a device.
This is dangerous and can cause kernel crash like this:
---[ end trace 3ed3c618b26ff3e8 ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
This patch fixes the tvp5150_read() function to return an error in case
the I2C transaction fails.
tvp5150_probe() and other relevant driver callbacks changed to check the
status of the I2C read operations.
In case of a read error throw an error message with v4l2_err()
instead of v4l2_dbg().
[mchehab@redhat.com: Fix a small typo breaking compilation] Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 1 Jul 2012 18:59:13 +0000 (15:59 -0300)]
[media] tda10071: use decimal numbers for indexes and lengths
Dan asked "Btw, why are the sizes specified in hex instead of
decimal here?". After looking code, I agree also decimal
presentation is clearer. So lets change those.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>