Commit Graph

12876 Commits (f4af65958a6ea987ff61504ad9f053f8ba8da674)

Author SHA1 Message Date
Mauro Carvalho Chehab 1466194db5 [media] budget: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:47:08 -02:00
Mauro Carvalho Chehab 4f3fdaef68 [media] budget-av: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:44:38 -02:00
Mauro Carvalho Chehab 47b163af01 [media] dib0700_devices: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:43:24 -02:00
Mauro Carvalho Chehab afd2b38a09 [media] cxusb: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:43:05 -02:00
Mauro Carvalho Chehab c79c9fb37e [media] dib0070: Remove unused dvb_frontend_parameters
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:42:58 -02:00
Mauro Carvalho Chehab f40d0f012e [media] zl10036: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:42:48 -02:00
Mauro Carvalho Chehab 80d8d4985f [media] dvb-pll: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:42:33 -02:00
Mauro Carvalho Chehab cba3f88a6f [media] dvb-bt8xx: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:39:31 -02:00
Mauro Carvalho Chehab 9481f4009c [media] tuner-simple: use DVBv5 parameters on set_params()
Despite its name, tuner-simple has a complex logic to set freqs ;)

Basically, it can be called by two different ways: via set_params()
or via calc_regs() callbacks. Both are bound to the DVBv3 API.
Also, set_params internally calls calc_regs().

In order to get rid of DVBv3 params at set_params(), it shouldn't
call calc_regs() anymore. The code duplication is very small,
as most of the code there is just to check for invalid parameters.

With regards to calc_regs(), it should still trust on bandwidth and
frequency parameters passed via DVBv3, until a later patch fixes
it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:38:35 -02:00
Mauro Carvalho Chehab 57605c9680 [media] dvb-ttusb-budget: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:38:22 -02:00
Mauro Carvalho Chehab 2f786bbefc [media] pluto2: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:38:12 -02:00
Mauro Carvalho Chehab 31cbc53fe5 [media] mantis_vp2040: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:38:06 -02:00
Mauro Carvalho Chehab f0b6c2a90f [media] mantis_vp2033: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:38:01 -02:00
Mauro Carvalho Chehab 742905312a [media] mantis_vp1033: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:37:56 -02:00
Mauro Carvalho Chehab 93ce675c5c [media] mxl111sf-tuner: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:37:51 -02:00
Mauro Carvalho Chehab 66e6cd596c [media] tda826x: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:37:45 -02:00
Mauro Carvalho Chehab 3608dbb6dc [media] stb6000: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:37:40 -02:00
Mauro Carvalho Chehab 3cc66df680 [media] ix2505v: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:37:36 -02:00
Mauro Carvalho Chehab e7e10deb58 [media] bsbe1, bsru6, tdh1: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:37:29 -02:00
Mauro Carvalho Chehab ab3eee078f [media] itd1000: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:36:47 -02:00
Mauro Carvalho Chehab 5918288a42 [media] tua6100: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:36:38 -02:00
Mauro Carvalho Chehab b738ae160a [media] cx88: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:33:19 -02:00
Mauro Carvalho Chehab b09cf61dfe [media] saa7134: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:33:14 -02:00
Mauro Carvalho Chehab a0a9ff7f58 [media] budget-patch: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:33:08 -02:00
Mauro Carvalho Chehab 9b54464f16 [media] budget-ci: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:31:55 -02:00
Mauro Carvalho Chehab e439aedf54 [media] av7110: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:30:57 -02:00
Mauro Carvalho Chehab 8579881bb6 [media] zl10039: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:27:58 -02:00
Mauro Carvalho Chehab 27b7faf13a [media] cx24113: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:27:54 -02:00
Mauro Carvalho Chehab 40d6f2b837 [media] xc4000: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:27:49 -02:00
Mauro Carvalho Chehab 506cd71454 [media] tuner-xc2028: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:27:44 -02:00
Mauro Carvalho Chehab 53ccd1ca69 [media] tda827x: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:27:39 -02:00
Mauro Carvalho Chehab 5ca1c94dea [media] tda18271-fe: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:27:34 -02:00
Mauro Carvalho Chehab ce0e93a52a [media] tda18271: add support for QAM 7 MHz map
This standard is not properly documented, but its settings are at
the tda18271dd driver, and are somewhat obvious, as they follow
the same logic as DVB-T 7MHz.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:27:27 -02:00
Mauro Carvalho Chehab 67ccfe3b9e [media] tda18218: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:27:22 -02:00
Mauro Carvalho Chehab e12617e6f0 [media] mxl5007t: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:27:16 -02:00
Mauro Carvalho Chehab 1b750d09fe [media] mxl5005s: fix: don't discard bandwidth changes
There is a bug on mxl5005s logic: when the bandwidth changes, but using
the same delivery system, the code discard the set_params()
reconfiguration request.

This was happening because, in the previous coding, the bandwidth
calculus were after the check for delivery system changes.

The previous patch changed the logic to estimate the bandwidth to
happend together with the changes at the delivery system.

So, with a one-statement change, it is possible to make the tuner to
reconfigure, in order to adjust to bandwidth changes. this will
likely fix issues on countries that use 7MHz/8MHz DVB-T channels.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:27:11 -02:00
Mauro Carvalho Chehab 9818d7dff2 [media] mxl5005s: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:27:06 -02:00
Mauro Carvalho Chehab 82c0126ff2 [media] mt2266: use DVBv5 parameters for set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:27:01 -02:00
Mauro Carvalho Chehab 9f1791618a [media] max2165: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:26:56 -02:00
Mauro Carvalho Chehab 35fea0649e [media] mc44s803: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:26:50 -02:00
Mauro Carvalho Chehab 01ce5a7915 [media] mt2031: remove fake implementaion of get_bandwidth()
This driver implements a fake get_bandwidth() callback. In
reallity, the tuner driver won't adjust its low-pass
filter based on a bandwidth, and were just providing a fake
method for demods to read whatever was "set".

This code is useless, as none of the drivers that use
this tuner seems to require a get_bandwidth() callback.

While here, convert set_params to use the DVBv5 way to pass
parameters to tuners.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:26:44 -02:00
Mauro Carvalho Chehab 2676c258eb [media] mt2060: remove fake implementaion of get_bandwidth()
This driver implements a fake get_bandwidth() callback. In
reallity, the tuner driver won't adjust its low-pass
filter based on a bandwidth, and were just providing a fake
method for demods to read whatever was "set".

This code is useless, as none of the drivers that use
this tuner seems to require a get_bandwidth() callback.

While here, convert set_params to use the DVBv5 way to pass
parameters to tuners.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:26:40 -02:00
Mauro Carvalho Chehab 8b80ff3ad5 [media] qt1010: remove fake implementaion of get_bandwidth()
This driver implements a fake get_bandwidth() callback. In
reallity, the tuner driver won't adjust its low-pass
filter based on a bandwidth, and were just providing a fake
method for demods to read whatever was "set".

This code is useless, as none of the drivers that use
this tuner seems to require a get_bandwidth() callback.

While here, convert set_params to use the DVBv5 way to pass
parameters to tuners.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:26:35 -02:00
Mauro Carvalho Chehab 0607d07780 [media] dvb_core: estimate bw for all non-terrestial systems
Instead of just estimating the bandwidth for DVB-C annex A/C,
also fill it at the core for ATSC and DVB-C annex B. This
simplifies the logic inside the tuners, as all non-satellite
tuners can just use c->bandwidth_hz for all supported
delivery systems.

It could make sense to latter use it also for satellite
systems, as several DVB-S drivers have their own calculus.
However, on DVB-S2 the bw estimation is a little more complex,
and the existing drivers have some optimized calculus for
bandwidth. So, let's not touch on it for now.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:26:29 -02:00
Mauro Carvalho Chehab 0349471bc5 [media] dvb: replace SYS_DVBC_ANNEX_AC by the right delsys
SYS_DVBC_ANNEX_AC is an alias for SYS_DVBC_ANNEX_A. However,
the first one is incorrect, as not all devices support both.
So, replace its occurrences by the proper value (either
SYS_DVBC_ANNEX_A or both SYS_DVBC_ANNEX_A and SYS_DVBC_ANNEX_C).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 08:26:24 -02:00
David Fries 7b0962d323 [media] cx88-dvb avoid dangling core->gate_ctrl pointer
dvb_register calls videobuf_dvb_register_bus, but if that returns
a failure the module will be unloaded without clearing the
value of core->gate_ctrl which will cause an oops in macros
called from video_open in cx88-video.c

Signed-off-by: David Fries <David@Fries.net>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Istvan Varga <istvan_v@mailbox.hu>
Cc: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 17:38:15 -02:00
Dan Carpenter b16ec6f735 [media] tm6000: using an uninitialized variable in debug code
dprintk() dereferences "ir".  I'm not sure why gcc doesn't complain
about this.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 17:32:48 -02:00
Aivar Päkk 1985f6fb89 [media] KWorld 355U and 380U support
This patch adds Kworld 355U and 380U support

