Michael Krufky [Sun, 29 Jan 2012 18:46:46 +0000 (15:46 -0300)]
[media] DVB: add support for the LG2160 ATSC-MH demodulator
This patch adds support for controlling the LG2160 and
LG2161 ATSC-MH demodulators.
[mchehab@redhat.com: fold with the next patch that was fixing the DVB ABI] Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Michael Krufky [Sun, 29 Apr 2012 15:59:46 +0000 (12:59 -0300)]
[media] DocBook: document new DTV Properties for ATSC-MH delivery system
Document the following properties for controlling an ATSC-MH frontend:
DTV_ATSCMH_FIC_VER - Version number of the FIC signaling data
DTV_ATSCMH_PARADE_ID - Parade identification number
DTV_ATSCMH_NOG - Number of MH groups per MH subframe for a designated parade
DTV_ATSCMH_TNOG - Total number of MH groups in all parades in one subframe
DTV_ATSCMH_SGN - Start group number
DTV_ATSCMH_PRC - Parade repetition cycle
DTV_ATSCMH_RS_FRAME_MODE - RS frame mode
DTV_ATSCMH_RS_FRAME_ENSEMBLE - RS frame ensemble
DTV_ATSCMH_RS_CODE_MODE_PRI - RS code mode (primary)
DTV_ATSCMH_RS_CODE_MODE_SEC - RS code mode (secondary)
DTV_ATSCMH_SCCC_BLOCK_MODE - Series Concatenated Convolutional Code Block Mode
DTV_ATSCMH_SCCC_CODE_MODE_A - Series Concatenated Convolutional Code Rate A
DTV_ATSCMH_SCCC_CODE_MODE_B - Series Concatenated Convolutional Code Rate B
DTV_ATSCMH_SCCC_CODE_MODE_C - Series Concatenated Convolutional Code Rate C
DTV_ATSCMH_SCCC_CODE_MODE_D - Series Concatenated Convolutional Code Rate D
DTV_ATSCMH_FIC_ERR - FIC error count
DTV_ATSCMH_CRC_ERR - CRC error count
DTV_ATSCMH_RS_ERR - RS error count
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] s5p-fimc: Add support for Exynos4x12 FIMC-LITE
This patch adds driver for FIMC-LITE camera host interface. This new IP
differs from the regular FIMC IP in that it doesn't have input DMA,
scaler and color space conversion support. So it just plain camera host
interface for MIPI-CSI2 and ITU-R interfaces. For the serial bus support
it interworks with MIPI-CSIS and the exisiting s5p-csis driver.
The FIMC-LITE and MIPI-CSIS drivers can also be reused in the Exynos5
SoC series.
Tidy up the variant and driver data handling. Remove the 'samsung_'
prefix from some data structures since it doesn't really carry any
useful information and makes the names unnecessarily long.
[media] s5p-fimc: Prefix format enumerations with FIMC_FMT_
Prefix the pixel format enumerations with FIMC_FMT_ to make it more clear,
especially when used in new IP drivers, like fimc-lite, etc. Also add IO_
prefix in the input/output enumeration.
[media] s5p-fimc: Rework the video pipeline control functions
There is getting more entities to manage within single video pipeline
in newer SoCs. To simplify code put subdevs' pointer into an array
rather than adding new member in struct fimc_pipeline for each subdev.
This allows to easier handle subdev operations in proper order.
Additionally walk graph in one direction only in fimc_pipeline_prepare()
function to make sure we properly gather only media entities that below
to single data pipeline. This avoids wrong initialization in case where,
for example there are multiple active links from s5p-mipi-csis subdev
output pad.
struct fimc_pipeline declaration is moved to the driver's public header
to allow other drivers to reuse the fimc-lite driver added in subsequent
patches.
[media] s5p-fimc: Refactor the register interface functions
Simplify the register API and use FIMC_REG_ prefix for all register
definitions for consistency with FIMC-LITE. The unused image effect
defines are removed.
[media] s5p-fimc: Use v4l2_subdev internal ops to register video nodes
In order to be able to select only FIMC-LITE support, which is added
with subsequent patches, the regular FIMC support is now contained
only in fimc-core.c, fimc-m2m.c and fimc-capture.c files. The graph
and pipeline management is now solely handled in fimc-mdevice.[ch].
This means the FIMC driver can now be excluded with Kconfig option,
leaving only FIMC-LITE and allowing this driver to be reused in SoCs
that have only FIMC-LITE and no regular FIMC IP.
[media] s5p-fimc: Move m2m node driver into separate file
Virtually no functional changes, just code reordering. This let us to
clearly separate all logical functions available in the driver: fimc
capture, mem-to-mem, and later fimc-lite capture, ISP features, etc.
[media] s5p-fimc: Avoid crash with null platform_data
In commit "s5p-fimc: Handle sub-device interdependencies using deferred.."
there was a check added for pdata->num_clients without first checking
pdata against NULL. This causes a crash when platform_data is not set,
which is a valid use case. Fix this regression by skipping the MIPI-CSIS
subdev registration also when pdata is null.
Reported-by: HeungJun Kim <riverful.kim@samsung.com> 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>
Sachin Kamat [Mon, 14 May 2012 09:33:34 +0000 (06:33 -0300)]
[media] s5p-jpeg: Use devm_* functions in jpeg-core.c file
devm_* functions are used to replace kzalloc, request_mem_region, ioremap
and request_irq functions in probe call. With the usage of devm_* functions
explicit freeing and unmapping is not required.
Sachin Kamat [Fri, 11 May 2012 07:38:14 +0000 (04:38 -0300)]
[media] s5p-mfc: Add missing static storage class in s5p_mfc_enc.c file
Fixes the following sparse warnings:
drivers/media/video/s5p-mfc/s5p_mfc_enc.c:1439:5: warning: symbol 'vidioc_s_parm' was not declared. Should it be static?
drivers/media/video/s5p-mfc/s5p_mfc_enc.c:1455:5: warning: symbol 'vidioc_g_parm' was not declared. Should it be static?
Sachin Kamat [Thu, 10 May 2012 06:35:48 +0000 (03:35 -0300)]
[media] s5p-g2d: Add missing static storage class in g2d.c file
Fixes the following sparse warnings:
drivers/media/video/s5p-g2d/g2d.c:68:18: warning: symbol 'def_frame' was not declared. Should it be static?
drivers/media/video/s5p-g2d/g2d.c:80:16: warning: symbol 'find_fmt' was not declared. Should it be static?
drivers/media/video/s5p-g2d/g2d.c:205:5: warning: symbol 'g2d_setup_ctrls' was not declared. Should it be static?
Sachin Kamat [Thu, 10 May 2012 06:32:01 +0000 (03:32 -0300)]
[media] s5p-mfc: Add missing static storage class to silence warnings
Fixes the following sparse warnings:
drivers/media/video/s5p-mfc/s5p_mfc.c:73:6
warning: symbol 's5p_mfc_watchdog' was not declared. Should it be static?
drivers/media/video/s5p-mfc/s5p_mfc_opr.c:299:6:
warning: symbol 's5p_mfc_set_shared_buffer' was not declared. Should it be static?
Sachin Kamat [Mon, 12 Mar 2012 06:13:34 +0000 (03:13 -0300)]
[media] v4l: s5p-tv: Fix section mismatch warning in mixer_video.c
The function __devinit mxr_probe() references
a function __devexit mxr_release_video().
Since mxr_release_video() is referenced outside the exit section, the following
compilation warning is generated which is fixed here:
WARNING: drivers/media/video/s5p-tv/s5p-mixer.o(.devinit.text+0x340):
Section mismatch in reference from the function mxr_probe() to the function
devexit.text:mxr_release_video()
[media] v4l: s5p-tv: mixer: fix handling of interlaced modes
The next frame was fetched by Mixer at every VSYNC event. This caused tearing
when Mixer's output in interlaced mode. This patch fixes this bug by fetching
new frame every second VSYNC when working in interlaced mode.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The mode setup was applied on HDMI hardware only on resume event. This caused
problem if HDMI was not suspended between mode switches. This patch fixes this
problem by setting a dirty flag on a mode change event. If flag is set, then
new mode is applied on the next stream-on event.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Ezequiel García [Sat, 5 May 2012 19:13:22 +0000 (16:13 -0300)]
[media] em28xx: Fix memory leak on driver defered resource release
When the device is physically unplugged but there are still
open file handles, resource release is defered until last
opened handle is closed.
This patch fixes a missing em28xx_fh struct release.
Tested by compilation only.
VIDIOC_TRY_FMT shouldn't fail if the user requests an unsupported pixel
format. Instead the driver should replace it with a supported one. Fix the
sh_mobile_ceu_camera driver accordingly.
[media] V4L: soc-camera: switch to using the existing .enum_framesizes()
The recently introduced .enum_mbus_fsizes() v4l2-subdev video operation is
a duplicate of the .enum_framesizes() operation, introduced earlier. Switch
soc-camera over to using the original one.
In mx2_camera_try_fmt(), when applying i.MX25 restrictions to frame sizes,
the height is checked to be <= 0xffff. But later an integer multiplication
height * 4 * 0x3ffff is performed, which will overflow even for bounded
height values. This patch switches to using 64-bit multiplication and
division to avoid overflowing.
Laurent Pinchart [Wed, 21 Mar 2012 11:03:28 +0000 (08:03 -0300)]
[media] soc-camera: Support user-configurable line stride
Add a capabilities field to the soc_camera_host structure to flag hosts
that support user-configurable line strides. soc_camera_try_fmt() then
passes the user-provided bytesperline and sizeimage format fields to
such hosts, and expects the host to check (and fix if needed) the
values.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[g.liakhovetski@gmx.de: fix a typo in mx2_camera.c] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Wed, 21 Mar 2012 11:03:24 +0000 (08:03 -0300)]
[media] soc-camera: Fix bytes per line computation for planar formats
The V4L2 specification defines bytesperline for planar formats as the
number of bytes per line for the largest plane. Modify
soc_mbus_bytes_per_line() accordingly.
Laurent Pinchart [Wed, 21 Mar 2012 11:03:23 +0000 (08:03 -0300)]
[media] soc-camera: Add plane layout information to struct soc_mbus_pixelfmt
To compute the value of the v4l2_pix_format::bytesperline field, we need
information about planes layout for planar formats. The new enum
soc_mbus_layout conveys that information.
Laurent Pinchart [Wed, 21 Mar 2012 11:03:21 +0000 (08:03 -0300)]
[media] soc_camera: Use soc_camera_device::sizeimage to compute buffer sizes
Instead of computing the buffer size manually in the videobuf queue
setup and buffer prepare callbacks, use the previously negotiated
soc_camera_device::sizeimage value.
The usage of ../*.h breaks out-of-tree compilation and likely breaks
compilation when O= argument is used. Instead of doing that,
just add the include path via Makefile.
Javier Martin [Mon, 26 Mar 2012 12:17:48 +0000 (09:17 -0300)]
[media] media: mx2_camera: Fix mbus format handling
Remove MX2_CAMERA_SWAP16 and MX2_CAMERA_PACK_DIR_MSB flags
so that the driver can negotiate with the attached sensor
whether the mbus format needs convertion from UYUV to YUYV
or not.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The patch replaces Dib*Lock macros with direct calls to mutex functions
as soon as they just make the driver code harder to review
(per request of Mauro).
Antti Palosaari [Mon, 19 Mar 2012 19:27:47 +0000 (16:27 -0300)]
[media] rtl28xxu: dynamic USB ID support
DVB USB core refuses to load driver when current USB ID
does not match IDs on driver table. Due to that dynamic
IDs does not work. Replace reference design ID by dynamic
ID in .probe() in order to get it working.
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Santosh Nayak [Mon, 19 Mar 2012 10:27:37 +0000 (07:27 -0300)]
[media] dib0700: Return -EINTR and unlock mutex if locking attempts fails
In 'dib0700_i2c_xfer_new()' and 'dib0700_i2c_xfer_legacy()'
we are taking two locks:
1. i2c_mutex
2. usb_mutex
If attempt to take 'usb_mutex' lock fails then the previously taken
lock 'i2c_mutex' should be unlocked and -EINTR should be returned so
that caller can take appropriate action.
If locking attempt was interrupted by a signal then
we should return -EINTR. At present we are returning '0' for
such scenarios which is wrong.
Replace -EAGAIN by -EINTR as a return type for the the scenario
where locking attempt was interrupted by signal.
Gianluca Gennari [Thu, 15 Mar 2012 16:33:47 +0000 (13:33 -0300)]
[media] cxd2820r: tweak search algorithm behavior
MPIS based STBs running 3.x kernels and the Enigma2 OS are not able to tune
DVB-T channels with the PCTV 290e using the current cxd2820r driver.
DVB-T2 channels instead work properly.
This patch fixes the problem by changing the condition to break out from the
wait lock loop in the "search" function of the cxd2820r demodulator from
FE_HAS_SIGNAL to FE_HAS_LOCK.
As a consequence, the "search" function of the demodulator driver now returns
DVBFE_ALGO_SEARCH_SUCCESS only if the frequency lock is successfully acquired.
This behavior seems consistent with other demodulator drivers (e.g. stv090x,
hd29l2, stv0900, stb0899, mb86a16).
This patch has been successfully tested with DVB-T and DVB-T2 signals,
on both PC and the mipsel STB running Enigma2.
No apparent side effect has been observed on PC applications like Kaffeine.
DVB-C is not available in my country so it's not tested.
Gianluca Gennari [Thu, 15 Mar 2012 16:33:48 +0000 (13:33 -0300)]
[media] em28xx-dvb: enable LNA for cxd2820r in DVB-T mode
Enable the LNA amplifier also for DVB-T (like for DVB-T2 and DVB-C);
this greatly improves reception of weak signals without affecting the reception
of the strong ones.
Experimental data (collected with the mipsel STB) on the weakest frequencies
available in my area:
LNA OFF:
MUX level BER picture
RAI mux 4 72% 32000 corrupted
TIMB 2 75% 14 OK
TVA Vicenza 68% 32000 corrupted
RAI mux 2 78% 14 OK
LNA ON:
MUX level BER picture
RAI mux 4 73% 1500 OK
TIMB 2 76% 0 OK
TVA Vicenza 69% 0 OK
RAI mux 2 79% 0 OK
Moreover, with LNA enabled, the PCTV 290e was able to pick up 2 new frequencies
matching the integrated tuner of my Panasonic G20 TV, which is really good.
As reported by Masanari, this macro is using "KERN_ERR"
instead of "KERN_ERROR". That would lead into a compilation
breakage, if this macro were used somewhere inside the driver.
Instead of fixing the macro, as originally proposed, let's just
remove the dead code.
Ezequiel García [Fri, 24 Feb 2012 14:24:19 +0000 (11:24 -0300)]
[media] staging: easycap: Split audio buffer and urb allocation
When the device is probed, this driver allocates
audio buffers, and audio urbs.
This patch just split this into separate functions,
which helps clearing the currently gigantic probe function.
Ezequiel García [Fri, 24 Feb 2012 14:24:15 +0000 (11:24 -0300)]
[media] staging: easycap: Split buffer and video urb allocation
When the device is probed, this driver allocates
frame buffers, field buffers, isoc buffers and urbs.
This patch just split this into separate functions,
which helps clearing the currently gigantic probe function.
Hans Verkuil [Mon, 7 May 2012 19:53:20 +0000 (16:53 -0300)]
[media] v4l2-event: fix regression with initial event handling
If the V4L2_EVENT_SUB_FL_SEND_INITIAL was set, then the application expects
to receive an initial event of the initial value of the control.
However, commit c53c2549333b340e2662dc64ec81323476b69a97 that added the new
v4l2_subscribed_event_ops introduced a regression: while the code still queued
that initial event the __v4l2_event_queue_fh() function was modified to ignore
such requests if sev->elems was 0 (meaning that the event subscription wasn't
finished yet).
And sev->elems was only set to a non-zero value after the add operation
returned.
This patch fixes this by passing the elems value to the add function. Then the
add function can set it before queuing the initial event.
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>
Merge remote-tracking branch 'linus/master' into staging/for_v3.5
* linus/master: (805 commits)
tty: Fix LED error return
openvswitch: checking wrong variable in queue_userspace_packet()
bonding: Fix LACPDU rx_dropped commit.
Linux 3.4-rc7
ARM: EXYNOS: fix ctrlbit for exynos5_clk_pdma1
ARM: EXYNOS: use s5p-timer for UniversalC210 board
ARM / mach-shmobile: Invalidate caches when booting secondary cores
ARM / mach-shmobile: sh73a0 SMP TWD boot regression fix
ARM / mach-shmobile: r8a7779 SMP TWD boot regression fix
ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO hotplug helper
ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO hotplug helper
MAINTAINERS: Add myself as the cpufreq maintainer
dm mpath: check if scsi_dh module already loaded before trying to load
dm thin: correct module description
dm thin: fix unprotected use of prepared_discards list
dm thin: reinstate missing mempool_free in cell_release_singleton
gpio/exynos: Fix compiler warnings when non-exynos machines are selected
gpio: pch9: Use proper flow type handlers
powerpc/irq: Fix another case of lazy IRQ state getting out of sync
ks8851: Update link status during link change interrupt
...
On Mon, 2012-05-07 at 07:45 -0300, Mauro Carvalho Chehab wrote:
> Malcolm,
>
> Em 04-04-2012 20:00, Joe Perches escreveu:
> > Likely these should be && not ||
> >
> > drivers/scsi/FlashPoint.c: if(bit_cnt != 0 || bit_cnt != 8)
>
> > drivers/media/dvb/dvb-usb/it913x.c: if (ret == 0 || ret != -EBUSY || ret != -ETIMEDOUT)
> > drivers/media/dvb/dvb-usb/it913x.c: if (ret == 0 || ret != -EBUSY || ret != -ETIMEDOUT)
>
> Could you please take a look on the above?
Drivers that refer to a __devexit function in an operations
structure need to annotate that pointer with __devexit_p so
replace it with a NULL pointer when the section gets discarded.