Signed-off-by: Aivar Päkk <aivar11@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 17:25:00 -02:00
Malcolm Priestley f36472da3a [media] it913x stop dual frontend attach in warm state with single devices
Stop dual frontend attach in warm state with single devices.

Since this is a no reconnect device this occurs only after a warm system
reboot.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 17:22:36 -02:00
Malcolm Priestley a7187c324f [media] [BUG] Re: add support for IT9135 9005 devices
Re: [git:v4l-dvb/for_v3.3] [media] it9135:  add support for IT9135 9005 devices
On Sun, 2011-12-11 at 11:55 +0100, 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] it9135:  add support for IT9135 9005 devices
> Author:  Malcolm Priestley <tvboxspy@gmail.com>
> Date:    Wed Nov 30 17:16:09 2011 -0300
>
> Support add for IT9135 9005 devices
>
> With this patch IT9135 devices now move to using
> dvb-usb-it9135-01.fw firmware
> IT9137 remain on previous firmware.
Hi Mauro,

I have made a small mistake on this patch.

I forgot to increase number of num_device_descs to 4.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 17:22:26 -02:00
Thomas Meyer 1b7acf0ccd [media] xc4000: Use kcalloc instead of kzalloc to allocate array
The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 17:22:21 -02:00
Thomas Meyer 9884d7bea7 [media] v4l2-ctrls: Use kcalloc instead of kzalloc to allocate array
The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 17:22:17 -02:00
Thomas Meyer d0d97488dd [media] uvcvideo: Use kcalloc instead of kzalloc to allocate array
The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 17:22:12 -02:00
Thomas Meyer 505b534d96 [media] v4l: s5p-tv: Use kcalloc instead of kzalloc to allocate array
The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 17:22:08 -02:00
Andreas Oberritter b9d5efcceb [media] DVB: dvb_frontend: fix delayed thread exit
There are some issues and miss-behaves at the dvb fe thread:

1) dvb_shutdown_timeout should be dvb_shutdown_timeout * HZ
   instead of (dvb_shutdown_timeout * HZ + 1);

2) add a memory barrier to warrant that all CPU's will consider the
   new value for release_jiffies;

3) wake up dvb thread also when fepriv->exit == DVB_FE_NO_EXIT.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 17:16:01 -02:00
Stas Sergeev a1dca1e30a [media] [saa7134] do not change mute state for capturing audio
The attached patch fixes the automute logic of saa7134.
It avoids the white noise on the pulseaudio startup.
(pulseaudio reads the saa7134 alsa device on startup)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 17:07:38 -02:00
Xi Wang 8cc20dd89c [media] wl128x: fmdrv_tx: fix signedness bugs
Message-Id: <1322820073-19347-4-git-send-email-xi.wang@gmail.com>

The error handling with (ret < 0) didn't work where ret is a u32.
Use int instead.  To be consistent we also change the functions to
return an int.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 17:01:52 -02:00
Xi Wang d24674c60b [media] wl128x: fmdrv_rx: fix signedness bugs
Message-Id: <1322820073-19347-3-git-send-email-xi.wang@gmail.com>

The error handling with (ret < 0) didn't work where ret is a u32.
Use int instead.  To be consistent we also change the functions to
return an int.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 17:01:38 -02:00
Xi Wang a61278037b [media] wl128x: fmdrv_common: fix signedness bugs
Message-Id: <1322820073-19347-2-git-send-email-xi.wang@gmail.com>

The error handling with (ret < 0) didn't work where ret is a u32.
Use int instead.  To be consistent we also change the functions to
return an int.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 17:00:56 -02:00
Hans de Goede 27d3e36609 [media] gscpa_vicam: Fix oops if unplugged while streaming
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 16:22:04 -02:00
Hans de Goede 69c003996b [media] gspca_pac207: Raise max exposure + various autogain setting tweaks
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 16:21:48 -02:00
Hans de Goede 47faa6f836 [media] gspca: Fix bulk mode cameras no longer working (regression fix)
The new iso bandwidth calculation code accidentally has broken support
for bulk mode cameras. This has broken the following drivers:
finepix, jeilinj, ovfx2, ov534, ov534_9, se401, sq905, sq905c, sq930x,
stv0680, vicam.

Thix patch fixes this. Fix tested with: se401, sq905, sq905c, stv0680 &
vicam cams.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 16:21:30 -02:00
Mauro Carvalho Chehab 57e43cfb6c [media] videobuf2-core: fix a warning at vb2
It seems that a cut-and-past error were added by the last patch:

drivers/media/video/videobuf2-core.c: In function ‘vb2_qbuf’:
drivers/media/video/videobuf2-core.c:1099:14: warning: comparison between ‘enum v4l2_buf_type’ and ‘enum v4l2_memory’ [-Wenum-compare]

On all places V4L2_MEMORY_USERPTR is used, it is associated with
q->memory, and not b->type. So, the fix seems obvious.

Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 16:12:43 -02:00
Andrzej Pietrasiewicz 4419b8aca8 [media] media: vb2: vmalloc-based allocator user pointer handling
This patch adds support for user pointer memory buffers to vmalloc
videobuf2 allocator.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 16:08:06 -02:00
Marek Szyprowski a00d026637 [media] media: vb2: review mem_priv usage and fix potential bugs
This patch is a result of review of mem_priv entry usage in videobuf2 core.
It fixes all all potential places where it was not checked against NULL or
zeroed after freeing as well as a few style issues.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 16:07:43 -02:00
Marek Szyprowski 5931ffe3be [media] media: vb2: remove plane argument from call_memop and cleanup mempriv usage
This patch removes unused 'plane' argument from call_memop macro.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 16:07:07 -02:00
Marek Szyprowski b037c0fde2 [media] media: vb2: fix potential deadlock in mmap vs. get_userptr handling
To get direct access to userspace memory pages vb2 allocator needs to
gather read access on mmap semaphore in the current process.
The same semaphore is taken before calling mmap operation, while
both mmap and qbuf are called by the driver or v4l2 core with
driver's lock held. To avoid a AB-BA deadlock (mmap_sem then
driver's lock in mmap and driver's lock then mmap_sem in qbuf)
the videobuf2 core release driver's lock, takes mmap_sem and then
takes again driver's lock. get_userptr methods are now called with
all needed locks already taken to avoid further lock magic inside
memory allocator's code.

Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 16:06:49 -02:00
Marek Szyprowski f0b7c7fc6f [media] media: vb2: fix queueing of userptr buffers with null buffer pointer
Heuristic that checks if the memory pointer has been changed lacked a check
if the pointer was actually provided by the userspace, what allowed one to
queue a NULL pointer which was accepted without further checking. This
patch fixes this issue.

Reported-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 16:03:46 -02:00
Michael Krufky 54828d19f8 [media] lgdt330x: warn on errors blasting modulation config to the lgdt3303
fix the following build warning:

lgdt330x.c: In function "lgdt330x_set_parameters":
lgdt330x.c:346:6: warning: variable "err" set but not used
[-Wunused-but-set-variable]

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 15:58:01 -02:00
Michael Krufky 26110dac8b [media] lgdt330x: fix behavior of read errors in lgdt330x_read_ucblocks
initialize *ucblocks to zero & fix the following build warning:

lgdt330x.c: In function "lgdt330x_read_ucblocks":
lgdt330x.c:288:6: warning: variable "err" set but not used
[-Wunused-but-set-variable]

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 15:57:29 -02:00
Manu Abraham 7e7b8287af [media] PCTV290E: Attach a single frontend
PCTV290E: Attach a single frontend, rather than a frontend each per
delivery system, whereby a multistandard frontend can advertise all
associated delivery systems.

Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 15:52:01 -02:00
Manu Abraham 14c038627e [media] CXD2820r: Query DVB frontend delivery capabilities
Override default delivery system information provided by FE_GET_INFO,
so that applications can enumerate delivery systems provided by the
frontend.

Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 15:50:29 -02:00
Mauro Carvalho Chehab 1ca8dde859 [media] tda18271c2dd: fix support for DVB-C
As reported by Hartmut <e9hack@googlemail.com>:

> A break is missing before the default statement. Delivery systems for DVB-C result always
> in an error.

Reported-by: Hartmut <e9hack@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 15:34:51 -02:00
Antti Palosaari f571e004c3 [media] af9013: rewrite whole driver
Rewrite whole af9013 demod driver in order to decrease I2C I/O.

We need to decrease I2C load since AF9015 (I2C adapter / USB-bridge used)
seems to have some problems under heavy I2C traffic.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 15:31:33 -02:00
Antti Palosaari e90ab840fb [media] af9015: limit I2C access to keep FW happy
AF9015 firmware does not like if it gets interrupted by I2C adapter
request on some critical phases. During normal operation I2C adapter
is used only 2nd demodulator and tuner on dual tuner devices.

Override demodulator callbacks and use mutex for limit access to
those "critical" paths to keep AF9015 happy.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 15:30:03 -02:00
Sylwester Nawrocki 6cf1056f0a [media] s5p-csis: Enable v4l subdev device node
Set v4l2_subdev flags for a host driver to create a sub-device
node for the driver so the subdev can be directly configured
by applications. Add the subdev open() handler.

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-12-30 14:39:54 -02:00
Sylwester Nawrocki 87eaec5dff [media] m5mols: Enable v4l subdev device node
Set V4L2_SUBDEV_FL_HAS_DEVNODE flag for the host driver to create
the sensor device node.

Acked-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>
2011-12-30 14:39:34 -02:00
Sylwester Nawrocki 12ba77ee7b [media] m5mols: Change auto exposure control default value to AUTO
Enabling automatic exposure yields better image quality. With this setting
the anti-flicker algorithm is also enabled in automatic frequency detection
mode which effectively eliminates distortion from fluctuations of light
intensity at power line frequency.

Acked-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>
2011-12-30 14:39:13 -02:00
Sylwester Nawrocki f428948b98 [media] m5mols: Do not reset the configured pixel format when unexpected
Initialize default pixel format in driver probe() rather than in
s_power handler. This also prevents resetting the configuration
applied before the device was powered on.

Acked-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>
2011-12-30 14:38:54 -02:00
Sylwester Nawrocki aa1f4601ed [media] m5mols: Move the control handler initialization to probe()
This is prerequisite for enabling the sub-device node.

The control handler is now initialized in driver's probe callback
in order to allow the user space access controls before the device
power is enabled with s_power. This is needed due to s_power being
currently called only by the host driver.

It also adds the subdev internal operations, only open() for now
for the TRY format initialization.

Acked-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>
2011-12-30 14:38:39 -02:00
Sylwester Nawrocki 5d4294b8dd [media] m5mols: Don't ignore v4l2_ctrl_handler_setup() return value
v4l2_ctrl_handler_setup() may fail so check its return value when
restoring controls after device is powered on. While at it simplify
the m5mols_restore_function() a bit.

Acked-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>
2011-12-30 14:38:06 -02:00
Sylwester Nawrocki d5048c9a28 [media] m5mols: Change the end of frame v4l2_subdev notification id
Change the v4l2_device notifications id to S5P_FIMC_TX_END_NOTIFY.

Moreover, when frame capture fails, send an 'end of frame' notification
with size set to 0 to let the host driver return a buffer back to the
user and prevent applications waiting forever on DQBUF.

The notification is needed only for the s5p-fimc driver.

Acked-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>
2011-12-30 14:37:40 -02:00
HeungJun Kim 92e93a1fd0 [media] m5mols: Optimize the capture set up sequence
Improve the single frame capture set up sequence. Since there is
no need to re-enable the interrupts in each capture sequence, unmask
the required interrupts once at the device initialization time.

Signed-off-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>
2011-12-30 14:35:43 -02:00
HeungJun Kim 0f2ee1dd49 [media] m5mols: Add support for the system initialization interrupt
The M-5MOLS internal controller's initialization time depends on the
hardware and firmware revision. Currently the driver just waits for
worst case time period, after applying the voltage supplies, for
the device to be ready. The M-5MOLS supports "System initialization"
interrupt which is triggered after the controller finished booting.
So use this interrupt to optimize the initialization sequence.

After the voltage supplies are applied the I2C communication will
fail, until the internal controller initializes to Flash Writer
state. For the period when the I2C is not accessible use the
isp_ready flag to suppress the error logs.

Signed-off-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>
2011-12-30 14:35:25 -02:00
Sylwester Nawrocki 630caa23b7 [media] m5mols: Remove mode_save field from struct m5mols_info
There is no need to keep this in the drivers' private data structure,
an on the stack variable is enough. Also simplify a bit the ISP state
switching function.

Acked-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>
2011-12-30 14:34:46 -02:00
HeungJun Kim ce808a478a [media] m5mols: Improve the interrupt handling routines
The work struct based interrupt handling is not flexible enough
as the M-5MOLS control sequence involves I2C access sequences
before and after an interrupt is generated. A single waitqueue is
enough for the job so remove the work struct based code.

Signed-off-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>
2011-12-30 14:34:27 -02:00
HeungJun Kim 575d6252a7 [media] m5mols: Extend the busy wait helper
Make m5mols_busy_wait function jiffies based rather than relying
on some fixed number of I2C read iterations while busy waiting
for the device to execute a request. With fixed number of iterations
we may be getting different wait times, depending on the I2C speed.

In some conditions we have to wait even if the I2C communications
fails, in those cases M5MOLS_I2C_RDY_WAIT_MASK should be passed
as the mask argument to m5mols_busy_wait().

Signed-off-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>
2011-12-30 14:33:09 -02:00
Sylwester Nawrocki 69eb180320 [media] m5mols: Simplify the I2C registers definition
The redundant definitions of the m5mols I2C register addresses within
the pages (categories) are removed. In place of symbolic definitions
plain numbers are used which simplifies the code and eases identifying
the registers in the documentation.

Also make the m5mols_busy() function accept I2C_REG() value as a register
address, like all other functions, rather than using the category and
command values.

Acked-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>
2011-12-30 14:16:24 -02:00
Sylwester Nawrocki dafb9c70ab [media] s5p-fimc: Add support for alpha component configuration
On Exynos SoCs the FIMC IP allows to configure globally the alpha
component of all pixels for V4L2_PIX_FMT_RGB32, V4L2_PIX_FMT_RGB555
and V4L2_PIX_FMT_RGB444 image formats. This patch adds a v4l2 control
in order to let the applications control the alpha component value.

The alpha value range depends on the pixel format, for RGB32 it's
0..255 (8-bits), for RGB555 - 0..1 (1-bit) and for RGB444 - 0..15
(4-bits). The v4l2 control range is always 0..255 and the alpha
component data width is determined by currently set format on the
V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE buffer queue. The applications
need to match the alpha channel value range and the pixel format
since the driver will clamp the alpha component. Depending on
fourcc the valid alpha bits are:

 - V4L2_PIX_FMT_RGB555  [0]
 - V4L2_PIX_FMT_RGB444  [3:0]
 - V4L2_PIX_FMT_RGB32   [7:0]

When switching to a pixel format with smaller alpha component width
the currently set alpha value will be clamped to maximum value valid
for current format. When switching to a format with wider alpha the
alpha value remains unchanged.

The variant description data structure is extended with a new entry
so an additional control is created only where really supported by
the hardware.

V4L2_PIX_FMT_RGB555 and V4L2_PIX_FMT_RGB444 formats are only valid
for V4L2_BUF_TYPE_VIDEO_CAPTURE buffer queue.

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-12-30 14:06:14 -02:00
Sylwester Nawrocki cc1d327232 [media] v4l: Add new alpha component control
The V4L2_CID_ALPHA_COMPONENT control is intended for the video capture
or memory-to-memory devices that are capable of setting up the per-pixel
alpha component to some arbitrary value. It allows to set the alpha
component for all pixels to an arbitrary value.

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-12-30 14:05:08 -02:00
Mauro Carvalho Chehab b4d48c942c Merge tag 'v3.2-rc7' into staging/for_v3.3
Linux 3.2-rc7

* tag 'v3.2-rc7': (1304 commits)
  Linux 3.2-rc7
  netfilter: xt_connbytes: handle negation correctly
  Btrfs: call d_instantiate after all ops are setup
  Btrfs: fix worker lock misuse in find_worker
  net: relax rcvbuf limits
  rps: fix insufficient bounds checking in store_rps_dev_flow_table_cnt()
  net: introduce DST_NOPEER dst flag
  mqprio: Avoid panic if no options are provided
  bridge: provide a mtu() method for fake_dst_ops
  md/bitmap: It is OK to clear bits during recovery.
  md: don't give up looking for spares on first failure-to-add
  md/raid5: ensure correct assessment of drives during degraded reshape.
  md/linear: fix hot-add of devices to linear arrays.
  sparc64: Fix MSIQ HV call ordering in pci_sun4v_msiq_build_irq().
  pata_of_platform: Add missing CONFIG_OF_IRQ dependency.
  ipv4: using prefetch requires including prefetch.h
  VFS: Fix race between CPU hotplug and lglocks
  vfs: __read_cache_page should use gfp argument rather than GFP_KERNEL
  USB: Fix usb/isp1760 build on sparc
  net: Add a flow_cache_flush_deferred function
  ...

Conflicts:
	drivers/media/common/tuners/tda18218.c
	drivers/media/video/omap3isp/ispccdc.c
	drivers/staging/media/as102/as102_drv.h
2011-12-30 13:59:37 -02:00
Hans de Goede 757e55c23d gspca: Fix bulk mode cameras no longer working (regression fix)
The new iso bandwidth calculation code accidentally has broken support
for bulk mode cameras. This has broken the following drivers:
finepix, jeilinj, ovfx2, ov534, ov534_9, se401, sq905, sq905c, sq930x,
stv0680, vicam.

Thix patch fixes this. Fix tested with: se401, sq905, sq905c, stv0680 & vicam
cams.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-12-29 16:29:00 -08:00
Linus Torvalds 4d18de9449 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] omap3isp: Fix crash caused by subdevs now having a pointer to devnodes
2011-12-23 14:59:08 -08:00
Linus Torvalds 62d7a2927f Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (31 commits)
  Revert "[media] af9015: limit I2C access to keep FW happy"
  [media] s5p-fimc: Fix camera input configuration in subdev operations
  [media] m5mols: Fix logic in sanity check
  [media] ati_remote: switch to single-byte scancodes
  [media] V4L: mt9m111: fix uninitialised mutex
  [media] V4L: omap1_camera: fix missing <linux/module.h> include
  [media] V4L: mt9t112: use after free in mt9t112_probe()
  [media] V4L: soc-camera: fix compiler warnings on 64-bit platforms
  [media] s5p_mfc_enc: fix s/H264/H263/ typo
  [media] omap_vout: Fix compile error in 3.1
  [media] au0828: add missing models 72101, 72201 & 72261 to the model matrix
  [media] au0828: add missing USB ID 2040:7213
  [media] au0828: add missing USB ID 2040:7260
  [media] [trivial] omap24xxcam-dma: Fix logical test
  [media] omap_vout: fix crash if no driver for a display
  [media] media: video: s5p-tv: fix build break
  [media] omap3isp: fix compilation of ispvideo.c
  [media] m5mols: Fix set_fmt to return proper pixel format code
  [media] s5p-fimc: Use correct fourcc for RGB565 colour format
  [media] s5p-fimc: Fail driver probing when sensor configuration is wrong
  ...
2011-12-20 10:49:39 -08:00
Mauro Carvalho Chehab 1a5cd29631 [media] tda10021: Add support for DVB-C Annex C
While tda10021 supports both DVB-C Annex A and C, it is currently
hard-coded to Annex A. Add support for Annex C and re-work the
code in order to report the delivery systems, thans to Andreas,
that passed us the register settings for the Roll-off factor.

Thanks-to: Andreas Oberriter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 14:01:08 -02:00
Mauro Carvalho Chehab 27d9a5e938 [media] tda10021: Don't use a magic numbers for QAM modulation
Convert the existing data struct to use the QAM modulation macros,
instead of assuming that they're numbered from 0 to 5.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 13:55:47 -02:00
Mauro Carvalho Chehab 74b4576e63 [media] tda10023: add support for DVB-C Annex C
The difference between Annex A and C is the roll-off factor.
Properly implement it inside the driver, using the information
provided by Andreas.

Thanks-to: Andreas Oberriter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 13:51:51 -02:00
Mauro Carvalho Chehab 37c52abd56 [media] tda10023: Don't use a magic numbers for QAM modulation
Convert the existing data struct to use the QAM modulation macros,
instead of assuming that they're numbered from 0 to 5.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 13:27:19 -02:00
Mauro Carvalho Chehab 0d7d0ac87b [media] drx-k: report the supported delivery systems
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 11:50:37 -02:00
Mauro Carvalho Chehab fd66c45dd5 [media] Remove Annex A/C selection via roll-off factor
Instead of using a roll-off factor, change DRX-K & friends to select
the bandwidth filter and the Nyquist half roll-off via delivery system.

This provides a cleaner support for Annex A/C switch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 11:50:23 -02:00
Laurent Pinchart 875e2e3edf [media] omap3isp: Mark next captured frame as faulty when an SBL overflow occurs
Instead of trying to propagate errors down the pipeline manually (and
failing to do so properly in all cases), flag SBL errors in the pipeline
to which the entity that triggered the error belongs, and use pipeline
error flags to mark buffers as faulty when completing them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 09:53:43 -02:00
Laurent Pinchart c3cd257402 [media] omap3isp: video: Don't WARN() on unknown pixel formats
When mapping from a V4L2 pixel format to a media bus format in the
VIDIOC_TRY_FMT and VIDIOC_S_FMT handlers, the requested format may be
unsupported by the driver. Return a hardcoded format instead of
WARN()ing in that case.

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-12-20 09:37:09 -02:00
Laurent Pinchart 22db44cb9c [media] as3645a: Add driver for LED flash controller
This patch adds the driver for the as3645a LED flash controller. This
controller supports a high power led in flash and torch modes and an
indicator light, sometimes also called privacy light.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Nayden Kanchev <nkanchev@mm-sol.com>
Signed-off-by: Tuukka Toivonen <tuukkat76@gmail.com>
Signed-off-by: Antti Koskipaa <antti.koskipaa@gmail.com>
Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Vimarsh Zutshi <vimarsh.zutshi@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Signed-off-by: David Cohen <dacohen@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 09:36:18 -02:00
Clemens Ladisch fa5034c667 [media] media: fix truncated entity specification
When enumerating an entity, assign the entire entity specification
instead of only the first two words. (This requires giving the
specification union a name.)

So far, no driver actually uses more than two words, but this will
be needed for ALSA entities.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
[laurent.pinchart@ideasonboard.com: Rename specification to info]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 09:31:50 -02:00
Laurent Pinchart bd0f2e6da7 [media] omap3isp: ccdc: Fix crash in HS/VS interrupt handler
The HS/VS interrupt handler needs to access the pipeline object. It
erronously tries to get it from the CCDC output video node, which isn't
necessarily included in the pipeline. This leads to a NULL pointer
dereference.

Fix the bug by getting the pipeline object from the CCDC subdev entity.

Reported-by: Gary Thomas <gary@mlbassoc.com>
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-12-20 09:30:10 -02:00
Laurent Pinchart ec0cae7a56 [media] omap3isp: preview: Rename max output sizes defines
The maximum preview engine output size depends on the ISP revision, not
the OMAP revision. Rename the macros accordingly.

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-12-20 09:28:39 -02:00
Michael Krufky 0d6ac1f8a5 [media] mxl111sf: absorb size_of_priv into *_STREAMING_CONFIG macros
absorb ".size_of_priv = sizeof(struct mxl111sf_adap_state)"
into *_STREAMING_CONFIG macros

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20 09:26:53 -02:00
Laurent Pinchart c070e38e4e [media] omap3isp: Fix crash caused by subdevs now having a pointer to devnodes
Commit 3e0ec41c5c ("V4L: dynamically
allocate video_device nodes in subdevices") makes the
embedding video_device directly.

Fix accesses to the devnode accordingly.

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-12-19 18:07:41 -02:00
Mauro Carvalho Chehab 5183c13797 [media] budget-ci: Fix Hauppauge RC-5 IR support
Hauppauge RC-5 tables require the full scancodes. The code at budget-ci
handles it right, however, it request the rc-code to mask them with 0xff,
breaking support for some remote controllers.

Fix it by not selecting a scancode mask when the driver is on full_rc5 mode.

Reported-by: Brian May <brian@microcomaustralia.com.au>
Tested-by: Brian May <brian@microcomaustralia.com.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-17 22:15:02 -02:00
Mauro Carvalho Chehab 4b5d8da88e Revert "[media] af9015: limit I2C access to keep FW happy"
This reverts commit ff83bd82cb.

As requested by Antti:
From a talk with him at #linuxtv irc, he strong feeling that some apps
like MythTV will do a lot a lot of I2C I/O and now it adds locks,
with utimatelly means more delays. This could cause bad effects.

There is a new patch for 3.3 that re-writes af9013 in order to limit
I2C I/O. and thus those patches could be nice to have together
because those user who has has problems are most likely MythTV users.

So, let's revert this commit for now.

Requested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-12 16:02:15 -02:00
Manu Abraham bcc072756e [media] STV0900: Query DVB frontend delivery capabilities
Override default delivery system information provided by FE_GET_INFO, so
that applications can enumerate delivery systems provided by the frontend.

Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-12 15:04:34 -02:00
Manu Abraham 6bad3aeb8c [media] STV090x: Query DVB frontend delivery capabilities
Override default delivery system information provided by FE_GET_INFO, so
that applications can enumerate delivery systems provided by the frontend.

Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-12 15:04:22 -02:00
Manu Abraham 61d4f9c918 [media] STB0899: Query DVB frontend delivery capabilities
Override default delivery system information provided by FE_GET_INFO, so
that applications can enumerate delivery systems provided by the frontend.

Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-12 15:04:05 -02:00
Manu Abraham ba2780c796 [media] DVB: Query DVB frontend delivery capabilities
Currently, for any multi-standard frontend it is assumed that it just
 has a single standard capability. This is fine in some cases, but
 makes things hard when there are incompatible standards in conjuction.
 Eg: DVB-S can be seen as a subset of DVB-S2, but the same doesn't hold
 the same for DSS. This is not specific to any driver as it is, but a
 generic issue. This was handled correctly in the multiproto tree,
 while such functionality is missing from the v5 API update.

 http://www.linuxtv.org/pipermail/vdr/2008-November/018417.html

 Later on a FE_CAN_2G_MODULATION was added as a hack to workaround this
 issue in the v5 API, but that hack is incapable of addressing the
 issue, as it can be used to simply distinguish between DVB-S and
 DVB-S2 alone, or another X vs X2 modulation. If there are more systems,
 then you have a potential issue.

 An application needs to query the device capabilities before requesting
 any operation from the device.

Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Acked-by: Andreas Oberritter <obi@linuxtv.org>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-12 15:03:32 -02:00
Thomas Meyer e79c70e6e5 [media] pvrusb2: Use kcalloc instead of kzalloc to allocate array
The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Acked-By: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-12 14:51:11 -02:00
Mauro Carvalho Chehab 56a8b9f181 [media] tm6000: Fix a warning at tm6000_ir_int_start()
drivers/media/video/tm6000/tm6000-input.c: In function ‘tm6000_ir_int_start’:
drivers/media/video/tm6000/tm6000-input.c:381:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 12:20:49 -02:00
Sylwester Nawrocki 393a23fc93 [media] s5p-fimc: Fix camera input configuration in subdev operations
When using only subdev user-space operations the camera
interface input was not configured properly. Fix this by
updating the corresponding data structure in set_fmt
operation.

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-12-11 12:08:51 -02:00
Thomas Jarosch a32390d808 [media] m5mols: Fix logic in sanity check
Detected by "cppcheck".

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 12:08:21 -02:00
Kamil Debski a16fa71d6b [media] s5p-g2d: remove two unused variables from the G2D driver
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-12-11 12:02:47 -02:00
Haogang Chen 806e23e95f [media] uvcvideo: Fix integer overflow in uvc_ioctl_ctrl_map()
There is a potential integer overflow in uvc_ioctl_ctrl_map(). When a
large xmap->menu_count is passed from the userspace, the subsequent call
to kmalloc() will allocate a buffer smaller than expected.
map->menu_count and map->menu_info would later be used in a loop (e.g.
in uvc_query_v4l2_ctrl), which leads to out-of-bound access.

The patch checks the ioctl argument and returns -EINVAL for zero or too
large values in xmap->menu_count.

Signed-off-by: Haogang Chen <haogangchen@gmail.com>
[laurent.pinchart@ideasonboard.com Prevent excessive memory consumption]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 11:23:54 -02:00
Laurent Pinchart 66847ef013 [media] uvcvideo: Add UVC timestamps support
UVC devices transmit a device timestamp along with video frames. Convert
the timestamp to a host timestamp and use it to fill the V4L2 buffer
timestamp field.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 11:23:30 -02:00
Laurent Pinchart 25738cbd72 [media] uvcvideo: Extract timestamp-related statistics
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 11:22:08 -02:00
Alexey Fisher 7bc5edb00b [media] uvcvideo: Extract video stream statistics
Export the statistics through debugfs.

Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 11:22:08 -02:00
Alexey Fisher edbaa39842 [media] uvcvideo: Add debugfs support
Create a debugfs entry per UVC stream. This will be used to export
stream statistics.

Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[mchehab@redhat.com: add incude <linux/module.h> to avoid compilation breakage]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 11:22:07 -02:00
Laurent Pinchart c4d99f89e2 [media] uvcvideo: Ignore GET_RES error for XU controls
GET_RES request support is mandatory for extension units, but some
cameras still choke on it (one example is the Logitech QuickCam PTZ that
returns a single byte for the PTZ relative control instead of four).

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 11:15:01 -02:00
Laurent Pinchart 3afedb9585 [media] uvcvideo: Don't skip erroneous payloads
Instead of skipping the payload completely, which would make the
resulting image corrupted anyway, store the payload normally and mark
the buffer as erroneous. If the no_drop module parameter is set to 1 the
buffer will then be passed to userspace, and tt will then be up to the
application to decide what to do with the buffer.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 11:14:31 -02:00
Laurent Pinchart 0c6a3b268e [media] uvcvideo: Make uvc_commit_video() static
The function is not used outside of its compilation unit. Make it
static.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 11:14:04 -02:00
Laurent Pinchart 4eb2697e0a [media] uvcvideo: Add support for LogiLink Wireless Webcam
The camera requires the PROBE_MINMAX quirk. Add a corresponding entry in
the device IDs list.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 11:13:52 -02:00
Laurent Pinchart b10c55d808 [media] uvcvideo: Remove duplicate definitions of UVC_STREAM_* macros
The macros are defined in both drivers/media/video/uvc/uvc_video.c and
include/linux/usb/video.h. Remove definitions from the former.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 11:13:40 -02:00
Laurent Pinchart 24c3aae0c7 [media] uvcvideo: Handle uvc_init_video() failure in uvc_video_enable()
Turn streaming off (by selecting alternate setting 0) and disable the
video buffers queue in the uvc_video_enable() error path.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 11:13:29 -02:00
Laurent Pinchart 6998b6fb4b [media] uvcvideo: Use videobuf2-vmalloc
Replace the current video buffers queue implementation with
videobuf2-vmalloc.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 11:13:06 -02:00
Laurent Pinchart 3d95e93257 [media] uvcvideo: Move fields from uvc_buffer::buf to uvc_buffer
Add mem, length and bytesused fields to the uvc_buffer structure and use
them instead of accessing the uvc_buffer::buf m.offset, length and
bytesused fields directly. This prepares the driver to the conversion to
videobuf2.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 11:12:05 -02:00
Anssi Hannula 5eefb4f09b [media] ati_remote: switch to single-byte scancodes
The ati_remote driver currently uses 2-byte scancodes. However, one of
those bytes is actually a checksum and therefore shouldn't be considered
as part of the scancode.

Fix the driver to only use the actual data byte as a scancode and to
check the checksum itself. Update the bundled keymaps accordingly.

Since ati_remote was only migrated to the rc subsystem for 3.2, the
previous scancodes weren't emitted on any stable kernel.

Reported-by: George Spelvin <linux@horizon.com>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 10:51:59 -02:00
Thierry Reding 4be9c8fb58 [media] tm6000: Fix check for interrupt endpoint
Checking for &dev->int_in is useless because it returns the address of
the embedded struct tm6000_endpoint, which will always be positive and
therefore true.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 10:47:37 -02:00
Thierry Reding 875f0e3da1 [media] tm6000: Fix bad indentation
Function parameters on subsequent lines should never be aligned with the
function name but rather be indented.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 10:47:24 -02:00
Thierry Reding fcd44b9efb [media] tm6000: Fix fast USB access quirk
The original patch used the fast USB quirk to enable fast access to
registers in the tm6000_read_write_usb(). The applied patch moved the
check to the tm6000_reset(), probably due to some merge conflicts.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 10:46:58 -02:00
Guennadi Liakhovetski 1fc2b5f7fb [media] V4L: cosmetic clean up
Improve the use of the WARN_ON() macro and use a local variable, instead
of reduntantly dereferencing a pointer in v4l2-dev.c

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:47:21 -02:00
Guennadi Liakhovetski 6b806e30a3 [media] V4L: mt9m111: fix uninitialised mutex
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:44:03 -02:00
Janusz Krzysztofik 9c0223b53a [media] V4L: omap1_camera: fix missing <linux/module.h> include
Otherwise compilation breaks with:

...

after apparently no longer included recursively from other header files.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:43:34 -02:00
Dan Carpenter 08da558ae0 [media] V4L: mt9t112: use after free in mt9t112_probe()
priv gets dereferenced in mt9t112_set_params() so we should return
before calling that.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:42:40 -02:00
Guennadi Liakhovetski 4c0b036db8 [media] V4L: soc-camera: fix compiler warnings on 64-bit platforms
On 64-bit platforms assigning a pointer to a 32-bit variable causes a
compiler warning and cannot actually work. Soc-camera currently doesn't
support any 64-bit systems, but such platforms can be added in the
and in any case compiler warnings should be avoided.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:34:00 -02:00
Peter Korsgaard a626f39452 [media] s5p_mfc_enc: fix s/H264/H263/ typo
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Aked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:30:13 -02:00
Jean-François Moine 885f3cad98 [media] gspca - zc3xx: Bad initialization of zc305/gc0303
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:27:36 -02:00
Jean-François Moine b267b73d5a [media] gspca - topro: Lower the frame rate in 640x480 for the tp6800
The topro webcams don't support 30fps in 640x480 mode.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:27:08 -02:00
Jean-François Moine 41f09322e9 [media] gspca - sonixj: Change color control for sensor po2030n
Adjustment of the colors by the po2030n is finer than by the bridge controls.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:26:46 -02:00
Jean-François Moine b4b0107137 [media] gspca - sonixj: Bad sensor mode at start time
The 'open-drain' mode was not reset when starting the webcams.
This problem was introduced by commit 0e4d413af1 and
its exact effects are unknown.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:26:27 -02:00
Jean-François Moine 6121ca572f [media] gspca: Remove the useless variable 'nbalt'
As the alternate settings are now sorted in gspca main,
the variable 'nbalt' is no more useful.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:26:11 -02:00
Jean-François Moine a67648797a [media] gspca: Remove the useless variable 'reverse_alts'
The alternate settings are now sorted in gspca main, so the flag
'reverse_alts' is no more useful.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:25:27 -02:00
Malcolm Priestley 50815707ee [media] it913x: multiple devices on system. Copy ite_config to priv area
If there are two or more different it913x devices on the system they share the same
ite_config and over write its settings.

To over come this, the ite_config is copied to the priv area.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:24:38 -02:00
Malcolm Priestley 15157c506d [media] it913x add retry to USB bulk endpoints and IO
This a bus repeater for it913x devices. Commands usually fail because of other
activity on the USB bus.

Bulk failures that report -ETIMEDOUT or -EBUSY are repeated.

Enpoints that return actlen not equal len request -EAGAIN.

The retry is set at 10.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:12:21 -02:00
Gary Thomas d1ee8878a1 [media] omap_vout: Fix compile error in 3.1
This patch is against the mainline v3.1 release (c3b92c8) and
fixes a compile error when building for OMAP3+DSS+VOUT

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 09:08:32 -02:00
Malcolm Priestley 5e642c06b5 [media] it9135: add support for IT9135 9005 devices
Support add for IT9135 9005 devices

With this patch IT9135 devices now move to using
dvb-usb-it9135-01.fw firmware
IT9137 remain on previous firmware.

IT9135 devices seem more stable on this firmware.

If the user wishes to remain on it9137 firmware they can change
back using firmware=1 module option.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 08:55:29 -02:00
Malcolm Priestley b699029148 [media] dvb-usb/it913x: multi firmware loader
Multi firmware loader
 This uses scatter write firmware headers
 The firmware must start with 03 XX 00
 and be the extract firmware length.

 I have tried all available firmwares with this loader.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 08:55:27 -02:00
Michael Krufky 6b536a6ca5 [media] au0828: add missing models 72101, 72201 & 72261 to the model matrix
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 08:27:49 -02:00
Michael Krufky 64a6b6cbfa [media] au0828: add missing USB ID 2040:7213
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 08:27:39 -02:00
Michael Krufky 23bbba3411 [media] au0828: add missing USB ID 2040:7260
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 08:27:23 -02:00
Malcolm Priestley c725ff6973 [media] it913x: support for NEC extended keys
Add support for NEC extended keys.

The default remote has now changed to RC_MAP_MSI_DIGIVOX_III

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 08:14:52 -02:00
Malcolm Priestley 990f49af3f [media] it913x: support for different tuner regs
There appears to be differences in the tuner registers
on earlier IT9135 devices.

Using the current IT9137 settings cause corruptions on
some channels

This patch is in preparation for multi firmware loading and
current unsupported types.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 08:13:27 -02:00
Dan Carpenter 773ddbd228 [media] saa7164: fix endian conversion in saa7164_bus_set()
The msg->command field is 32 bits, and we should fill it with a call
to cpu_to_le32().  The current code is broke on big endian systems.
On little endian systems it truncates the 32 bit value to 16 bits
which probably still works fine.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 08:07:41 -02:00
Malcolm Priestley ed942c5074 [media] it913x-fe: more user and debugging info
More debugging and user info from it913x-fe.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 08:03:29 -02:00
Malcolm Priestley 9c1133c7c8 [media] it913x: endpoint size changes
Previously endpoint had been aligned to packet size (128)

Some early it9135 devices appear to have problems with this.

This patch now aligns with mpeg TS size (188)

With the pid filter off max size is increased to the maxmium
size (348 * 188)

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-11 07:58:25 -02:00
Mauro Carvalho Chehab 48763e2c6e [media] drxk: Switch the delivery system on FE_SET_PROPERTY
The DRX-K doesn't change the delivery system at set_properties,
but do it at frontend init. This causes problems on programs like
w_scan that, by default, opens both frontends.

Instead, explicitly set the format when set_parameters callback is
called.

Tested-by: Eddi De Pieri <eddi@depieri.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-09 20:49:05 -02:00
Joe Perches 9aa7705c96 [media] [trivial] omap24xxcam-dma: Fix logical test
Likely misuse of & vs &&.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-09 20:28:42 -02:00
Mauro Carvalho Chehab 0433cd28f3 [media] xc5000: Add support for 7MHz bandwidth for DVB-C/DVB-T
While xc5000 supports 7MHz bandwidth, the driver were lacking the code
implementing this feature, causing tuning issues with VHF chanels
used in Countries like Italy.

After this patch:

>>> tune to: 177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE
0x0000 0x0d49: pmt_pid 0x0102 RAI -- Rai 1 (running)
0x0000 0x0d4a: pmt_pid 0x0101 RAI -- Rai 2 (running)
0x0000 0x0d4b: pmt_pid 0x0100 RAI -- Rai 3 TGR Veneto (running)
0x0000 0x0d53: pmt_pid 0x0118 RAI -- Rai News (running)
0x0000 0x0d54: pmt_pid 0x0119 Rai -- Rai 3 TGR Emilia Romagna (running)
0x0000 0x0d4c: pmt_pid 0x0103 Rai -- Rai Radio1 (running)
0x0000 0x0d4d: pmt_pid 0x0104 Rai -- Rai Radio2 (running)
0x0000 0x0d4e: pmt_pid 0x0105 Rai -- Rai Radio3 (running)
Network Name 'Rai'

Tested-by: Eddi De Pieri <eddi@depieri.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-09 08:01:01 -02:00
Mauro Carvalho Chehab 78bd3dc8da [media] xc5000,tda18271c2dd: Fix bandwidth calculus
While here, add a debug message, to easy detecting bugs on it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-08 17:04:38 -02:00
Tomi Valkeinen 71c7a97289 [media] omap_vout: fix crash if no driver for a display
omap_vout crashes on start if a corresponding driver is not loaded for a
display device.

This patch changes omap_vout init sequence to skip devices without a
driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-07 11:12:40 -02:00
Mauro Carvalho Chehab 2bf936290b [media] xc5000: Remove the global mutex lock at xc5000 firmware init
As reported by Devin Heitmueller <dheitmueller@kernellabs.com>:

> It seems like a change such as this could significantly change the
> timing of tuner initialization if you have multiple xc5000 based
> products that might have a slow i2c bus.  Was that intentional?

After discussed with Eddi de Pierri <eddi@depieri.net>, it was pointed that
the change was not intentional, and it was just a trial while developing
the patches that add support for HVR-930C.

So, remove this hack.

Reported-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Acked by: Eddi de Pierri <eddi@depieri.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-07 07:59:14 -02:00
Mauro Carvalho Chehab 2a887d2770 [media] tm6000: fix OOPS at tm6000_ir_int_stop() and tm6000_ir_int_start()
[ 3755.608233] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
[ 3755.616360] IP: [<ffffffffa03b80b7>] tm6000_ir_int_stop+0x10/0x1b [tm6000]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-30 16:49:45 -02:00
Mauro Carvalho Chehab 6740a93288 [media] tm6000: automatically load alsa and dvb modules
All devices should support alsa module. Devices with DVB will
auto-load the dvb module. This way, tm6000-based devices should
now have hot plugin.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-30 16:49:37 -02:00
Mauro Carvalho Chehab 9f711a80c5 [media] tm6000: Use a 16 scancode bitmask for IR
This should allow using 24 or 32 bits NEC IR decoding tables with
those devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-30 14:58:20 -02:00
Mauro Carvalho Chehab 8afc539c4a [media] tm6000: Allow auto-detecting tm6000 devices
Now that the tm6000 driver is on a good shape, we can enable
device autodetection, based on the USB ID.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-30 14:54:19 -02:00
Mauro Carvalho Chehab 4a83b01150 [media] tm6000: rewrite IR support
The IR support were broken on my tests with HVR-900H. Also,
there were several issues on the current implementation.
This patch is a major rewrite of the IR support for this
	- Improve debug messages;
	- Don't do polling for interrrupt based IR;
	- Add proper support for RC-5 protocol;
	- Always provide 16 bits for NEC and RC-5;
	- Fix polling code;
	- Split polling functions from URB Interrupt ones;
	- Don't hardcode the XTAL reference for tm6000 IR;
	- If a URB submit fails, retries after 100ms;
	- etc.

Tested on Hauppauge HVR-900H, with RC-5 and NEC remotes.

Issues on IR handling, on this device:
	- Repeat events aren't detected (neither on NEC or RC-5);
	- NEC codes are always provided with 16 bits.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-30 14:54:11 -02:00
Mauro Carvalho Chehab f9fa905bde [media] tm6000: add IR support for HVR-900H
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-30 14:43:45 -02:00
Mauro Carvalho Chehab 884b0515dc [media] tuner-xc2028: Better report signal strength
Fix lock bit to better indicate signal strength, from 4096 to
65535.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-30 14:43:36 -02:00
Mauro Carvalho Chehab 15a295ec31 [media] tm6000: Fix IR register names
IR registers 0xd9 to 0xdf were badly named, making harder to
check what's the register accessed at the RC code. Fix the
name convention.

No functional changes on this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-30 14:43:06 -02:00
Mauro Carvalho Chehab 36d36b884c [media] tm6000: Warning cleanup
drivers/media/video/tm6000/tm6000-video.c: In function ‘tm6000_release’:
drivers/media/video/tm6000/tm6000-video.c:1608:7: warning: unused variable ‘err’ [-Wunused-variable]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-28 21:58:54 -02:00
Stefan Ringel edcfdd919a [media] tm6000: bugfix data check
beholder use a map with 3 bytes, but many rc maps have 2 bytes, so I add a workaround for beholder rc.

Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-28 21:31:09 -02:00
Stefan Ringel de2a20baff [media] tm6000: bugfix at bulk transfer
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-28 21:30:41 -02:00
Stefan Ringel 8159c184cf [media] tm6000: bugfix at interrupt reset
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-28 21:30:28 -02:00
Stefan Ringel c00ecc97bc [media] tm6000: bugfix at tm6000_set_reg_mask() register setting
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-28 21:30:09 -02:00
Stefan Ringel 078a68c11f [media] tm6000: remove experimental depends
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-28 21:29:32 -02:00
Mauro Carvalho Chehab 32f6f3ac54 [media] tm6000: Fix tm6010 audio standard selection
A V4L2 standards mask may contain several standards. A more restricted
mask with just one standard is used when user needs to bind to an specific
standard that can't be auto-detect among a more generic mask.

So, Improve the autodetection logic to detect the correct audio standard
most of the time.

Based on a patch made by Dmitri Belimov <d.belimov@gmail.com>.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-28 21:22:46 -02:00
Mauro Carvalho Chehab 75f064f220 [media] tm6000: Add a few missing bits to alsa
There are some properties found on em28xx, but not on tm6000. Add
them, in order to be more consistent.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-28 21:12:52 -02:00
Janusz Krzysztofik d95d7b91b4 [media] V4L: omap1_camera: fix missing <linux/module.h> include
Otherwise compilation breaks with:

...

after apparently no longer included recursively from other header files.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-26 13:45:38 -02:00
Dan Carpenter 75c1ca364d [media] radio: NUL terminate a user string
We pass this to fm_tx_set_radio_text() which expects a NUL terminated
string.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-25 15:46:59 -02:00
Marek Szyprowski fc8ac777ae [media] media: video: s5p-tv: fix build break
This patch fixes following build break:

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 21:18:31 -02:00
Dmitry Artamonow 025521f917 [media] omap3isp: fix compilation of ispvideo.c
Fix following build error by explicitely including <linux/module.h>
header file.

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

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 21:13:08 -02:00
Thomas Meyer 6d00c9aa2b [media] pwc: Use kmemdup rather than duplicating its implementation
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 21:08:16 -02:00
Thomas Meyer 0ceaec188e [media] cx25821: Use kmemdup rather than duplicating its implementation
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 21:08:01 -02:00
Thomas Meyer 82c80f8371 [media] v4l: Casting (void *) value returned by kmalloc is useless
The semantic patch that makes this change is available
in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 21:06:57 -02:00
Thomas Meyer 68dd9dd411 [media] dw2102: Use kmemdup rather than duplicating its implementation
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 21:05:59 -02:00
Thomas Meyer 53090aada4 [media] drxd: Use kmemdup rather than duplicating its implementation
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 21:04:51 -02:00
Sylwester Nawrocki fbe78ddde1 [media] m5mols: Fix set_fmt to return proper pixel format code
In case pixel format is modified in set_fmt by the driver,
the changes are not propagated back to the caller. Fix this
by adjusting passed  data for TRY and ACTIVE format.

Also remove redundant pixel format code information from
struct m5mols_info, it's already available in 'ffmt' array.
Remove pad number validation in set/get_fmt, this is already
done in the core.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 21:03:54 -02:00
Sylwester Nawrocki f83f71fda2 [media] s5p-fimc: Use correct fourcc for RGB565 colour format
With 16-bit RGB565 colour format pixels are stored by the device in memory
in the following order:

    | b3  | b2  | b1  | b0  |
   ~+-----+-----+-----+-----+
    | R5 G6 B5  | R5 G6 B5  |

This corresponds to V4L2_PIX_FMT_RGB565 fourcc, not V4L2_PIX_FMT_RGB565X.
This change is required to avoid trouble when setting up video pipeline
with the s5p-tv devices, so the colour formats at both devices can be
properly matched.

Cc: <stable@kernel.org>
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-11-24 21:03:35 -02:00
Sylwester Nawrocki d12392ec00 [media] s5p-fimc: Fail driver probing when sensor configuration is wrong
When a sensor with MIPI-CSI interface is attached through platform
data definition and the MIPI-CSI receiver is not selected in kernel
configuration s5p-fimc driver probe() will now succeed, issuing only
a warning. It was done this way to allow the driver to work even if
system configuration is not exactly right.

Instead make the driver's probe() fail if a MIPI-CSI sensor was
requested but s5p-csis module is not present.

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-11-24 21:03:18 -02:00
Sylwester Nawrocki 9c63afcb02 [media] s5p-fimc: Adjust pixel height alignments according to the IP revision
Minimum vertical pixel size alignment for input and output DMA and
the scaler depend on color format, rotation, the IP instance and revision.

Make vertical pixel size of format and crop better fit for each SoC
revision and the IP instance by adding min_vsize_align attribute to
the FIMC variant data structure. It's now common for the DMA engines
and the scaler.

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-11-24 21:03:03 -02:00
Sylwester Nawrocki 5cbf6f16ec [media] s5p-fimc: Allow probe() to succeed with null platform data
The "s5p-fimc-md" platform device platform_data is used to pass
attached camera sensor data. Not allowing device probe() to succeed
when it's null prevents using FIMC as a mem-to-mem device only.
Fix this by removing the platform_data check against null and
registering sensors only if platform_data is specified.
Also add logging of the information which /dev/video is assigned
to which device during probe().

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-11-24 21:02:39 -02:00
Sylwester Nawrocki 2c1bb62e21 [media] s5p-fimc: Fix buffer dequeue order issue
When requested more than 2 buffers the buffer dequeue order was wrong
due to erroneous updating FIMC registers in every interrupt handler
call. This also fixes regression of resetting the output DMA buffer
pointer at wrong time, when some buffers are already queued in hardware.
The hardware is reset in the start_streaming callback in order to align
the H/W state with the software output buffer pointer (buf_index).

Additionally a simple write to S5P_CISCCTRL register is replaced with
a read/modification/write to make sure the scaler is not being disabled
in fimc_hw_set_scaler().

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-11-24 21:02:10 -02:00
Sylwester Nawrocki 7aa9f1844a [media] s5p-fimc: Fix initialization for proper system suspend support
ST_LPM bit must not be initially set, so the first resume helper
call properly quiesce the device's operation.
Also fimc_runtime_suspend() at device remove is unneeded and
leads to unbalanced clock disable so remove it.

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-11-24 21:01:50 -02:00
Sylwester Nawrocki 64c570f505 [media] s5p-fimc: Fix error in the capture subdev deinitialization
Make sure the subdev pointer is cleared when the subdev object
has been freed.

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-11-24 21:01:35 -02:00
Sylwester Nawrocki 7acde02a5b [media] s5p-fimc: Fix wrong pointer dereference when unregistering sensors
After i2c_unregister_device() has been called the client object can already
be freed and thus using the client pointer may lead to dereferencing freed
memory. Avoid this by saving the adapter pointer for further use before
i2c_unregister_device() call.

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-11-24 20:57:12 -02:00
Olivier Grenie d1190024f0 [media] dib9090: limit the I2C speed
The intend of this patch is to limit the maximum I2C speed.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 20:56:07 -02:00
Olivier Grenie 88f3a3584c [media] dib8096P: add the reference board TFE8096P
The intend of this patch is to add the support for the DiBcom reference
board TFE8096P.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 20:55:52 -02:00
Olivier Grenie 0c32dbd74f [media] add the support for DiBcom dib8096P
The purpose of this patch is to support the DiBcom chip dib8096P.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 20:55:20 -02:00
Olivier Grenie b293f304c5 [media] dib7090: add the reference board TFE7790E
The intend of this patch is to add the support for the DiBcom reference
board TFE7790E.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 20:50:49 -02:00
Olivier Grenie 1f6bfcc752 [media] DiB8000: improve the tuning and the SNR monitoring
This patches improves the tuning of the dib8000 and correct the monitoringr
of the SNR.The patch allows to faster detect that there is no ISDB-T channel
on the wanted frequency.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 20:49:33 -02:00
Olivier Grenie a685dbbc65 [media] DiBcom: correct warnings
The intend of this patch is to correct some warnings given.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 20:48:29 -02:00
Olivier Grenie 6724a2f4f7 [media] dib7090: add the reference board TFE7090E
The intend of this patch is to add the support for the DiBcom reference
board TFE7090E.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 20:48:11 -02:00
Olivier Grenie 2e80286140 [media] dib7000p/dib0090: update the driver
This patch intends to update the dib7000p and dib0090 driver in order to
improve the performances.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 20:47:45 -02:00
Andreas Oberritter a1ed02e9f1 [media] em28xx: Add Terratec Cinergy HTC Stick
Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:29:59 -02:00
Leonid V. Fedorenchik c7855ee531 [media] cx25821.h: Line up defines
Line up constant defines to the same column.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:03:19 -02:00
Leonid V. Fedorenchik 0abfefbe49 [media] cx25821-video.c: Change line endings
Change obscure line endings to less obscure ones. (improve readability)

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:03:07 -02:00
Leonid V. Fedorenchik f253981406 [media] cx25821-video.c: Fix indent
Fix indent of statements to improve readability.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:02:42 -02:00
Leonid V. Fedorenchik cd52b2cf9b [media] cx25821-video.c: Move operators
Move operator in complex expression to the end of the line to preserve
consistency.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:01:58 -02:00
Leonid V. Fedorenchik 4a33b6f8bd [media] cx25821-video.c: Fix definitions
Change multiple definitions in one statement into multiple statements
with one definition per statement.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:01:34 -02:00
Leonid V. Fedorenchik a1937e1919 [media] cx25821-video.c: Fix assignment
Change double assignment in one statement into two assignment
statements.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:00:57 -02:00
Leonid V. Fedorenchik 1316b63ccd [media] cx25821-video.c: Change spaces
Change double spaces between lexemes into single spaces.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:00:39 -02:00
Leonid V. Fedorenchik 7e7beb8c25 [media] cx25821-video.c: Delete empty line
Delete unnecessary empty line.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 19:00:20 -02:00
Leonid V. Fedorenchik 8eb1fdfff0 [media] cx25821-video-upstream.c: Change line endings
Change obscure line endings to less obscure ones. (improve readability)

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:59:27 -02:00
Leonid V. Fedorenchik 2c68e933a9 [media] cx25821-video-upstream.c: Fix indent
Change indent of statements to use tabs and to improve readability.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:57:37 -02:00
Leonid V. Fedorenchik 16f0fda705 [media] cx25821-video-upstream.c: Remove braces
Delete curly braces around single if-else statements.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:57:04 -02:00
Leonid V. Fedorenchik 85b7982d16 [media] cx25821-video-upstream-ch2.c: Change line endings
Change obscure line endings to less obscure ones. (improve readability)

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:56:15 -02:00
Leonid V. Fedorenchik df253423d4 [media] cx25821-video-upstream-ch2.c: Remove braces
Remove unnecessary curly braces around single if statement.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:54:37 -02:00
Leonid V. Fedorenchik 3a59fab41b [media] cx25821-video-upsstream-ch2.c: Move operators
Move operators in complex expressions to the end of the lines to
preserve consistency.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:54:28 -02:00
Leonid V. Fedorenchik 2a4492d822 [media] cx25821-video-upstream-ch2.c: Fix indent
Change indent of statements with (less than 8) spaces to indent with
tabs.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:54:11 -02:00
Leonid V. Fedorenchik 3940de7482 [media] cx25821-video-upstream-ch2.c: Line up comments
Line up comments to match indent of surrounding statements.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:53:59 -02:00
Leonid V. Fedorenchik 14098bc730 [media] cx25821-medusa-video.c: Change line endings
Change obscure line endings to less obscure ones. (improve readability)

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:53:44 -02:00
Leonid V. Fedorenchik 49faae869f [media] cx25821-medusa-video.c: Move operators
Plase operators in complex expressions at the end of the lines to
preserve consistency.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:52:58 -02:00
Leonid V. Fedorenchik 09c3544030 [media] cx25821-medusa-video.c: Fix comment
Delete part of the comment that is not checked in code.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:52:43 -02:00
Leonid V. Fedorenchik f70a6566d3 [media] cx25821-medusa-reg.h: Line up defines
Line up constant defines to the same column. (also delete unnecessary
spaces in comments)

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:52:30 -02:00
Leonid V. Fedorenchik 7618aa0e46 [media] cx25821-medusa-defines.h: Line up defines
Line up constant defines to the same column.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:52:07 -02:00
Leonid V. Fedorenchik bc8b5dcaf5 [media] cx25821-medusa-defines.h: Fix typo
Fix typo in comment in word 'decoder'.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:51:48 -02:00
Leonid V. Fedorenchik 654d075d5d [media] cx25821-i2c.c: Change line endings
Change obscure line endings to less obscure ones. (improve readability)

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:51:39 -02:00
Leonid V. Fedorenchik 3f0bfe5bbd [media] cx25821-core.c: Change line endings
Change obscure line endings to less obscure ones. (improve readability)

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:51:27 -02:00
Leonid V. Fedorenchik c14ea5e59f [media] cx25821-core.c: Fix indent
Change indent of statements that indented with spaces to indent with
tabs.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:50:11 -02:00
Leonid V. Fedorenchik 43365d5d13 [media] cx25821-core.c: Delete empty line
Delete redundant empty line.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:49:48 -02:00
Leonid V. Fedorenchik 744992c011 [media] cx25821-cards.c: Fix indent
Fix indent of statement to use tab instead of spaces.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:49:40 -02:00
Leonid V. Fedorenchik 6f1f0e85da [media] cx25821-audio.h: Fix multiline defines
Change column of line continuation character ('\') and fix indent of
multiline defines.
Also line up remaining constant defines.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:49:25 -02:00
Leonid V. Fedorenchik 8e24958161 [media] cx25821-audio.h: Line up defines
Line up defines to the same column.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:48:53 -02:00
Leonid V. Fedorenchik 72a52fc325 [media] cx25821-audio-upstream.c: Change line endings
Change obscure line endings to less obscure ones. (improve readability)

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:47:57 -02:00
Leonid V. Fedorenchik 64dcb19496 [media] cx25821-audio-upstream.c: Move operators
Move operator of complex expression to the end of the lines to preserve
consistency.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:35:36 -02:00
Leonid V. Fedorenchik 81f4c8dddc [media] cx25821-audio-upstream.c: Fix indent
Change wrong indent (with spaces and less than 7 columns) of statements
to tabs.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:35:06 -02:00
Leonid V. Fedorenchik e5f1062178 [media] cx25821-alsa.c: Change line endings
Change obscure line endings to less obscure ones. (improve readability)

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:34:50 -02:00
Leonid V. Fedorenchik 4d9304c63e [media] cx25821-alsa.c: Fix indent
Delete unnecessary space before indented statement.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:34:08 -02:00
Leonid V. Fedorenchik 0ef8007201 [media] cx25821-alsa.c: Add braces to else clause
Add curly braces around else clause because corresponding if has them.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:33:53 -02:00
Leonid V. Fedorenchik 767f1d437d [media] cx25821-alsa.c: Line up comments
Line up comments to the same column.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:33:25 -02:00
Axel Lin bd93b3ad27 [media] media/radio/tef6862: fix checking return value of i2c_master_send
i2c_master_send returns negative errno, or else the number of bytes written.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 18:22:22 -02:00
Antti Palosaari e50f20e171 [media] ce168: remove experimental from Kconfig
I have been working many years without problems.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 17:56:13 -02:00
Antti Palosaari dc56905fc7 [media] ce6230: remove experimental from Kconfig
I have been working many years without problems.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 17:56:03 -02:00
Antti Palosaari 576b849ea7 [media] mxl5007t: fix reg read
Register to read should be written to register 0xfb and then
perform I2C read to get reg value.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-24 17:55:39 -02:00