1
0
Fork 0
Commit Graph

16570 Commits (f9eb7bf424e766e00bbc6d69fd7eaaf4bd003cf9)

Author SHA1 Message Date
Hans Verkuil af2d68d1be [media] vivi: add v4l2_ctrl_modify_range test case
Update the brighness range depending on the selected input. Useful for
testing control range events.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 14:11:22 -03:00
Mauro Carvalho Chehab b781e6be79 [media] sony-btf-mpx: v4l2_tuner struct is now constant
A patchset applied earlier changed v4l2_tuner struct parameter at
vidioc_s_tuner to const. Do this change at sony_btf_mpx_s_tuner(),
in order to remove this warning:

	drivers/media/i2c/sony-btf-mpx.c:335:2: warning: initialization from incompatible pointer type [enabled by default]
	drivers/media/i2c/sony-btf-mpx.c:335:2: warning: (near initialization for 'sony_btf_mpx_tuner_ops.s_tuner') [enabled by default]

Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 14:04:34 -03:00
Hans Verkuil 02fa628217 [media] v4l2 core: remove the obsolete dv_preset support
These ioctls are no longer used by any drivers, so remove them.

[mchehab@redhat.com: Fix merge conflict]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 13:49:17 -03:00
Hans Verkuil 2d80647b6e [media] v4l2-common: remove obsolete v4l_fill_dv_preset_info
It's no longer used, so it can now be removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 13:37:10 -03:00
Hans Verkuil a000e9a02b [media] tw9906: add Techwell tw9906 video decoder
Taken from the 0.9.8-5 version of the out-of-tree wis-go7007 driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 13:06:39 -03:00
Volokh Konstantin 523a4f7fbc [media] tw2804: modify ADC power control
Switch off all ADC (max 4) with first init, we control it
when starting/stopping streaming.

Signed-off-by: Volokh Konstantin <volokh84@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:29:46 -03:00
Hans Verkuil 12be52a9e0 [media] tw2804: add support for the Techwell tw2804
This is based on the wis-tw2804.c driver that's part of the go7007 driver.
It has been converted to a v4l subdev driver by Volokh Konstantin, and I
made additional cleanups.
Based on work by: Volokh Konstantin <volokh84@gmail.com>

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:28:48 -03:00
Hans Verkuil 0890ec19c6 [media] tw9903: add new tw9903 video decoder
This based on the wis-tw9903.c driver that's part of the go7007 driver.
It has been converted to a v4l subdev driver by Pete Eberlein, and I made
additional cleanups.
Based on work by: Pete Eberlein <pete@sensoray.com>

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:24:44 -03:00
Hans Verkuil 73d9f97933 [media] uda1342: add new uda1342 audio codec driver
This based on the wis-uda1342.c driver that's part of the go7007 driver.
It has been converted to a v4l subdev driver by Pete Eberlein, and I made
additional cleanups.
Based on work by: Pete Eberlein <pete@sensoray.com>

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:24:11 -03:00
Hans Verkuil ec367c3cd1 [media] ov7640: add new ov7640 driver
This based on the wis-ov7640.c driver that's part of the go7007 driver.
It has been converted to a v4l subdev driver by Pete Eberlein, and I made
additional cleanups.
Based on work by: Pete Eberlein <pete@sensoray.com>

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:23:33 -03:00
Hans Verkuil c7c54a988d [media] sony-btf-mpx: the MPX driver for the sony BTF PAL/SECAM tuner
The Sony BTF PG472Z has an internal MPX to deal with mono/stereo/bilingual
audio. This is split off from the wis-sony-tuner driver that is part of
the go7007 driver as it should be a separate i2c sub-device driver.
The wis-sony-tuner is really three i2c devices: a standard tuner, a tda9887
compatible demodulator and this mpx. After this patch the wis-sony-tuner
can be replaced by this driver and the standard tuner driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:21:29 -03:00
Hans Verkuil e4d2a6162d [media] tuner: add Sony BTF tuners
This adds support for three Sony BTF tuners:
TUNER_SONY_BTF_PG472Z: PAL+SECAM
TUNER_SONY_BTF_PK467Z: NTSC-M-JP
TUNER_SONY_BTF_PB463Z: NTSC-M
These come from the go7007 staging driver where they were implemented in
the wis-sony-tuner i2c driver.
Adding support for these tuners to tuner-types.c is the first step towards
removing the wis-sony-tuner driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:11:35 -03:00
Hans Verkuil 1589037f87 [media] saa7115: add support for double-rate ASCLK
Some devices expect a double rate ASCLK. Add a flag to let the driver know
through the s_crystal_freq call.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:10:18 -03:00
Hans Verkuil c875dee536 [media] saa7115: improve querystd handling for the saa7115
The saa7115 has better PAL/NTSC detection, so it can detect PAL even
though the chip is currently set up for NTSC.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:05:48 -03:00
Hans Verkuil a0fc58868b [media] saa7115: add config flag to change the IDQ polarity
Needed by the go7007 driver: it assumes a different polarity of the IDQ
signal, so we need to be able to tell the saa7115 about this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:02:59 -03:00
Hans Verkuil 9ca5470cc1 [media] v4l2-ctrls: add V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER control
Control whether video sequence headers should be repeated.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:02:08 -03:00
Hans Verkuil 73f35418a1 [media] v4l2-ioctl: check if an ioctl is valid
Just checking if the op exists isn't correct, you should check if the ioctl
is valid (which implies that the op exists as well).
One exception is g_std: if current_norm is non-zero, then the g_std op may be
absent. This sort of weird behavior is one of the reasons why I am trying to
get rid of current_norm.
This patch fixes the case where the g/s_std op is set, but these ioctls are
disabled. This can happen in drivers supporting multiple models, some that
have TV input (and support the STD API) and some that have a sensor (and do
not support the STD API). In the latter case qv4l2 would still show the
Standards combobox.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:01:26 -03:00
Andy Walls 6cd247ef22 [media] v4l2-ctrls: eliminate lockdep false alarms for struct v4l2_ctrl_handler.lock
When calling v4l2_ctrl_add_handler(), lockdep would detect a potential
recursive locking problem on a situation that is by design intended and
not a recursive lock.  This happened because all struct
v4l2_ctrl_handler.lock mutexes were created as members of the same lock
class in v4l2_ctrl_handler_init(), and v4l2_ctrl_add_handler() takes the
hdl->lock on two different v4l2_ctrl_handler instances.
This change breaks the large lockdep lock class for struct
v4l2_ctrl_handler.lock and breaks it into v4l2_ctrl_handler
instantiation specific lock classes with meaningful class names.
This will validly eliminate lockdep alarms for v4l2_ctrl_handler locking
validation, as long as the relationships between drivers adding v4l2
controls to their own handler from other v4l2 drivers' control handlers
remains straightforward.
struct v4l2_ctrl_handler.lock lock classes are created with names such
that the output of cat /proc/lockdep indicates where in the v4l2 driver
code v4l2_ctrl_handle_init() is being called on instantiations:
ffffffffa045f490 FD:   10 BD:    8 +.+...: cx2341x:1534:(hdl)->lock
ffffffffa0497d20 FD:   12 BD:    2 +.+.+.: saa7115:1581:(hdl)->lock
ffffffffa04ac660 FD:   14 BD:    2 +.+.+.: msp3400_driver:756:(hdl)->lock
ffffffffa0484b90 FD:   12 BD:    1 +.+.+.: ivtv_gpio:366:(&itv->hdl_gpio)->lock
ffffffffa04eb530 FD:   11 BD:    2 +.+.+.: cx25840_core:1982:(&state->hdl)->lock
ffffffffa04fbc80 FD:   11 BD:    3 +.+.+.: wm8775:246:(&state->hdl)->lock
Some lock chains, that were previously causing the recursion alarms, are
now visible in the output of cat /proc/lockdep_chains:
irq_context: 0
[ffffffffa0497d20] saa7115:1581:(hdl)->lock
[ffffffffa045f490] cx2341x:1534:(hdl)->lock
irq_context: 0
[ffffffffa04ac660] msp3400_driver:756:(hdl)->lock
[ffffffffa045f490] cx2341x:1534:(hdl)->lock
irq_context: 0
[ffffffffa0484b90] ivtv_gpio:366:(&itv->hdl_gpio)->lock
[ffffffffa045f490] cx2341x:1534:(hdl)->lock
irq_context: 0
[ffffffffa04eb530] cx25840_core:1982:(&state->hdl)->lock
[ffffffffa045f490] cx2341x:1534:(hdl)->lock
irq_context: 0
[ffffffffa04fbc80] wm8775:246:(&state->hdl)->lock
[ffffffffa045f490] cx2341x:1534:(hdl)->lock

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
[hans.verkuil@cisco.com: keep mutex_init in v4l2_ctrl_handler_init_class]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 11:47:09 -03:00
Hans Verkuil 505d04bdc4 [media] v4l2-ioctl: simplify debug code
The core debug code can now be simplified since all the write-only ioctls are
now const and will not modify the data they pass to the drivers.
So instead of logging write-only ioctls before the driver is called this can
now be done afterwards, which is cleaner when it comes to error reporting as
well.
This also fixes a logic error in the debugging code where there was one 'else'
too many.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 08:47:16 -03:00
Hans Verkuil 977ba3b1b7 [media] v4l2: add const to argument of write-only s_register ioctl
This ioctl is defined as IOW, so pass the argument as const.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 08:47:01 -03:00
Hans Verkuil b5656e8b73 [media] ivtv: prepare ivtv for adding const to s_register
The ivtv_itvc function receives a pointer to v4l2_dbg_register. When we
add const to that pointer in the s_register case we will run into a problem
here since this common function would discard const in that case. So
change this function so it receives the address and a pointer to a value.
In addition we now set the size field in the g_register function which is
where it belongs.
This will simplify the next patch where const will be added to s_register.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 08:46:39 -03:00
Hans Verkuil 27d5a87cf4 [media] v4l2-ioctl: add precision when printing names
Never print more than the size of the buffer containing the name.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 07:13:54 -03:00
Hans Verkuil 314527acbb [media] v4l2: pass std by value to the write-only s_std ioctl
This ioctl is defined as IOW, so pass the argument by value instead of by
reference. I could have chosen to add const instead, but this is 1) easier
to handle in drivers and 2) consistent with the s_std subdev operation.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 06:47:00 -03:00
Hans Verkuil 2f73c7c582 [media] v4l2: add const to argument of write-only s_tuner ioctl
This ioctl is defined as IOW, so pass the argument as const.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 06:31:23 -03:00
Hans Verkuil b530a447bb [media] v4l2: add const to argument of write-only s_frequency ioctl
This ioctl is defined as IOW, so pass the argument as const.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 06:25:34 -03:00
Frank Schaefer 0757f5c503 [media] bttv: apply mute settings on open
Previously, this has been done implicitly for video device nodes by calling
set_input() (which calls audio_input() and also modified the mute
setting).
Since input and mute setting are now untangled (as much as possible), we need to
apply the mute setting with an explicit call to audio_mute().
Also apply the mute setting when the radio device node gets opened.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:33:01 -03:00
Frank Schaefer da9f07f2d4 [media] bttv: do not unmute the device before the first open
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:32:48 -03:00
Frank Schaefer b1a301572a [media] bttv: untangle audio input and mute setting
Split function audio_mux():
move the mute setting part to function audio_mute() and the input setting part
to function audio_input().

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:32:26 -03:00
Frank Schaefer 5f45678173 [media] bttv: separate GPIO part from function audio_mux()
Move the GPIO part of function audio_mux() to a separate function
audio_mux_gpio().
This prepares the code for the next patch which will separate mute and input
setting.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:31:49 -03:00
Frank Schaefer 2166f0a971 [media] bttv: rename field 'audio' in struct 'bttv' to 'audio_input'
'audio_input' better describes the meaning of this field.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:31:13 -03:00
Frank Schaefer 20167f17f1 [media] bttv: do not save the audio input in audio_mux()
We can't and do not save the mute setting in function audio_mux(), so we
should also not save the input in this function for consistency.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:30:55 -03:00
Frank Schaefer 598728e920 [media] bttv: audio_mux(): do not change the value of the v4l2 mute control
There are cases where we want to call audio_mux() without changing the value of
the v4l2 mute control, for example
- mute mute on last close
- mute on device probing

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:30:21 -03:00
Frank Schaefer 28cafc38ec [media] bttv: audio_mux(): use a local variable "gpio_mute" instead of modifying the function parameter "mute"
Function audio_mux() actually deals with two types of mute: gpio mute and
subdevice muting.
This patch claryfies the meaning of these values, but mainly prepares the code for
the next patch.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:29:10 -03:00
David Härdeman 9719afae5e [media] rc-core: don't treat dev->rc_map.rc_type as a bitmap
store_protocols() treats dev->rc_map.rc_type as a bitmap which is wrong for
two reasons. First of all, it is pretty bogus to change the protocol type of
the keymap just because the hardware has been asked to decode a different
protocol.
Second, dev->rc_map.rc_type is an enum (i.e. a single protocol) as pointed
out by James Hogan <james.hogan@imgtec.com>.
Fix both issues by introducing a separate enabled_protocols member to
struct rc_dev.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:25:54 -03:00
Sachin Kamat efa914d7d0 [media] dvb-usb/dw2102: Remove duplicate inclusion of ts2020.h
ts2020.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:07:07 -03:00
Jose Alberto Reguero 78c7bc4bd2 [media] [PATH] enable dual tuner to Avermedia Twinstar in af9035 driver
This patch enable dual tuner for Avermedia Twinstar.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:06:20 -03:00
Hans Verkuil 34a518a079 [media] s5p-tv: remove the dv_preset API from hdmiphy
The dv_preset API is deprecated and is replaced by the much improved dv_timings
API. Remove the dv_preset support from this driver as this will allow us to
remove the dv_preset API altogether (s5p-tv being the last user of this code).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:00:52 -03:00
Hans Verkuil 9b30af98b4 [media] s5p-tv: remove the dv_preset API from hdmi
The dv_preset API is deprecated and is replaced by the much improved dv_timings
API. Remove the dv_preset support from this driver as this will allow us to
remove the dv_preset API altogether (s5p-tv being the last user of this code).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:00:35 -03:00
Hans Verkuil 3887056bc4 [media] s5p-tv: remove dv_preset support from mixer_video
The dv_preset API is deprecated and is replaced by the much improved dv_timings
API. Remove the dv_preset support from this driver as this will allow us to
remove the dv_preset API altogether (s5p-tv being the last user of this code).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:00:05 -03:00
Hans Verkuil 8e42bf033e [media] s5p-tv: add dv_timings support for mixer_video
This just adds dv_timings support without modifying existing dv_preset
support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:59:47 -03:00
Hans Verkuil 5efb54b2b7 [media] s5p-tv: add dv_timings support for hdmi
This just adds dv_timings support without modifying existing dv_preset
support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:59:06 -03:00
Hans Verkuil 8cf2f7ad97 [media] s5p-tv: add dv_timings support for hdmiphy
This just adds dv_timings support without modifying existing dv_preset
support, although I had to refactor a little bit in order to share
hdmiphy_find_conf() between the preset and timings code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:58:05 -03:00
Wei Yongjun 8b2c3da108 [media] gspca: remove needless check before usb_free_coherent()
usb_free_coherent() is safe with NULL addr and this check is
not required.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:48:56 -03:00
Jean Delvare a3ad56d0ab [media] drxk_hard: Drop unused parameter
Last parameter of function GetLockStatus() isn't used so drop it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:44:31 -03:00
Lad, Prabhakar ced9b21ff6 [media] davinci: vpif: Fix module build for capture and display
export the symbols which are used by two modules vpif_capture and
vpif_display. renamed "ch_params" to "vpif_ch_params" so as to avoid
name collision.
This patch fixes following error:
ERROR: "ch_params" [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: "vpif_ch_params_count" [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: "vpif_base" [drivers/media/platform/davinci/vpif_display.ko] undefined!
ERROR: "ch_params" [drivers/media/platform/davinci/vpif_capture.ko] undefined!
ERROR: "vpif_ch_params_count" [drivers/media/platform/davinci/vpif_capture.ko] undefined!
ERROR: "vpif_base" [drivers/media/platform/davinci/vpif_capture.ko] undefined!
make[1]: *** [__modpost] Error 1

Reported-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:38:10 -03:00
Eduardo Valentin 04e1ac04e5 [media] media: radio: add module alias entry for radio-si4713
Add MODULE_ALIAS entry for radio-si4713 platform driver.

Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:19:55 -03:00
Eduardo Valentin 04edd7b038 [media] media: radio: add driver owner entry for radio-si4713
Simple addition of platform_driver->driver->owner for radio-si4713.

Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:18:22 -03:00
Eduardo Valentin a782ae09b7 [media] media: radio: correct module license (==> GPL v2)
As per code header comment, changing the driver license entry
to match the correct version.

Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:14:25 -03:00
Eduardo Valentin 385624a8e7 [media] media: radio: CodingStyle changes on si4713
Minor changes to make alignment match on open parenthesis.

Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:12:48 -03:00
Antti Palosaari b09e71a8de [media] it913x: fix pid filter
I just made commit: "dvb_usb_v2: rework USB streaming logic" that
breaks that driver PID filter.
it913x driver checks use of PID filter directly from DVB USB v2 core
internal variable "adap->pid_filtering" and stores it to own state.
Calling order of .pid_filter_ctrl() and .pid_filter() was changed
and due to that state was updated too late. Update state earlier.
TODO: checking PID filter usage from DVB USB v2 is not very good idea
as PID filter callbacks are called only when PID filter is enabled.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:02:41 -03:00
Antti Palosaari 96d7ca5ec9 [media] dvb_usb_v2: rework USB streaming logic
Control flow order changed a little bit. HW PID filter is now
disabled also when streaming is stopped - earlier it was just
set only when streaming was started.
Control flow is now:
* set streaming status bit
* submit USB streaming packets
* enable HW PID filter
* ask device to start streaming
* N x add PID to device HW PID filter
... streaming video ...
* N x remove PID from device HW PID filter
* ask device to stop streaming
* disable HW PID filter
* kill USB streaming packets
* clear streaming status bit

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:02:04 -03:00
Antti Palosaari 61356eea67 [media] cypress_firmware: make checkpatch.pl happy
New checkpatch version likes to see strings not to split multiple
lines even those are exceeding 80 line length.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:00:23 -03:00
Antti Palosaari 6d7cfec413 [media] dvb_usb_v2: make checkpatch.pl happy
New checkpatch version likes to see strings not to split multiple
lines even those are exceeding 80 line length.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 09:59:56 -03:00
Antti Palosaari bdecbe43e3 [media] dvb_usb_v2: replace Kernel userspace lock with wait queue
There was sync mutex which was held over userspace. That is very
wrong and could cause deadlock if different userspace process is
used to "unlock". Wait queue seems to be correct solution for
that kind of synchronizing issue so use it instead.
lock debug gives following bug report:
================================================
[ BUG: lock held when returning to user space! ]
3.9.0-rc1+ #38 Tainted: G           O
------------------------------------------------
tzap/4614 is leaving the kernel with locks still held!
1 lock held by tzap/4614:

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 09:58:49 -03:00
Mauro Carvalho Chehab 028c70ff42 [media] dvb-usb/dvb-usb-v2: use IS_ENABLED
Instead of checking everywhere there for 3 symbols, use instead
IS_ENABLED macro.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 09:33:30 -03:00
Mauro Carvalho Chehab 1c59390b3b [media] cx23885: use IS_ENABLED
Instead of checking everywhere there for 3 symbols, use instead
IS_ENABLED macro.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 09:29:10 -03:00
Mauro Carvalho Chehab 9dc353c67c [media] tuners: use IS_ENABLED
Instead of checking everywhere there for 3 symbols, use instead
IS_ENABLED macro.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 09:22:06 -03:00
Mauro Carvalho Chehab 782d8b743a [media] dvb-frontends: use IS_ENABLED
Instead of checking everywhere there for 3 symbols, use instead
IS_ENABLED macro.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 09:03:59 -03:00
Mauro Carvalho Chehab 54d80904b4 [media] hdpvr-video: Use the proper check for I2C support
As reported by Geert Uytterhoeven <geert@linux-m68k.org>:
	drivers/media/usb/hdpvr/hdpvr-video.c: warning: "CONFIG_I2C_MODULE" is not defined [-Wundef]

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Thanks-to: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 01:06:35 -03:00
Wei Yongjun 13828c61e9 [media] dvb_usb_v2: make local function dvb_usb_v2_generic_io() static
dvb_usb_v2_generic_io() was not declared. It should be static.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22 13:50:12 -03:00
Hans Verkuil bc3d292803 [media] em28xx: tuner setup is broken after algo_data change
Commit aab3125c43 broke em28xx. I traced
this eventually to the change in what algo_data points to. This pointer
is also passed to em28xx_tuner_callback() through several hidden tuner
layers (yuck!) and that callback was not updated.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22 13:21:10 -03:00
Mauro Carvalho Chehab 3190fbee01 [media] em28xx: Only change I2C bus inside em28xx-i2c
There's currently a bug on em28xx-i2c that makes it write the
wrong values to register 06, that controlls the I2C bus speed
and bus.

Fix it to change only the I2C bus flag.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22 13:19:52 -03:00
Mauro Carvalho Chehab 9dc033f1ea [media] m5602_ov7660: return error at ov7660_init()
It used to be a code that returns arror at ov7660_init.
However, this was removed by changeset c84e412f:

@@ -231,33 +116,40 @@ int ov7660_init(struct sd *sd)
        if (dump_sensor)
                ov7660_dump_registers(sd);

-   err = ov7660_set_gain(&sd->gspca_dev, sensor_settings[GAIN_IDX]);
-   if (err < 0)
-           return err;
+ return 0;
+}

-   err = ov7660_set_auto_white_balance(&sd->gspca_dev,
-           sensor_settings[AUTO_WHITE_BALANCE_IDX]);
-   if (err < 0)
-           return err;

As complained by gcc:
	drivers/media/usb/gspca/m5602/m5602_ov7660.c: In function 'ov7660_init':
	drivers/media/usb/gspca/m5602/m5602_ov7660.c:99:9: warning: variable 'err' set but not used [-Wunused-but-set-variable]

It should be noticed that the original error code was crappy, as it wasn't
returning any error if sensor init fails.

Fix it by returning an error if the sensor can't be initialized.

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22 09:46:48 -03:00
Mauro Carvalho Chehab 39ed1267d9 [media] siano: remove the ir protocol field
This field is unused. Remove it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22 09:46:46 -03:00
Mauro Carvalho Chehab 48f72a1a4c [media] drxk: fix CNR calculus
Changeset 8f3741e accidentally broke the CNR estimation. It should
be calculated as "a + b - c". However, previously, the subtraction
by c only occurred if SNR would be positive, due to a bad binding
to DVBv3 API.

This also fixes the following warning:
	drivers/media/dvb-frontends/drxk_hard.c:2556:6: warning: variable 'c' set but not used [-Wunused-but-set-variable]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22 09:46:45 -03:00
Mauro Carvalho Chehab f35d09db0e [media] siano: use do_div() for 64-bits division
As reported by Frank Schäfer <fschaefer.oss@googlemail.com>:
	ERROR: "__divdi3" [drivers/media/common/siano/smsdvb.ko] undefined!

Reported-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Tested-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22 09:46:31 -03:00
Antti Palosaari 75cd5886ed [media] af9035: style changes for remote controller polling
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:06:31 -03:00
Antti Palosaari 1bfd5294dd [media] af9035: check I/O errors on IR polling
Use more careful error checks.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:06:13 -03:00
Antti Palosaari 3bf5e55299 [media] af9033: implement i/o optimized reg table writer
Use register address auto increment to reduce I/O when large
register / values tables are written.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:06:00 -03:00
Antti Palosaari 0c13c54d85 [media] af9033: sleep on attach()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:05:45 -03:00
Antti Palosaari 086991dd10 [media] af9033: move code from it913x to af9033
That register is property of demodulator so move it correct place.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:05:24 -03:00
Antti Palosaari d423e108c1 [media] it913x: remove unused af9033 demod tuner config inits
Those are demodulator init tables according to used tuner tuner
config. af9033 demod driver does those inits currently and due
to that these duplicate inits could be removed.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:05:00 -03:00
Antti Palosaari dc4a2c40f8 [media] af9033: add IT9135 tuner config "62" init table
Dumped out from the Windows driver version 12.07.06.1

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:04:25 -03:00
Antti Palosaari 85211323fa [media] af9033: add IT9135 tuner config "61" init table
Dumped out from the Windows driver version 12.07.06.1

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:04:15 -03:00
Antti Palosaari a49f53a080 [media] af9033: add IT9135 tuner config "60" init table
Dumped out from the Windows driver version 12.07.06.1

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:04:01 -03:00
Antti Palosaari 22d729f30e [media] af9033: add IT9135 tuner config "52" init table
Dumped out from the Windows driver version 12.07.06.1

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:03:41 -03:00
Antti Palosaari bb2e12a6f9 [media] af9033: add IT9135 tuner config "51" init table
Dumped out from the Windows driver version 12.07.06.1

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:03:20 -03:00
Antti Palosaari a72cbb77c1 [media] af9033: add IT9135 tuner config "38" init table
Dumped out from the Windows driver version 12.07.06.1

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:03:08 -03:00
Antti Palosaari 70375ecc45 [media] af9035: change dual mode boolean to bit field
For some reason there seems to be value	0x03 in eeprom for dual mode
(and 0x00 for single mode). Boolean is not always 1 bit wide - it
could be 8 bit wide too. Storing number 0x03 to boolean causes driver
to thing there is 4 tuners in some cases :o
Add also some comments regarding to eeprom.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:01:58 -03:00
Antti Palosaari 1c72fe2679 [media] af9035: enable remote controller for IT9135 too
There is no difference towards AF9035 remote controller, so enable it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:01:28 -03:00
Antti Palosaari ab56ad6ada [media] af9035: set demod TS mode config in read_config()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:01:14 -03:00
Antti Palosaari 431a6d4ab9 [media] af9035: use already detected eeprom base addr
eeprom memory mapped base address is detected at the very first.
Use it everywhere.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:01:00 -03:00
Antti Palosaari 8229da5064 [media] af9035: select firmware loader according to firmware
AF9035 and IT9135 supports two different firmware format. Select
correct loader according to first byte of firmware file.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:00:38 -03:00
Antti Palosaari 9d7b848e43 [media] it913x: remove demod init reg tables
These are demod inits and are already done by af9033 demod driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:00:17 -03:00
Antti Palosaari 463c399c2a [media] af9033: add IT9135 demod reg init tables
Dumped out from Windows driver version 12.07.06.1, 07/06/2012.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 19:00:01 -03:00
Antti Palosaari cfd08f0fb9 [media] it913x: use dev_foo() logging
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:59:33 -03:00
Antti Palosaari c0d300a669 [media] it913x: include tuner IDs from af9033.h
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:59:17 -03:00
Antti Palosaari 1085979792 [media] it913x: remove unused variables
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:59:02 -03:00
Antti Palosaari 44af747f4e [media] it913x: get rid of it913x config struct
We don't need it. Tuner ID and device address are enough.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:58:46 -03:00
Antti Palosaari d19812eb5f [media] it913x: tuner power up routines
Copy forgotten power up registers from it913x-fe driver.
Remove two demod registers as those are already written
by af9033 driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:58:17 -03:00
Antti Palosaari 42432b3ce8 [media] it913x: rename functions and variables
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:57:54 -03:00
Antti Palosaari 8c1285a280 [media] it913x: merge it913x_fe_suspend() to it913x_fe_sleep()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:57:32 -03:00
Antti Palosaari ebb0662cee [media] it913x: merge it913x_fe_start() to it913x_init_tuner()
Merge those functions to one and disable sleep.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:57:17 -03:00
Antti Palosaari df8f1be14f [media] af9035: IT9135 dual tuner related changes
Now it supports IT9135 based dual tuner devices.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:56:42 -03:00
Antti Palosaari fe8eece1fd [media] af9033: IT9135 v2 supported related changes
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:55:45 -03:00
Antti Palosaari bc3c9e10fc [media] af9035: basic support for IT9135 v2 chips
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:55:13 -03:00
Antti Palosaari 9ea3681db4 [media] af9035: merge af9035 and it9135 eeprom read routines
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:51:31 -03:00
Antti Palosaari bada342e08 [media] af9035: USB1.1 support (== PID filters)
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:50:53 -03:00
Antti Palosaari a7816b7667 [media] af9035: constify clock tables
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:49:41 -03:00
Antti Palosaari b799b8102b [media] af9035: [0ccd:0099] TerraTec Cinergy T Stick Dual RC (rev. 2)
That same USB ID is used both AF9015 and AF9035 driver.
iManufacturer is only thing we can select correct driver without a I/O.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:49:20 -03:00
Antti Palosaari e8c7aab50d [media] af9015: reject device TerraTec Cinergy T Stick Dual RC (rev. 2)
That same USB ID is used both AF9015 and AF9035 driver.
iManufacturer is only thing we can select correct driver without a I/O.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:49:02 -03:00
Antti Palosaari 0d94d6a04b [media] af9035: fix af9033 demod sampling frequency
ADC needs to be also multiplied to 2 as it9135.
Fixes bug I introduced few commits ago.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:48:16 -03:00
Antti Palosaari 74c1883a56 [media] af9035: add auto configuration heuristic for it9135
Detect automatically multiple chip versions and select configuration
according to that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:47:55 -03:00
Antti Palosaari ac77fb0f0c [media] af9035: add support for 1st gen it9135
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:47:19 -03:00
Antti Palosaari 4902bb39b6 [media] af9033: support for it913x tuners
Add support for tuners integrated to the IT9135 and IT9137.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:46:47 -03:00
Antti Palosaari 88b38befc0 [media] ITE IT913X silicon tuner driver
It is tuner driver for tuner integrated to the ITE IT9135 and
IT9137 chips. I split it out from the current it913x-fe driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:42:19 -03:00
Kevin Baradon e9e7a16d6d [media] media/rc/imon.c: avoid flooding syslog with "unknown keypress" when keypad is pressed
My 15c2:0036 device floods syslog when a keypad key is pressed:

	Feb 18 19:00:57 homeserver kernel: imon 5-1:1.0: imon_incoming_packet: unknown keypress, code 0x100fff2
	Feb 18 19:00:57 homeserver kernel: imon 5-1:1.0: imon_incoming_packet: unknown keypress, code 0x100fef2
	Feb 18 19:00:57 homeserver kernel: imon 5-1:1.0: imon_incoming_packet: unknown keypress, code 0x100fff2
	Feb 18 19:00:57 homeserver kernel: imon 5-1:1.0: imon_incoming_packet: unknown keypress, code 0x100fff2
	Feb 18 19:00:57 homeserver kernel: imon 5-1:1.0: imon_incoming_packet: unknown keypress, code 0x100fff2

This patch removes those messages from imon, following suggestion from
Mauro. Unknown keys shall be correctly handled by rc/input layer.

Signed-off-by: Kevin Baradon <kevin.baradon@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:37:32 -03:00
Kevin Baradon 26ccbec44a [media] media/rc/imon.c: make send_packet() delay larger for 15c2:0036
Some imon devices (like 15c2:0036) need a higher delay between
send_packet calls.

Default value is still 5ms to avoid regressions on already working
hardware.

Also use interruptible wait to avoid load average going too high (and
let caller handle signals).

Signed-off-by: Kevin Baradon <kevin.baradon@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:34:25 -03:00
Federico Fuga 15170025ee [media] Corrected Oops on omap_vout when no manager is connected
If no manager is connected to the vout device, the omapvid_init() function
fails. No error condition is checked, and the device is started. Later on,
when irq is serviced, a NULL pointer dereference occurs.
Also, the isr routine must be registered only if no error occurs, otherwise
the isr triggers without the proper setup, and the kernel oops again.
To prevent this, the error condition is checked, and the streamon function
exits with error. Also the isr registration call is moved after the setup
procedure is completed.

Reviewed-by: Prabhakar Lad <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:31:51 -03:00
Andrzej Hajda 6ba4d05e84 [media] m5mols: Fix bug in stream on handler
Due to improper condition check streaming start for some pixel
formats was prevent and the s_stream just reatuned -EINVAL.
This fixes regression introduced in commit 5565a2ad47
[media] m5mols: Protect driver data with a mutex.

Signed-off-by: Andrzej Hajda <a.hajda@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>
2013-03-21 18:25:09 -03:00
Sylwester Nawrocki 8c6ecdd7ce [media] s5p-fimc: Do not attempt to disable not enabled media pipeline
This fixes following warnings when all links are being disconnected:
[   20.080000] WARNING: at drivers/media/platform/s5p-fimc/fimc-mdevice.c:1269 __fimc_md_set_camclk+0x208/0x20c()
[   20.090000] Modules linked in:
[   20.095000] [<c001603c>] (unwind_backtrace+0x0/0x13c) from [<c00246dc>] (warn_slowpath_common+0x54/0x64)
[   20.105000] [<c00246dc>] (warn_slowpath_common+0x54/0x64) from [<c0024708>] (warn_slowpath_null+0x1c/0x24)
[   20.115000] [<c0024708>] (warn_slowpath_null+0x1c/0x24) from [<c0323fe8>] (__fimc_md_set_camclk+0x208/0x20c)
[   20.125000] [<c0323fe8>] (__fimc_md_set_camclk+0x208/0x20c) from [<c0324368>] (__fimc_pipeline_close+0x38/0x48)
[   20.135000] [<c0324368>] (__fimc_pipeline_close+0x38/0x48) from [<c0325848>] (fimc_md_link_notify+0x10c/0x198)
[   20.145000] [<c0325848>] (fimc_md_link_notify+0x10c/0x198) from [<c02f9dd4>] (__media_entity_setup_link+0x1c0/0x1e8)
[   20.155000] [<c02f9dd4>] (__media_entity_setup_link+0x1c0/0x1e8) from [<c02f9710>] (media_device_ioctl+0x2c0/0x41c)
[   20.165000] [<c02f9710>] (media_device_ioctl+0x2c0/0x41c) from [<c02f9938>] (media_ioctl+0x30/0x34)
[   20.175000] [<c02f9938>] (media_ioctl+0x30/0x34) from [<c00cf0bc>] (do_vfs_ioctl+0x84/0x5e8)
[   20.185000] [<c00cf0bc>] (do_vfs_ioctl+0x84/0x5e8) from [<c00cf65c>] (sys_ioctl+0x3c/0x60)
[   20.190000] [<c00cf65c>] (sys_ioctl+0x3c/0x60) from [<c000f040>] (ret_fast_syscall+0x0/0x30)

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>
2013-03-21 18:24:57 -03:00
Arun Kumar K 053e09f319 [media] s5p-mfc: Fix encoder control 15 issue
mfc-encoder is not working in the latest kernel giving the
erorr "Adding control (15) failed". Adding the missing step
parameter in this control to fix the issue.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:24:38 -03:00
Arun Kumar K 90c0ae5009 [media] s5p-mfc: Fix frame skip bug
The issue was seen in VP8 decoding where the last frame was
skipped by the driver. This patch gets the correct frame_type value
to fix this bug.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Arun Mankuzhi <arun.m@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:24:07 -03:00
Shaik Ameer Basha e34a89b397 [media] s5p-fimc: send valid m2m ctx to fimc_m2m_job_finish
fimc_m2m_job_finish() has to be called with the m2m context for the necessary
cleanup while resume. But currently fimc_m2m_job_finish() always passes m2m
context as NULL.
This patch preserves the context before making it null, for necessary cleanup.

Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:23:21 -03:00
Shaik Ameer Basha 5d83790be7 [media] exynos-gsc: send valid m2m ctx to gsc_m2m_job_finish
gsc_m2m_job_finish() has to be called with the m2m context for the necessary
cleanup while resume. But currently gsc_m2m_job_finish() always passes m2m
context as NULL.
This patch preserves the context before making it null, for necessary cleanup.
Use gsc_m2m_opened() instead gsc_m2m_active() in gsc_resume().

Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:23:06 -03:00
Shaik Ameer Basha 6a5360966a [media] fimc-lite: Fix the variable type to avoid possible crash
Changing the variable type to 'int' from 'unsigned int'. Driver
logic expects the variable type to be 'int'.

Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:22:43 -03:00
Shaik Ameer Basha 4cec1893d8 [media] fimc-lite: Initialize 'step' field in fimc_lite_ctrl structure
v4l2_ctrl_new() uses check_range() for control range checking.
This function expects 'step' value for V4L2_CTRL_TYPE_BOOLEAN type control.
If 'step' value doesn't match to '1', it returns -ERANGE error.
This patch adds the default .step value to 1.

Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 18:22:08 -03:00
Dmitri Belimov 01ae72866d [media] xc5000: fix incorrect debug printnk
I found very small bug in xc5000 source. When set option debug=1 and
listen a radio we see in dmesg xc5000: xc_SetTVStandard()
Standard = M/N-NTSC/PAL-BTSC at all times. However, it should be, instead
"FM Radio-INPUT1_MONO".

That happens because xc5000_set_radio_freq() gets the correct value for
VideoMode and AudioMode for radio and calls xc_SetTVStandard() where name
of standard comes from the incorrect place priv->video_standard.

This incorrect debug message makes debugging  a little difficult.

Signed-off-by: Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 16:46:05 -03:00
Paul Bolle b3d9a15d9a [media] soc_camera: remove two outdated selects
Release v2.6.30 removed the MT9M001_PCA9536_SWITCH and
MT9V022_PCA9536_SWITCH Kconfig symbols, in commits
36034dc325 ("V4L/DVB (11032): mt9m001:
allow setting of bus width from board code") and
e958e27ade ("V4L/DVB (11033): mt9v022:
allow setting of bus width from board code").
These two commits removed all gpio related code from these two drivers.
But they skipped removing their two selects of GPIO_PCA953X. Remove
these now as they are outdated. Their dependencies can never evaluate to
true anyhow.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:36:05 -03:00
Sachin Kamat b3fd87bc35 [media] sh_vou: Use module_platform_driver_probe macro
module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:35:50 -03:00
Sachin Kamat 6647b9c003 [media] sh_veu: Use module_platform_driver_probe macro
module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:35:39 -03:00
Sachin Kamat bd3b4a3fde [media] soc_camera/mx1_camera: Use module_platform_driver_probe macro
module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:35:27 -03:00
Sachin Kamat f2b4dc1a0f [media] sh_veu.c: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:35:14 -03:00
Sachin Kamat 8efdb13543 [media] soc_camera/pxa_camera: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:34:35 -03:00
Sachin Kamat 2e2d612d80 [media] soc_camera/sh_mobile_csi2: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:33:31 -03:00
Sachin Kamat 15a0934201 [media] soc_camera/sh_mobile_ceu_camera: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:33:08 -03:00
Andrei Andreyanau bff7993936 [media] mt9v022 driver: send valid HORIZONTAL_BLANKING values to mt9v024 soc camera
This patch fixes the issue that appears when mt9v024 camera is used with the
mt9v022 soc camera driver. The minimum total row time is 690 columns
(horizontal width + horizontal blanking). The minimum horizontal
blanking is 61. Thus, when the window width is set below 627, horizontal blanking must
be increased. For the mt9v024 camera the values above are correct and
for the mt9v022 camera the correct values are in the existing kernel driver.

Signed-off-by: Andrei Andreyanau <a.andreyanau@sam-solutions.net>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:19:50 -03:00
Guennadi Liakhovetski 4a1313c447 [media] mt9m111: fix Oops - initialise context before dereferencing
A recent commit "[media] soc-camera: Push probe-time power management to
drivers" causes an Oops during mt9m111 driver probing because its .ctx
private data field is now dereferenced before it is initialised. Fix this
by initialising the field earlier.

Reported-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Tested-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:19:03 -03:00
Benoît Thébaudeau cbaa5c54cb [media] soc-camera: mt9m111: Fix auto-exposure control
Commit f9bd584365 changed V4L2_CID_EXPOSURE_AUTO
from boolean to enum, and commit af8425c54b
changed the creation of this control into a menu for the mt9m111. However,
mt9m111_set_autoexposure() is still interpreting the value set for this control
as a boolean, which also conflicts with the default value of this control set to
V4L2_EXPOSURE_AUTO (0).
This patch makes mt9m111_set_autoexposure() interpret the value set for
V4L2_CID_EXPOSURE_AUTO as defined by enum v4l2_exposure_auto_type.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Tested-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:18:38 -03:00
Paul Bolle d65fcbb000 [media] ts2020: use customise option correctly
The Kconfig entry for "TS2020 based tuners" defaults to modular if
DVB_FE_CUSTOMISE is set. But that Kconfig symbol was replaced with
MEDIA_SUBDRV_AUTOSELECT as of v3.7. So use the new symbol. And negate
the logic, so we are in line with all the similar entries in this file.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:11:12 -03:00
Manjunath Hadli 5b38b0f88d [media] media: tvp514x: enable TVP514X for media controller based usage
add support for TVP514x as a media entity and support for
pad operations. The decoder supports 1 output pad.
The default format code was V4L2_MBUS_FMT_YUYV10_2X10
changed it to V4L2_MBUS_FMT_UYVY8_2X8.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:06:29 -03:00
Lad, Prabhakar 88da0183eb [media] media: ths7353: add support for ths7353 video amplifier
The patch adds support for THS7353 video amplifier.
The the THS7353 amplifier is very much similar to the
existing THS7303 video amplifier driver.
This patch appropriately makes changes to the existing
ths7303 driver and adds support for the THS7353.
This patch also adds V4L2_IDENT_THS7353 for the THS7353
chip and appropriate changes to Kconfig file for building.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Martin Bugge <marbugge@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:04:47 -03:00
Hans Verkuil ffdc78efe1 [media] vb2-dma-sg: add debug module option
This prevents the kernel log from being spammed with these messages.
By turning on the debug option you will see them again.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 13:25:15 -03:00
Hans Verkuil b6ba2057f7 [media] videobuf2: add gfp_flags
Some drivers have special memory requirements for their buffers, usually
related to DMA (e.g. GFP_DMA or __GFP_DMA32). Make it possible to specify
additional GFP flags for those buffers by adding a gfp_flags field to
vb2_queue.
Note that this field will be replaced in the future with a different
mechanism, but that is still work in progress and we need this feature
now so we won't be able to convert drivers with such requirements to vb2.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 13:17:51 -03:00
Mauro Carvalho Chehab 808d24d6c0 [media] dvb-core: don't clear stats at DTV_CLEAR
The stats are cleared by the frontend. Don't do it at DTV_CLEAR.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 10:27:35 -03:00
Mauro Carvalho Chehab 340e76965c [media] drxk: Fix bogus signal strength indicator
The DVBv3 signal strength indicator is bogus: it doesn't range
from 0 to 65535 as it would be expected. Also, 0 means the max
signal strength.
Now that a better way to estimate it was added, use the new
way.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 10:27:21 -03:00
Mauro Carvalho Chehab 59a7a23c47 [media] drxk: use a better calculus for RF strength
The AZ6007 driver released by Terratec has a better way to
estimate the signal strength, at CtrlSigStrength(). Port it
to the driver.
It should be noticed that there are two parameters there that
are tuner-specific.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 10:27:05 -03:00
Mauro Carvalho Chehab 8f3741e028 [media] drxk: Add pre/post BER and PER/UCB stats
The original az6007 driver has the code to calculate such
stats. Add it to the driver, reporting them via DVBv5
stats API.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 10:26:50 -03:00
Mauro Carvalho Chehab 2b0e1f3afd [media] drxk: remove dummy BER read code
The BER code does nothing but filling it with zero. Remove it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 10:25:59 -03:00
Mauro Carvalho Chehab 2bf0f93e0d [media] siano: make some functions static
drivers/media/common/siano/smsdvb-debugfs.c:51:6: warning: no previous prototype for 'smsdvb_print_dvb_stats' [-Wmissing-prototypes]
drivers/media/common/siano/smsdvb-debugfs.c:154:6: warning: no previous prototype for 'smsdvb_print_isdb_stats' [-Wmissing-prototypes]
drivers/media/common/siano/smsdvb-debugfs.c:244:6: warning: no previous prototype for 'smsdvb_print_isdb_stats_ex' [-Wmissing-prototypes]
drivers/media/common/siano/smscoreapi.c:832:5: warning: no previous prototype for 'smscore_configure_board' [-Wmissing-prototypes]
drivers/media/common/siano/smscoreapi.c:1301:5: warning: no previous prototype for 'smscore_init_device' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 10:04:01 -03:00
Mauro Carvalho Chehab 05ad412a63 [media] siano: Fix the remaining checkpatch.pl compliants
Fix all other remaining checkpatch.pl compliants on the Siano driver,
except for the 80-cols (soft) limit. Those are harder to fix, and
probably not worth to do right now.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 10:03:53 -03:00
Mauro Carvalho Chehab 28a59df4d7 [media] siano: remove the remaining CamelCase compliants
Remove the remaining CamelCase checkpatch.pl compliants.
There are still a few left, but those are due to USB and
DVB APIs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 10:03:45 -03:00
Mauro Carvalho Chehab 90414248bf [media] siano: fix checkpatch.pl compliants on smscoreapi.h
Fix the remaining checkpatch.pl compliants at smscoreapi.h,
except by the "line over 80 characters" on comments. Fixing those
would require more time, as the better is to convert them into the
struct descriptions used inside the kernel, as described at:
	Documentation/kernel-doc-nano-HOWTO.txt

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 10:03:34 -03:00
Mauro Carvalho Chehab cf0e9cfcc7 [media] siano: convert structure names to lowercase
There are several structures defined in uppercase. Convert them
to lowercase, and simplify their names, when possible.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 10:03:27 -03:00
Mauro Carvalho Chehab dfef84fc13 [media] siano: get rid of CammelCase from smscoreapi.h
It is almost impossible to see a compliant with checkpatch.pl
on those Siano drivers, as there are simply too much violations
on it. So, now that a big change was done, the better is to
cleanup the checkpatch compliants.

Let's first replace all CammelCase symbols found at smscoreapi.h
using camel_case namespace. That removed 144 checkpatch.pl
compliants on this file. Of course, the other files need to be
fixed accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 10:03:16 -03:00
Heiko Carstens 6c43a51961 drivers/Kconfig: add several missing GENERIC_HARDIRQS dependencies
With this patch an allmodconfig finally builds on s390 again.

Fixes these build errors:

ERROR: "devm_request_threaded_irq" [drivers/spi/spi-altera.ko] undefined!
ERROR: "devm_request_threaded_irq" [drivers/media/platform/sh_veu.ko] undefined!
ERROR: "devm_request_threaded_irq" [drivers/dma/dw_dmac.ko] undefined!

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-03-21 13:35:37 +01:00
Mauro Carvalho Chehab c8b8fdb39d [media] siano: add MODULE_FIRMWARE() macros
This driver can use several firmwares. Provide such info at
module firmware metadata.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:54:21 -03:00
Mauro Carvalho Chehab 11ad03a563 [media] siano: use defines for firmware names
There are too many firmwares there. As we need to add
MODULE_FIMWARE() macros, the better is to define their names
on just one place and use the macros for both cards/device type
tables and MODULE_FIRMWARE().

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:54:13 -03:00
Mauro Carvalho Chehab d8a18e88c9 [media] siano: Remove bogus complain about MSG_SMS_DVBT_BDA_DATA
When the driver is tuned into chanel, and it is removed/reinserted,
the message stream data may be arriving during device probe:
	[ 5680.162004] smscore_set_device_mode: set device mode to 6
	[ 5680.162267] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
	[ 5680.162391] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
	[ 5680.162641] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
	[ 5680.162891] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
	[ 5680.163016] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
	[ 5680.163266] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
	[ 5680.163516] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
	[ 5680.163640] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
	[ 5680.163891] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
	[ 5680.164016] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
	[ 5680.164265] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
	[ 5680.164515] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
	[ 5680.164519] smscore_onresponse: Firmware id 6 prots 0x40 ver 8.1
	[ 5680.164766] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
	[ 5680.166018] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
	[ 5680.166438] DVB: registering new adapter (Siano Rio Digital Receiver)
Instead of complaining, just silently discard those messages, instead of
complaining.
A proper fix is to put the device on suspend/power down mode when the module
is removed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:53:59 -03:00
Mauro Carvalho Chehab 98c3f94e6d [media] siano: remove doubled new line
sms_debug() and sms_info() already adds a '\n' at the printed
strings. No need to add more.
That helps to cleanup stuff like:
	[ 4868.205648] smscore_onresponse: message not handled.
	[ 4868.205898] smscore_onresponse: message not handled.
and:
	[ 5467.959769] smscore_onresponse:
	data rate 143069 bytes/secs
While here, provides the message name, when the message is not
handled by the smsmdtv core.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:53:50 -03:00
Mauro Carvalho Chehab 07bb6bdddf [media] siano: remove a bogus printk line
The logic that detects the types of sms devices is bogus. It returns
	[ 4645.187790] smsusb_init_device: line: 372: Unspecified sms device type!
For several devices, including the one I have (SMS_RIO). In a matter
of fact, the right thing to do there is to print an error only if
the device is really unknown (SMS_UNKNOWN_TYPE).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:53:42 -03:00
Mauro Carvalho Chehab 2a7643159d [media] siano: reorder smscore_get_fw_filename() function
Put this function earlier in the code, to avoid the need of
defining a function stub.
No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:53:26 -03:00
Mauro Carvalho Chehab e584f9d61e [media] siano: remove the bogus firmware lookup code
There is an special lookup code that is called when
SMS_BOARD_UNKNOWN. The logic there is bogus and will cause
an oops, as .type is SMS_UNKNOWN_TYPE (-1).
As the code would do:
	return smscore_fw_lkup[type][mode];
That would mean that it would try to go past the
smscore_fw_lkup table.
So, just remove that bogus code, simplifying the logic.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:52:57 -03:00
Mauro Carvalho Chehab 9711a8a600 [media] siano: honour per-card default mode
Instead of using a global default_mode, passed via modprobe
parameter, use the one defined inside the cards struct.
That will prevent the need of manually specify it for each
board, except, of course, if the user wants to do something
different, on boards that accept multiple types.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:52:48 -03:00
Mauro Carvalho Chehab 5ac14b6011 [media] siano: simplify firmware lookup logic
There are two ways to specify firmware for siano devices: a
per-device ID and a per-device type.
The per-device type logic is currently made by a 11x9 string
table, sparsely filled. It is very hard to read the table at
the source code, as there are too much "none" filling there
("none" there is a way to tell NULL).
Instead of using such problematic table, convert it into an
easy to read table, where the unused values will be defaulted
to NULL.
While here, also simplifies a little bit the logic and print
a message if an user-selected mode doesn't exist.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:52:37 -03:00
Mauro Carvalho Chehab 6a28bd94f4 [media] siano: add support for .poll on debugfs
Implement poll() method for debugfs and be sure that the
debug_data won't be freed on ir or on read().
With this change, poll() will return POLLIN if either data was
filled or if data was read. That allows read() to return 0
to indicate EOF in the latter case.
As poll() is now provided, fix support for non-block mode.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:52:29 -03:00
Mauro Carvalho Chehab 773adad141 [media] siano: fix status report with old firmware and ISDB-T
This seems to be ever broken. That's the status report with
Firmware 2.1, before adding support for sms2270 is:
[22273.787218] smsdvb_onresponse: MSG_SMS_GET_STATISTICS_RES
[22273.792592] IsRfLocked = 1
[22273.792592] IsDemodLocked = 1
...
[22273.792598] TransmissionMode = -64
...
(all unshown fields are filled with zeros)
Of course, transmission mode being a negative number is wrong.
So, we need to take a deeper look on it.
With the debugfs patches applied, it is possible to see that, instead
of filling StatisticsType with 5, and FullSize with the size of the
payload (this is what happens with sms2270 and firmware 8.1),
those fields are also initialized with zero:
StatisticsType = 0	FullSize = 0
IsRfLocked = 1		IsDemodLocked = 1	IsExternalLNAOn = 0
SNR = 0 dB		RSSI = 0 dBm		InBandPwr = 0 dBm
CarrierOffset = 0	Bandwidth = 0		Frequency = 0 Hz
TransmissionMode = -64	ModemState = 0		GuardInterval = 0
SystemType = 0		PartialReception = 0	NumOfLayers = 0
SmsToHostTxErrors = 0
The data under "TransmissionMode" varies according with the signal,
and it is negative. It also matches the value for InBandPwr when
the tuner is on DVB-T (ok, signal doesn't lock, but the power level
should be about the same with the antena fixed, and measured at about
the same time).
So, there's a very high chance that, when StatisticsType is zero, the
signal strength is at the same position as Transmission Mode.
So, discard all other parameters, and provide only signal/rf lock and
signal strength if StatisticsType is 0, for ISDB-T.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:52:16 -03:00
Mauro Carvalho Chehab e1b2ac4d1e [media] siano: Only feed DVB data when there's a feed
Right now, the driver sends DVB data even before tunning.
It was noticed that this may lead into some mistakes at DVB
decode, as the PIDs from wrong channels may be associated with
another frequency, as they may already be inside the PID buffers.
So, prevent it by not feeding DVB demux with data while there's no
feed or while the device is not tuned.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:52:05 -03:00
Mauro Carvalho Chehab 5c3b87435b [media] siano: Fix bandwidth report
It was expected that the bandwidth would be following the defines
at smscoreapi.h. However, this doesn't work. Instead, this field
brings just the bandwidth in MHz. Convert it to Hertz.
It should be noticed that, on ISDB, using the _EX request, the
field TuneBW seems to show the value that matches the bandwidth
code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:51:47 -03:00
Mauro Carvalho Chehab 9671045f4c [media] siano: fix PER/BER report on DVBv5
The check for lock logic is broken. Due to that, no PER/BER
stats will ever be showed, and the DVBV3 events will be wrong.
Also, the per-layer PER/BER stats for ISDB-T are filled with
the wrong index.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:49:32 -03:00
Mauro Carvalho Chehab f5de95e246 [media] siano: fix signal strength and CNR stats measurements
There are a number of small issues with the stats refactoring:
	- InBandPwr better represents the signal strength;
	- Don't zero signal strength /cnr if no lock;
	- Fix signal strength/cnr scale;
	- Don't need to fill PER/BER if not locked, as the
	  code will disable those stats anyway.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:49:17 -03:00
Mauro Carvalho Chehab a9b9fbdf0a [media] siano: don't request statistics too fast
As each DVBv3 call may generate an stats overhead, prevent doing
it too fast. This is specially useful if a burst of get stats
DVBv3 call is sent.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:49:04 -03:00
Mauro Carvalho Chehab 4cce1f4eb2 [media] siano: add two missing fields to ISDB-T stats debugfs
Those fields help to identify the version of the ISDB stats.
Useful while debuging the driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:48:49 -03:00
Mauro Carvalho Chehab 503efe5cfc [media] siano: split debugfs code into a separate file
To avoid mixing two different things at the same place, move the
debugfs code into a separate file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:48:41 -03:00
Mauro Carvalho Chehab 3f6b87cff6 [media] siano: allow showing the complete statistics via debugfs
Outputs the result of the statistics responses via debugfs.
That can help to track bugs at the stats filling.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:47:49 -03:00
Mauro Carvalho Chehab c02272f9b9 [media] siano: fix start of statistics
It seems that the first u32 after the header for some stats are used by
something not documented.
The stats struct starts after it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:47:39 -03:00
Mauro Carvalho Chehab d42f1cb253 [media] siano: Convert it to report DVBv5 stats
While this frontend provides a nice set of statistics, the
way it is currently reported to userspace is poor. Worse than
that, instead of using quality indicators that range from 0 to 65535,
as expected by userspace, most indicators range from 0 to 100.
Improve it by using DVBv5 statistics API. The legacy indicators
are still reported using the very same old way, but they're now
using a proper range (0 to 65535 for quality indicadors; 0.1 dB
for SNR).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:47:31 -03:00
Mauro Carvalho Chehab ff702eb8d9 [media] siano: split debug logic from the status update routine
It is confusing to merge both status updates with debug stuff.
Also, it is a better idea to move those status updates to
debugfs, instead of doing a large amount of printk's like that.
So, break them into a separate block of routines.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:47:18 -03:00
Mauro Carvalho Chehab eab0fa0f04 [media] siano: split get_frontend into per-std functions
Instead of handling both DVB-T and ISDB-T at the same get_frontend
function, break it intow one function per-delivery system.
That makes the code clearer as we start to add support for DVBv5
statistics, and for ISDB-T get frontend stuff.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:46:56 -03:00
Mauro Carvalho Chehab 80ccb51a0f [media] siano: simplify message endianness logic
Currently, every time a message is sent or received, the endiannes
need to be fixed on big endian machines. This is currently done
on every call to the send API, and on every msg reception logic.
Instead of doing that, move it to the send/receive functions.
That simplifies the logic and avoids the risk of forgetting to
fix it somewhere.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:46:18 -03:00
Mauro Carvalho Chehab fe802fd92d [media] siano: call MSG_SMS_INIT_DEVICE_REQ
Newer firmwares seem to require an init device message. Apply
such change from Doron Cohen's patch:
	http://patchwork.linuxtv.org/patch/7889/

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:45:36 -03:00
Mauro Carvalho Chehab dfbf021c9e [media] siano: Configure board's mtu and xtal
Backported from Doron Cohen's patch:
	http://patchwork.linuxtv.org/patch/7889/

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:45:25 -03:00
Mauro Carvalho Chehab 347d8f1fa6 [media] siano: add new devices to the Siano Driver
This patch is based on Doron Cohen's patches:
	http://patchwork.linuxtv.org/patch/7881/
	http://patchwork.linuxtv.org/patch/7888/
	http://patchwork.linuxtv.org/patch/7883/
It basically merges the above patches, rebasing them to
the macro definitions used upstream, with are different
 than the ones used by them internally.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:45:06 -03:00
Mauro Carvalho Chehab b4059095ab [media] siano: use the newer stats message for recent firmwares
The old statistics request don't work with newer firmwares.
Add a logic to use the newer stats if firmware major is 8.
Note that I have only 2 devices here, one with firmware 2.1
(Hauppauge model 55009 Rev B1F7) and another one with
firmware 8.1. We may need to adjust the firmware minimal
version for the *_EX message variants, as we start finding
firmware versions between 2.x and 8.x.
This patch was based on Doron Cohen patch:
	http://patchwork.linuxtv.org/patch/7886/

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:44:31 -03:00
Mauro Carvalho Chehab 0c189fa69e [media] siano: add support for LNA on ISDB-T
The very same code also exists for DVB-T. Add it for ISDB-T.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:44:05 -03:00
Mauro Carvalho Chehab a51fea4fdb [media] siano: add support for ISDB-T full-seg
Fix the DVBv5 API handling for ISDB-T and add support
for 13 segments.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:43:54 -03:00
Mauro Carvalho Chehab 76e41a655a [media] siano: use a separate completion for stats
Instead of re-use tune_done also for stats, the better is to use
a different completion.
Also, it was noticed that sometimes, the driver answers with
MSG_SMS_SIGNAL_DETECTED_IND for status request. Fix the code to
also handle those other signal indicators.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:43:31 -03:00
Mauro Carvalho Chehab faab6820b3 [media] siano: add some new messages to the smscoreapi
Based on Doron Cohen's patch:
	http://patchwork.linuxtv.org/patch/7887/

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:43:09 -03:00
Mauro Carvalho Chehab e5d218ee75 [media] siano: cleanups at smscoreapi.c
Some cleanups at smscoreapi. Most are just CodingStyle.
Also, use kzalloc when allocating a new buffer, as it initializes
the allocated space with zero.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:42:19 -03:00
Mauro Carvalho Chehab 9e915e5bc8 [media] siano: always load smsdvb
Without smsdvb, the driver actually does nothing, as it
lacks the userspace API.
While I wrote it independently, in order to make a sms2270 board
I have here to work, this patch is functionally identical to this
patch from Doron Cohen:
	http://patchwork.linuxtv.org/patch/7894/

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:41:59 -03:00
Mauro Carvalho Chehab 1e19c21ec7 [media] siano: fix the debug message
Instead of displaying this:
	[   61.869415] smscore_load_firmware_family2: rc=0, postload=0x          (null)
Display, instead:
	[ 1348.441160] smscore_load_firmware_family2: rc=0

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:41:42 -03:00
Mauro Carvalho Chehab ab7bdb1298 [media] siano: report the choosed firmware in debug
Don't keep in the dark: report the firmware file name after
lookup. That helps to debug what's happening when a firmware is not
found.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:41:06 -03:00
Mauro Carvalho Chehab 018b0c6f8a [media] siano: make load firmware logic to work with newer firmwares
There are new firmwares for sms2xxx devices. Change the firmware
load logic to handle those newer firmwares and devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:40:05 -03:00
Mauro Carvalho Chehab 7333839505 [media] siano: store firmware version
As there are some changes that seem to be firmware-dependent,
we need to store the firmware version, as we don't want to break
support for existing cards that use a legacy (and sometimes
custom) firmware.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:38:16 -03:00
Mauro Carvalho Chehab 05f0ffbc48 [media] siano: use USB endpoint descriptors for in/out endp
Instead of using hardcoded descriptors, detect them from the
USB descriptors.
This patch is rebased form Doron Cohen's patch:
	http://patchwork.linuxtv.org/patch/7883/

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:38:02 -03:00
Mauro Carvalho Chehab db30567a63 [media] siano: add additional attributes to cards entries
Those attributes will be used by the newer sms2xxx cards.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:37:39 -03:00
Mauro Carvalho Chehab 3ba92d0b58 [media] siano: Properly initialize board information
Board #0 is an existing one. Instead of initializing the driver
with it, use a different value to detect if board is unknown.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:36:51 -03:00
Mauro Carvalho Chehab ab2b599ebf [media] siano: add the remaining new defines from new driver
Add the remaining new defines/enums from Doron Cohen's patch:
        http://patchwork.linuxtv.org/patch/7882/

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:36:42 -03:00
Mauro Carvalho Chehab 4c3bdb5e2f [media] siano: better debug send/receive messages
Instead of printing a message for some random messages, print
it for all sent/received ones. That helps a lot to debug
what's going on.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:35:49 -03:00
Mauro Carvalho Chehab f251001c80 [media] siano: update message macros
Convert from #define into an enum and add the newer message
macros as found on this patch from Doron Cohen:
	http://patchwork.linuxtv.org/patch/7882/
No messages got supressed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:33:26 -03:00
Mauro Carvalho Chehab c31b9fb260 [media] siano: remove a duplicated structure definition
The same GPIO config struct was declared twice at the
driver, with different names and different macros:
	struct smscore_config_gpio
	struct smscore_config_gpio
Remove the one that uses CamelCase and fix the references to
its attributes/macros.
No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:12:51 -03:00
Mauro Carvalho Chehab 739a8c91a3 [media] siano: Add the new voltage definitions for GPIO
Those new definitions came from this patch, from Doron Cohen:
	http://patchwork.linuxtv.org/patch/7882/

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:10:17 -03:00
Mauro Carvalho Chehab f82757d912 [media] siano: Change GPIO voltage setting names
Siano changed the namespace on more recent API, and re-used some
of the old names. In order to be able to update the API to support
newer chips, the better is to follow this change.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:10:06 -03:00
Masanari Iida 07f4225889 treewide: Fix typos in printk
Correct spelling typo in various drivers.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-03-20 16:26:32 +01:00
Lad, Prabhakar 0ea21a5240 [media] davinci: vpbe: fix module build
add a null entry in platform_device_id {}.
This patch fixes following error:
drivers/media/platform/davinci/vpbe_venc: struct platform_device_id is 24 bytes.  The last of 3 is:
0x64 0x6d 0x33 0x35 0x35 0x2c 0x76 0x70 0x62 0x65 0x2d 0x76 0x65 0x6e 0x63 0x00 0x00 0x00 0x00 0x00 0x03 0x00 0x00 0x00
FATAL: drivers/media/platform/davinci/vpbe_venc: struct platform_device_id is not terminated with a NULL entry!
make[1]: *** [__modpost] Error 1

Reported-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Tested-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 17:53:04 -03:00
Hans Verkuil a8451ed205 [media] blackfin: replace V4L2_IN/OUT_CAP_CUSTOM_TIMINGS by DV_TIMINGS
The use of V4L2_IN/OUT_CAP_CUSTOM_TIMINGS is obsolete, use DV_TIMINGS instead.
Note that V4L2_IN/OUT_CAP_CUSTOM_TIMINGS is just a #define for
V4L2_IN/OUT_CAP_DV_TIMINGS.
At some point in the future these CUSTOM_TIMINGS defines might be removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 16:16:41 -03:00
Hans Verkuil db242f62bd [media] davinci: more gama -> gamma typo fixes
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 16:16:23 -03:00
Hans Verkuil 1de1951930 [media] davinci/dm644x_ccdc: fix compiler warning
drivers/media/platform/davinci/dm644x_ccdc.c: In function ‘validate_ccdc_param’:
drivers/media/platform/davinci/dm644x_ccdc.c:233:32: warning: comparison between ‘enum ccdc_gama_width’ and ‘enum ccdc_data_size’ [-Wenum-compare]
It took a bit of work, see this thread of an earlier attempt to fix this:
https://patchwork.kernel.org/patch/1923091/
I've chosen not to follow the suggestions in that thread since gamma_width is
really a different property from data_size. What you really want is to know if
gamma_width fits inside data_size and for that you need to translate each
enum into a maximum bit number so you can safely compare the two.
So I put in two static inline translation functions instead, keeping the rest
of the code the same (except for fixing the 'gama' typo).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 16:16:04 -03:00
Hans Verkuil b12aed0ec5 [media] davinci/vpfe_capture: remove current_norm
Since vpfe_capture already provided a g_std op setting current_norm
does not actually do anything. Remove it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 16:15:27 -03:00
Hans Verkuil 142b66e82c [media] davinci/vpbe_display: remove deprecated current_norm
Since vpbe_display already provides a g_std op setting current_norm
didn't do anything. Remove that code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 16:15:13 -03:00
Hans Verkuil 6f55dbaea5 [media] davinci/vpfe_capture: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 16:14:59 -03:00
Hans Verkuil ef2d41b19b [media] davinci: remove VPBE_ENC_DV_PRESET and rename VPBE_ENC_CUSTOM_TIMINGS
Remove VPBE_ENC_DV_PRESET (the DV_PRESET API is no longer supported) and
VPBE_ENC_CUSTOM_TIMINGS is renamed to VPBE_ENC_DV_TIMINGS since the old
"CUSTOM_TIMINGS" name is deprecated in favor of "DV_TIMINGS".

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 16:09:53 -03:00
Hans Verkuil 416d307651 [media] tvp7002: remove dv_preset support
Finally remove the dv_preset support from this driver. Note that dv_preset
support was already removed from any bridge drivers that use this i2c
driver, so the dv_preset ops were no longer called and can be removed
safely.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 16:08:56 -03:00
Hans Verkuil f96067af1f [media] tvp7002: use dv_timings structs instead of presets
In the functions tvp7002_mbus_fmt(), tvp7002_log_status and tvp7002_probe()
we should use the dv_timings data structures instead of dv_preset data
structures and functions.
This is the second step towards removing the deprecated preset support of this
driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 16:07:59 -03:00
Hans Verkuil f0cd015e31 [media] tvp7002: replace 'preset' by 'timings' in various structs/variables
This is the first step towards removing the deprecated preset support of this
driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 16:07:21 -03:00
Andrey Pavlenko f08e9f0d5c [media] [1/1,dvb-usb] GOTVIEW SatelliteHD card support
Added support for the GOTVIEW SatelliteHD card which is based on
Montage M88DS3000 and works very well with this driver.

Signed-off-by: Andrey Pavlenko <andrey.a.pavlenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 16:00:40 -03:00
David Härdeman 40fc5325e1 [media] rc-core: rename ir_input_class to rc_class
The name is already misleading and will be more so in the future as the
connection to the input subsystem is obscured away further.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 15:26:59 -03:00
David Härdeman e76d4ce49f [media] rc-core: initialize rc-core earlier if built-in
rc-core is a subsystem so it should be registered earlier if built into the
kernel.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 15:26:37 -03:00
Syam Sidhardhan 72873e51c5 [media] lmedm04: Remove redundant NULL check before kfree
kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 15:19:29 -03:00
John Smith 5144f5b760 [media] dvb_demux: Transport stream continuity check fix
This patch avoids incrementing continuity counter
demux->cnt_storage[pid] for TS packets without payload in accordance
with ISO /IEC 13818-1.

[mchehab@redhat.com: unmangle whitespacing and fix CodingStyle.
 Also checked ISO/IEC spec: patch is according with it]
Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: John Smith <johns90812@gmail.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 15:14:06 -03:00
Sean Young fa7b9ac2e2 [media] redrat3: missing endian conversions and warnings
Spotted by sparse.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 15:14:04 -03:00
Sean Young 4c055a5ae9 [media] redrat3: remove memcpys and fix unaligned memory access
In stead of doing a memcpy from #defined offset, declare structs which
describe the incoming and outgoing data accurately.
Tested on first generation RedRat.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 15:14:03 -03:00
Sean Young 801b69f257 [media] redrat3: limit periods to hardware limits
The redrat hardware cannot handle periods of larger than 32767us,
limit appropriately. Also fix memory leak in redrat3_get_timeout.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 15:14:00 -03:00
Mauro Carvalho Chehab 4159d01bea [media] em28xx: Add ISDB support for c3tech Digital duo
This is an hybrid board. However, for analog, it requires
a new driver for saa7136. So, for now, let's just add
support for Digital TV.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 15:13:50 -03:00
John Sheu 401f6a2729 [media] v4l2-mem2mem: drop rdy_queue on STREAMOFF
When a v4l2-mem2mem context gets a STREAMOFF call on either its CAPTURE
or OUTPUT queues, we should:
* Drop the corresponding rdy_queue, since a subsequent STREAMON expects
  an empty queue.
* Deschedule the context, as it now has at least one empty queue and
  cannot run.

Signed-off-by: John Sheu <sheu@google.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 15:13:33 -03:00
Arnd Bergmann e71918ea66 [media] ir: IR_RX51 only works on OMAP2
This driver can be enabled on OMAP1 at the moment, which breaks
allyesconfig for that platform. Let's mark it OMAP2PLUS-only
in Kconfig, since that is the only thing it builds on.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 21:02:04 -03:00
John Sheu f1a0569be6 [media] v4l2-mem2mem: use CAPTURE queue lock
In v4l2_m2m_try_schedule(), use the CAPTURE queue lock when accessing
the CAPTURE queue, instead of relying on just holding the OUTPUT queue
lock.

Signed-off-by: John Sheu <sheu@google.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 20:47:36 -03:00
Sakari Ailus b0a1f2a842 [media] media: implement 32-on-64 bit compat IOCTL handling
Use the same handlers where the structs are the same. Implement a new
handler for link enumeration since struct media_links_enum is different on
32-bit and 64-bit systems.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 20:45:14 -03:00
Sakari Ailus c6c1d50b51 [media] media: Add 64--32 bit compat ioctl handler
Provide an ioctl handler for 32-bit binaries on 64-bit systems.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 20:44:36 -03:00
Peter Senna Tschudin cab3e1ffbe [media] cx25821: Cleanup filename assignment code
I'm pasting the original code and my proposal on the commit message for
make it easy to compare the two versions.
Line 62 of cx25821-audio-upstream.h contains:
char *_defaultAudioName = "/root/audioGOOD.wav";
Original code after replace kmemdup for kstrdup, and after fix return error
code:
if (dev->input_audiofilename) {
	dev->_audiofilename = kstrdup(dev->input_audiofilename,
				      GFP_KERNEL);
	if (!dev->_audiofilename) {
		err = -ENOMEM;
		goto error;
	}
	/* Default if filename is empty string */
	if (strcmp(dev->input_audiofilename, "") == 0)
		dev->_audiofilename = "/root/audioGOOD.wav";
} else {
	dev->_audiofilename = kstrdup(_defaultAudioName,
				      GFP_KERNEL);
	if (!dev->_audiofilename) {
		err = -ENOMEM;
		goto error;
	}
}
Code proposed in this patch:
if ((dev->input_audiofilename) &&
    (strcmp(dev->input_audiofilename, "") != 0))
	dev->_audiofilename = kstrdup(dev->input_audiofilename,
				      GFP_KERNEL);
else
	dev->_audiofilename = kstrdup(_defaultAudioName,
				      GFP_KERNEL);
if (!dev->_audiofilename) {
	err = -ENOMEM;
	goto error;
}

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 20:37:09 -03:00
Mauro Carvalho Chehab 52dee392f4 [media] dvb_frontend: Simplify the emulation logic
The current logic was broken and too complex; while it works
fine for DVB-S2/DVB-S, it is broken for ISDB-T.
Make the logic simpler, fixes it for ISDB-T and make it clearer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 20:33:03 -03:00
Mauro Carvalho Chehab be431b16c6 [media] dvb-frontend: split set_delivery_system()
This function is complex, and has different workflows, one for
DVBv3 calls, and another one for DVBv5 calls. Break it into 3
functions, in order to make easier to understand what each
block does.
No functional changes so far. A few comments got improved.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 20:30:36 -03:00
Frank Schaefer 7f6301d125 [media] em28xx-i2c: relax error check in em28xx_i2c_recv_bytes()
It turned out that some devices return less bytes then requested via i2c when
ALL of the following 3 conditions are met:
- i2c bus B is used
- there was no attempt to write to the specified slave address before
- no device present at the specified slave address
With the current code, this triggers an -EIO error and prints a message to the
system log.
Because it can happen very often during device probing, it is better to ignore
this error and bail out silently after the follwing i2c transaction success
check with -ENODEV.

[mchehab@redhat.com: a small CodingStyle fix]
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 20:18:29 -03:00
Frank Schaefer 195281d0dc [media] em28xx: set the timestamp type for video and vbi vb2_queues
The em28xx driver obtains the timestamps using function v4l2_get_timestamp(),
which produces a montonic timestamp.
Fixes the warnings appearing in the system log since commit 6aa69f99
"[media] vb2: Add support for non monotonic timestamps"

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 20:16:47 -03:00
Mauro Carvalho Chehab aab3125c43 [media] em28xx: add support for registering multiple i2c buses
Register both buses 0 and 1 via I2C API. For now, bus 0 is used
only by eeprom on all known devices. Later patches will be needed
if this changes in the future.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 18:56:27 -03:00
Mauro Carvalho Chehab 3aa2b3b9cc [media] em28xx: Add a separate config dir for secondary bus
Prepare to register a separate bus for the second bus.
For now, just add a new field. A latter patch will add the
bits to make it work.
This patch was generated by this script:
perl -e 'while (<>) { if (s/EM2874_I2C_SECONDARY_BUS_SELECT.*\n//) {
	printf "\t\t.def_i2c_bus  = 1,\n"; $found = 1; print $_ } else { if ($found) { s/^\s+// }; $found = 0; print $_; } }' \
drivers/media/usb/em28xx/em28xx-cards.c >a && mv a drivers/media/usb/em28xx/em28xx-cards.c

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 18:14:52 -03:00
Mauro Carvalho Chehab c7a45e5b4f [media] em28xx: Prepare to support 2 different I2C buses
Newer em28xx devices have 2 buses. Change the logic to allow
using both buses.
This patch was generated by this small script:
for i in drivers/media/usb/em28xx/*.c; do
	sed 's,->i2c_adap,->i2c_adap[dev->def_i2c_bus],g;s,->i2c_client,->i2c_client[dev->def_i2c_bus],'
done
Of course, em28xx.h needed manual edit.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 18:14:15 -03:00
Geert Uytterhoeven da508f5799 [media] media/v4l2: VIDEOBUF2_DMA_CONTIG should depend on HAS_DMA
m68k/sun3:
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:
drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:
drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’
Make VIDEOBUF2_DMA_CONTIG and VIDEO_SH_VEU (which selects the former and
doesn't have a platform dependency) depend on HAS_DMA to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 18:03:18 -03:00
Paul Bolle b78a1f3722 [media] m920x: let GCC see 'ret' is used initialized
Since commit 7543f344e9 ("[media] m920x:
factor out a m920x_write_seq() function") building m920x.o triggers this
GCC warning:
    drivers/media/usb/dvb-usb/m920x.c: In function ‘m920x_probe’:
    drivers/media/usb/dvb-usb/m920x.c:91:6: warning: ‘ret’ may be used uninitialized in this function [-Wuninitialized]
This warning is caused by m920x_write_seq(), which is apparently inlined
into m920x_probe(). It is clear why GCC thinks 'ret' may be used
uninitialized. But in practice the first seq->address will always be
non-zero when this function is called. That means we can change the
while()-do{} loop into a do{}-while() loop. And that suffices to make
GCC see that 'ret' will not be used uninitialized.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 17:35:24 -03:00
Sachin Kamat 3c75a2e1cf [media] s5p-mfc: Staticize symbols in s5p_mfc_opr_v5.c
Some symbols are used only in this file. Make them static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 17:25:30 -03:00
Sachin Kamat b9571a577b [media] s5p-mfc: Staticize symbols in s5p_mfc_opr_v6.c
Symbols used only in this file should be made static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 17:25:03 -03:00
Sachin Kamat 4294dcf7e3 [media] s5p-mfc: Staticize some symbols in s5p_mfc_cmd_v5.c
These symbols are used only in this file and can be made static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 17:24:11 -03:00
Sachin Kamat 95a75544cf [media] s5p-mfc: Staticize some symbols in s5p_mfc_cmd_v6.c
Since these symbols are used only in this file, they can be made static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 17:23:47 -03:00
Matt Gomboc 3ead1ba31b [media] cx231xx : Add support for OTG102 aka EZGrabber2
Thanks for the response, I have done as you suggested.
Below is an updated patch for the OTG102 device against http://git.linuxtv.org/hverkuil/media_tree.git/shortlog/refs/heads/cx231xx, kernel version 3.8.
With further testing it appears the extra clauses in cx231xx-cards.c were not necessary (in static in cx231xx_init_dev and static int cx231xx_usb_probe), so those have been also been removed.

Signed-off-by: Matt Gomboc <gomboc0@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 17:22:55 -03:00
Syam Sidhardhan 33cef283af [media] dvb-usb: Remove redundant NULL check before kfree
kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 17:05:17 -03:00
Syam Sidhardhan f1065c9648 [media] media: tuners: Remove redundant NULL check before kfree
kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 17:04:55 -03:00
Syam Sidhardhan 18552ea132 [media] media: ivtv: Remove redundant NULL check before kfree
kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 17:04:37 -03:00
Syam Sidhardhan 2da8eab975 [media] siano: Remove redundant NULL check before kfree
kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 17:03:41 -03:00
Dmitry Torokhov bf30690029 [media] Media: remove incorrect __init/__exit markups
Even if bus is not hot-pluggable, the devices can be unbound from the
driver via sysfs, so we should not be using __exit annotations on
remove() methods. The only exception is drivers registered with
platform_driver_probe() which specifically disables sysfs bind/unbind
attributes.
Similarly probe() methods should not be marked __init unless
platform_driver_probe() is used.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 16:59:59 -03:00
Antti Palosaari 4458a54c5e [media] anysee: coding style changes
I did what I liked to do. Also corrected two long log writings
as checkpatch.pl was complaining about those.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 16:54:57 -03:00
Antti Palosaari 6c604e8e86 [media] anysee: do not use buffers from stack for usb_bulk_msg()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 16:54:26 -03:00
Antti Palosaari 3484d37a66 [media] af9035: do not use buffers from stack for usb_bulk_msg()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 16:53:33 -03:00
Antti Palosaari aff8c2d475 [media] af9015: do not use buffers from stack for usb_bulk_msg()
WARNING: at lib/dma-debug.c:947 check_for_stack+0xa7/0xf0()
ehci-pci 0000:00:04.1: DMA-API: device driver maps memory fromstack

Reported-by: poma <pomidorabelisima@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 16:51:17 -03:00
Antti Palosaari acb0549acc [media] dvb_usb_v2: locked versions of USB bulk IO functions
Implement:
dvb_usbv2_generic_rw_locked()
dvb_usbv2_generic_write_locked()
Caller must hold device lock when locked versions are called.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 16:43:15 -03:00
Syam Sidhardhan 972b072a83 [media] hdpvr: Fix memory leak
This patch fixes the print_buf leaking.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 16:39:08 -03:00
Syam Sidhardhan 06f950f43f [media] lmedm04: Fix possible NULL pointer dereference
Check for (adap == NULL) has to done before accessing adap.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 16:34:15 -03:00
Thiago Farina 0169ab28b3 [media] media/usb: cx231xx-pcb-cfg.h: Remove unused enum _true_false
Signed-off-by: Thiago Farina <tfarina@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-14 11:46:07 -03:00
Igor M. Liplianin 44122dd6b6 [media] media: Terratec Cinergy S2 USB HD Rev.2
Terratec Cinergy S2 USB HD Rev.2 support.
This commit is a corrected cherry-pick of 03228792 which got reverted in
b7e38636 because it was rebased incorrectly and introduced compilation
errors.

Signed-off-by: Stephan Hilb <stephan@ecshi.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-14 11:45:36 -03:00
Alexey Khoroshilov c67d2f0740 [media] stv090x: do not unlock unheld mutex in stv090x_sleep()
goto err and goto err_gateoff before mutex_lock(&state->internal->demod_lock)
lead to unlock of unheld mutex in stv090x_sleep().
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-14 11:40:32 -03:00
Sachin Kamat a9fc36afc0 [media] timblogiw: Fix sparse warning
Fixes the below warning:
drivers/media/platform/timblogiw.c:81:31: warning:
symbol 'timblogiw_tvnorms' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-14 11:36:34 -03:00
Fabrizio Gazzato d9b7595bed [media] af9035: add ID [0ccd:00aa] TerraTec Cinergy T Stick (rev. 2)
This patch adds USB ID for alternative "Terratec Cinergy T Stick".
Tested by a friend: works similarly to 0ccd:0093 version (af9035+tua9001)

Signed-off-by: Fabrizio Gazzato <fabrizio.gazzato@gmail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-14 11:24:03 -03:00
Gianluca Gennari 9bb05696af [media] cx231xx: fix undefined function cx231xx_g_chip_ident()
This patch:
http://git.linuxtv.org/media_tree.git/commit/b86d15440b683f8634c0cb26fc0861a5bc4913ac
is missing a chunk when compared to an older version:
https://patchwork.kernel.org/patch/2063281/
probably because of an unresolved merging conflict.
This causes the following error:
WARNING: "cx231xx_g_chip_ident" [/home/jena/media_build/v4l/cx231xx.ko] undefined!

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-14 09:45:55 -03:00
Frank Schaefer 457ba4ce4f [media] bttv: move fini_bttv_i2c() from bttv-input.c to bttv-i2c.c
Like init_bttv_i2c(), fini_bttv_i2c() belongs to bttv-i2c.c.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 17:11:12 -03:00
Frank Schaefer fa56307328 [media] bttv: make remote controls of devices with i2c ir decoder working
Request module ir-kbd-i2c if an i2c ir decoder is detected.
Tested with device "Hauppauge WinTV Theatre" (model 37284 rev B421).

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 17:10:43 -03:00
Fabrizio Gazzato e6a60d768b [media] rtl28xxu: Add USB ID for MaxMedia HU394-T
Add USB ID for MaxMedia HU394-T USB DVB-T Multi (FM, DAB, DAB+)
dongle (RTL2832U+FC0012)

In Italy, is branded as "DIKOM USB-DVBT HD"
lsusb:	ID 1b80:d394 Afatech

Signed-off-by: Fabrizio Gazzato <fabrizio.gazzato@gmail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 17:02:54 -03:00
Hans Verkuil 0b84caab36 [media] s2255: fix big-endian support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:42:30 -03:00
Hans Verkuil 5c632b223a [media] s2255: choose YUYV as the default format, not YUV422P
The planar YUV422P is quite unusual and few if any applications support it.
Instead choose the common YUYV format as the default.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:41:53 -03:00
Hans Verkuil 05e5d44b07 [media] s2255: Add ENUM_FRAMESIZES support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:41:26 -03:00
Hans Verkuil 3c728118e0 [media] s2255: don't zero struct v4l2_streamparm
All fields after 'type' are already zeroed by the core framework.
Clearing the full struct also clears 'type', which causes a wrong
type value to be returned.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:40:25 -03:00
Hans Verkuil 92513611fa [media] s2255: fix field handling
Just set the field value based on the chosen format. It's either INTERLACED
or TOP.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:39:57 -03:00
Hans Verkuil 29ceb1101e [media] s2255: zero priv and set colorspace
Set priv field of struct v4l2_pix_format to 0 and fill in colorspace.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:37:37 -03:00
Hans Verkuil 469af77a17 [media] s2255: fixes in the way standards are handled
Instead of comparing against STD_NTSC and STD_PAL compare against 60 and
50 Hz formats. That's what you really want.
When the standard is changed, make sure the width and height of the format
are also updated to reflect the current standard.
Also replace the deprecated current_norm by the g_std ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:37:10 -03:00
Hans Verkuil 39696009d0 [media] s2255: add device_caps support to querycap
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:36:12 -03:00
Hans Verkuil 44d06d8273 [media] s2255: add support for control events and prio handling
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:35:47 -03:00
Hans Verkuil 7041dec7a9 [media] s2255: add V4L2_CID_JPEG_COMPRESSION_QUALITY
The use of the V4L2_CID_JPEG_COMPRESSION_QUALITY control is recommended over
the G/S_JPEGCOMP ioctls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:34:47 -03:00
Hans Verkuil 192f1e78cb [media] s2255: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:34:24 -03:00
Hans Verkuil 4ca286610f [media] radio-rtrack2: fix mute bug
Setting the frequency would unmute the card. Fixed the mute handling in the
s_frequency code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:20:07 -03:00
Hans Verkuil 8b21eb17e7 [media] radio-isa: fix querycap capabilities code
The device_caps and capabilities fields were swapped.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:19:54 -03:00
Theodore Kilgore c93396e135 [media] gspca: Remove gspca-specific debug magic
Instead use v4l2_dbg and v4l2_err. Note that the PDEBUG macro is kept to
make this patch-set less invasive, but it is simply a wrapper around
v4l2_dbg now. Most of the other changes are there to make the dev parameter
for the v4l2_xxx macros available everywhere we do logging.

Signed-off-by: Theodore Kilgore <kilgota@auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:13:48 -03:00
Hans de Goede 70c8ecf54b [media] gspca: Remove old control code now that all drivers are converted
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:11:22 -03:00
Hans de Goede 2effe6de38 [media] gscpa: Remove autogain_functions.h
Now that sonixj.c has been converted to the control framework it is no
longer used.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:11:03 -03:00
Hans Verkuil 9f8c734735 [media] gspca_sonixb: Remove querymenu function (dead code)
We forgot to remove that when sonixb was converted to the control framework.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:10:45 -03:00
Hans de Goede c84e412f6f [media] gscpa_m5602: Convert to the control framework
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:10:27 -03:00
Hans de Goede 676fdd856b [media] gscpa_gl860: Convert to the control framework
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:06:20 -03:00
Hans Verkuil c1f07ab2b3 [media] gspca_sonixj: Convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 15:05:52 -03:00
Sachin Kamat 5ce60d790a [media] s5p-g2d: Add DT based discovery support
This patch adds device tree based discovery support to the G2D driver.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:54:17 -03:00
Sylwester Nawrocki 69b95a3a80 [media] s3c-camif: Fail on insufficient number of allocated buffers
Ensure the driver gets always at least its minimum required
number of buffers allocated by checking actual number of
allocated buffers in vb2_reqbufs(). And free any partially
allocated buffer queue with signaling an error to user space.
Without this patch applications may wait forever to dequeue
a filled buffer, because the hardware didn't even start after
VIDIOC_STREAMON, VIDIOC_QBUF calls, due to insufficient number
of empty buffers.

Reported-by: Alexander Nestorov <alexandernst@gmail.com>
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:53:47 -03:00
Kamil Debski 6aa69f99b2 [media] vb2: Add support for non monotonic timestamps
Not all drivers use monotonic timestamps. This patch adds a way to set the
timestamp type per every queue.
In addition, set proper timestamp type in drivers that I am sure that use
either MONOTONIC or COPY timestamps. Other drivers will correctly report
UNKNOWN timestamp type instead of assuming that all drivers use monotonic
timestamps.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:53:05 -03:00
Hans Verkuil 9776e17189 [media] stk-webcam: implement support for count == 0 when calling REQBUFS
The spec specifies that setting count to 0 in v4l2_requestbuffers
should result in releasing any streaming resources and the stream
ownership. Implement this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:44:17 -03:00
Hans Verkuil f81e372a5d [media] stk-webcam: s_fmt shouldn't grab ownership
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:44:04 -03:00
Hans Verkuil 1b499fe506 [media] stk-webcam: fix read() handling when reqbufs was already called
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:43:41 -03:00
Hans Verkuil f80daa2d7d [media] stk-webcam: enable core-locking
This makes it possible to switch to unlocked_ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:43:10 -03:00
Hans Verkuil 8407653f5e [media] stk-webcam: zero the priv field of v4l2_pix_format
The priv field should be set to 0. In this case the driver abused the priv
field for internal housekeeping. Modify the code so priv is no longer used
for that purpose.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:42:38 -03:00
Hans Verkuil b27763f0fa [media] stk-webcam: fix querycap and simplify s_input
Add device_caps support to querycap, fill in bus_info correctly and
do not set the version field (let the core handle that).
Also simplify the s_input ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:42:12 -03:00
Hans Verkuil 89ea47069c [media] stk-webcam: add support for control events and prio handling
Also correct the first_init static: this should be part of the stk_camera struct.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:41:10 -03:00
Hans Verkuil 10351adc6a [media] stk-webcam: don't use private_data, use video_drvdata
file->private_data is needed to store the pointer to struct v4l2_fh.
So use video_drvdata to get hold of the stk_camera struct.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:40:10 -03:00
Hans Verkuil dc0fb28675 [media] stk-webcam: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:39:40 -03:00
Hans Verkuil 968c60f603 [media] stk-webcam: add support for struct v4l2_device
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:38:10 -03:00
Hans Verkuil e144760a33 [media] stk-webcam: remove bogus STD support
It's a webcam, the STD API is not applicable to webcams.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:34:39 -03:00
Hans Verkuil 2aeb73e19d [media] stk-webcam: add ASUS F3JC to upside-down list
And add an extensive comment relating the history of the upside-down
handling in this driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Arvydas Sidorenko <asido4@gmail.com>
Thanks-to: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:34:03 -03:00
Hans Verkuil 6b236a375d [media] cx231xx: fix gpio big-endian problems
Tested on my big-endian ppc-based test machine.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:07 -03:00
Hans Verkuil 69a11a3264 [media] cx231xx: fix big-endian problems
Tested on my big-endian ppc-based test machine.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:07 -03:00
Hans Verkuil fff9e818fb [media] cx231xx: don't use port 3 on the Conexant video grabber
It's not working reliably if port 3 is enabled.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:06 -03:00
Hans Verkuil 720b3dfad4 [media] cx231xx: don't reset width/height on first open
The last set width/height must be preserved as per the spec.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:06 -03:00
Hans Verkuil b31077a88a [media] cx231xx: disable 417 support from the Conexant video grabber
The 417 support doesn't work. Until someone can dig into this driver to
figure out why it isn't working the 417 support is disabled.
Sometimes you can actually stream a bit, but very soon the whole machine
crashes, so something is seriously wrong.
For the record, this was not introduced by my recent changes to this driver,
it was broken before that.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:05 -03:00
Hans Verkuil 4485ea917b [media] cx231xx: remove bogus driver prefix in log messages
The prefix is generated automatically, so no need to provide it again.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:05 -03:00
Hans Verkuil 88b6ffedd9 [media] cx231xx-417: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:04 -03:00
Hans Verkuil b86d15440b [media] cx231xx-417: share ioctls with cx231xx-video
Share tuner, frequency, debug and input ioctls with cx231xx-video.
These are all shared resources, so no need to implement them again.

[mchehab@redhat.com: Fix merge conflict and a checkpatch issue]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:04 -03:00
Hans Verkuil 5b8acdc5e6 [media] cx231xx-417: checkpatch cleanups
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:03 -03:00
Hans Verkuil 5aa95991d7 [media] cx231xx-417: fix g/try_fmt compliance problems
Colorspace, field and priv were not set, and sizeimage was calculated
using the wrong values (dev->ts1.ts_packet_size and dev->ts1.ts_packet_count
can be 0 at module load).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:03 -03:00
Hans Verkuil bc08734c82 [media] cx231xx-417: use one querycap for all device nodes
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:02 -03:00
Hans Verkuil 3f926e326d [media] cx231xx-417: remove empty functions
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:01 -03:00
Hans Verkuil d61072a497 [media] cx231xx: improve std handling
Set the initial standard of subdevices instead of leaving it undefined.
Also update the width and height when a new standard is chosen and
return -EBUSY when attempting to change the standard while videobuf is
busy.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:01 -03:00
Hans Verkuil 71590765b8 [media] cx231xx: get rid of a bunch of unused cx231xx_fh fields
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:00 -03:00
Hans Verkuil 1265f080d8 [media] cx231xx: replace ioctl by unlocked_ioctl
There was already a core lock, so why wasn't ioctl already replaced by
unlock_ioctl?
This patch switches to unlocked_ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:00 -03:00
Hans Verkuil a25a7012ba [media] cx231xx: remove current_norm usage
The use of this field is deprecated since it will not work when multiple
device nodes reference the same video input (the video and vbi nodes in
this case). The norm field should be a device-global value.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:26:00 -03:00
Hans Verkuil 1d08a4fa75 [media] cx231xx: add struct v4l2_fh to get prio and event support
Required to resolve v4l2-compliance failures.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:25:59 -03:00
Hans Verkuil d2370f8eee [media] cx231xx: convert to the control framework
This is needed to resolve the v4l2-compliance complaints about the control
ioctls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:25:59 -03:00
Hans Verkuil 6264722c12 [media] cx231xx: fix vbi compliance issues
Various v4l2-compliance fixes: remove unused sliced VBI functions, zero the
reserved fields of struct v4l2_vbi_format and implement the missing s_fmt_vbi_cap.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:25:59 -03:00
Hans Verkuil 0752d98e1a [media] cx231xx: fix frequency clamping
Let the tuner clamp the frequency and store that clamped value.
This fixes a v4l2_compliance failure.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:25:58 -03:00
Hans Verkuil 8b735c1307 [media] cx231xx: zero priv field and use right width in try_fmt
The priv field of v4l2_pix_format must be zeroed. Also fix a bug in try_fmt
where the current width was used instead of the width passed to try_fmt.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:25:58 -03:00
Hans Verkuil b251f95767 [media] cx231xx: fix tuner compliance issues
The g_tuner call wasn't passed on to the subdevices, g_frequency didn't
check for invalid tuners and a low-level function that was expected to
return 0 or a negative error returned a positive number instead, causing
s_frequency to return bogus errors.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:25:58 -03:00
Hans Verkuil 06c46003f7 [media] cx231xx: remove broken audio input support from the driver
The audio selection code is broken. Audio and video indices were
mixed up and s_audio would reject changing the audio input to
something else anyway, so what's the point?
All the audio input code has been removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:25:57 -03:00
Hans Verkuil 530e01e782 [media] cx231xx: clean up radio support
Radio should not use video or audio inputs.
In addition, fix a bug in radio_g_tuner where s_tuner was called in the tuner
subdev instead of g_tuner.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:25:57 -03:00
Hans Verkuil fddd14c8f6 [media] cx231xx: add required VIDIOC_DBG_G_CHIP_IDENT support
This fixes a v4l2_compliance failure.

[mchehab@redhat.com: CodingStyle fixes]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:25:57 -03:00
Hans Verkuil 4bc837d414 [media] cx231xx: add device_caps support to QUERYCAP
This fixes a v4l2_compliance failure.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:25:57 -03:00
Hans Verkuil e74d7e6d34 [media] bttv: remove g/s_audio since there is only one audio input
Note that the current driver does not implement enumaudio (so apps cannot
tell that audio inputs are present), it does not set V4L2_CAP_AUDIO, nor
does it set audioset when calling ENUM_INPUT. And G_AUDIO doesn't set the
stereo flag either. So these g/s_audio ioctls are quite pointless and
misleading. Especially since some surveillance boards do not have audio
at all.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:25:12 -03:00
Hans Verkuil b8e2a361ce [media] bttv: do not switch to the radio tuner unless it is accessed
Just opening the radio tuner should not cause a switch to the radio tuner.
Only after calling g/s_tuner or g/s_frequency should this happen.
This prevents audio being unmuted as soon as the driver is loaded because
some process opens /dev/radioX just to see what sort of node it is, which
switches on the radio tuner and unmutes audio.
This code can be improved further by actually keeping track of who owns the
tuner and returning -EBUSY if switching tuner modes will cause problems.
But for now just fix the annoying case where on boot the radio turns on
automatically.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:24:58 -03:00
Hans Verkuil c13eb7039f [media] bttv: fix try_fmt_vid_overlay and setup initial overlay size
try_fmt_vid_overlay should map incorrect sizes and fields to valid values.
It also expects that an initial overlay size is defined so g_fmt_vid_overlay
returns valid information.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:24:28 -03:00
Hans Verkuil 3d4b803505 [media] bttv: fix g_tuner capabilities override
The capability field of v4l2_tuner should be ORed by the various subdevs
and by the main driver. In this case the stereo capability was dropped.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:23:59 -03:00
Hans Verkuil fafdc26b85 [media] bttv: there may be multiple tvaudio/tda7432 devices
Probe for additional tvaudio devices, and allow tvaudio+tda7432 to
co-exist. My STB TV PCI FM bttv card has a tda7432, a tda9850 and a
tea6420 and with this patch it finally works again (probably for the
first time in many years).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:23:37 -03:00
Hans Verkuil 6795cc5550 [media] bttv: use centralized std and implement g_std
The 'current_norm' field cannot be used if multiple device nodes (video and
vbi in this case) set the same std.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:23:02 -03:00
Hans Verkuil 8c14cc1f0a [media] bttv: fix priority handling
Replace the - incorrect - manual priority handling with the core priority
implementation.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:22:35 -03:00
Hans Verkuil ae50f0f83e [media] bttv: add support for control events
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:13:10 -03:00
Hans Verkuil 01df530c27 [media] bttv: convert to the control framework
Note that the private chroma agc control has been replaced with the standard
CHROMA_AGC control.
Also fixes a mute/automute problem where closing the file handle would force
mute on. That's not what you want since that would make the mute state out of
sync with the mute control. Instead check against the user count.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:12:05 -03:00
Hans Verkuil 5d478e0de8 [media] tda7432: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:08:14 -03:00
Hans Verkuil ee70e3d803 [media] bttv: fix field handling inside TRY_FMT
- don't return -EINVAL for invalid field types, handle those as if it
  was FIELD_ANY.
- the handling of FIELD_SEQ_BT/TB was wrong as well: if such field formats
  aren't supported, then fall back to FIELD_ANY instead of returning an error.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:07:05 -03:00
Hans Verkuil a12fd70e3b [media] bttv: fill in fb->flags for VIDIOC_G_FBUF
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:04:56 -03:00
Hans Verkuil f586489993 [media] bttv: fill in colorspace
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:03:44 -03:00
Hans Verkuil a652ef6095 [media] bttv: G_PARM: set readbuffers
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:03:23 -03:00
Hans Verkuil 76ea992a03 [media] bttv: set initial tv/radio frequencies
Set an initial frequencies when the driver is loaded. That way G_FREQUENCY will
give a frequency that corresponds with reality.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:02:58 -03:00
Hans Verkuil d9b6707673 [media] bttv: disable g/s_tuner and g/s_freq when no tuner present, fix return codes
If no tuner is present, then disable the tuner and frequency ioctls.
We can remove a number of checks from those ioctls testing for the presence
of a tuner.
Also remove some tuner type checks (now done by the core) and fix an
error return when the prio check fails.
Finally some 'unlikely' statements are removed since those only make sense
in tightly often executed loops, otherwise they just clutter up the code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:01:59 -03:00
Hans Verkuil f74f89cb1c [media] bttv: fix ENUM_INPUT and S_INPUT
- Fix ENUM_INPUT audioset.
- Fix incorrect input check in s_input.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:01:17 -03:00
Hans Verkuil 1b9e94dc69 [media] bttv: add VIDIOC_DBG_G_CHIP_IDENT
VIDIOC_DBG_G_CHIP_IDENT is a prerequisite for the G/S_REGISTER ioctls.
In addition, add support to call G/S_REGISTER for supporting i2c devices.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 14:00:16 -03:00
Hans Verkuil 78dea1aed4 [media] bttv: fix querycap and radio v4l2-compliance issues
The querycap ioctl didn't support V4L2_CAP_DEVICE_CAPS and the radio device
implemented audio and video inputs and s_std, which are not part of the radio
API.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 13:59:05 -03:00
Hans Verkuil ca1178ed6a [media] tlg2300: Remove logs() macro
ioctl debugging can now be done through the debug parameter in sysfs.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 11:49:01 -03:00
Hans Verkuil 60c66b6f27 [media] tlg2300: allow multiple opens
Due to a poor administration of the driver state it wasn't possible to open
a video or vbi device multiple times.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 11:00:26 -03:00
Hans Verkuil d4de6e4062 [media] tlg2300: remove empty vidioc_try_fmt_vid_cap, add missing g_std
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 10:49:03 -03:00
Hans Verkuil f29056ebd9 [media] tlg2300: implement the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 10:48:40 -03:00
Hans Verkuil 7cb2398750 [media] tlg2300: fix missing audioset
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 10:47:54 -03:00
Hans Verkuil 7556ba9bfb [media] tlg2300: fix frequency handling
The usual set of problems: the frequency isn't clamped to the frequency range,
no tuner index check and the frequency isn't initialized properly on module
load.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 10:47:37 -03:00
Hans Verkuil c5d8907faa [media] tlg2300: fix querycap
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 10:45:12 -03:00
Hans Verkuil 1b952f17f3 [media] tlg2300: embed video_device
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 10:35:11 -03:00
Hans Verkuil 270ecca60e [media] tlg2300: add missing video_unregister_device
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 09:35:27 -03:00
Hans Verkuil 42e509c6d3 [media] tlg2300: fix radio querycap
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05 09:35:05 -03:00
Hans Verkuil 668cb00ed5 [media] tlg2300: switch to v4l2_fh
This switch to v4l2_fh resolves the last v4l2_compliance issues with respect
to control events and priority handling.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 17:33:46 -03:00
Hans Verkuil 173fdb8aff [media] tlg2300: add control handler for radio device node
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 17:33:02 -03:00
Hans Verkuil 6fef490706 [media] tlg2300: embed video_device instead of allocating it
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 17:31:59 -03:00
Hans Verkuil 8f08294605 [media] tlg2300: remove ioctls that are invalid for radio devices
The input and audio ioctls are only valid for video/vbi nodes.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 17:31:19 -03:00
Hans Verkuil 54dd0dde85 [media] tlg2300: switch to unlocked_ioctl
The driver already does locking, so it is safe to switch to unlocked_ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 17:30:54 -03:00
Hans Verkuil 8bdfe557b8 [media] tlg2300: fix tuner and frequency handling of the radio device
This driver now passes the tuner and frequency tests of v4l2-compliance.
It's the usual bugs: frequency wasn't clamped to the valid frequency range,
incorrect tuner capabilities and tuner fields not filled in, missing test
for invalid tuner index, no initial frequency and incorrect error handling.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 17:30:35 -03:00
Hans Verkuil 919729237f [media] tlg2300: use correct device parent
Set the correct parent for v4l2_device_register and don't set the name
anymore (that's now deduced from the parent). Also remove an unnecessary
forward reference and fix two weird looking log messages.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 17:28:49 -03:00
Frank Schaefer a61660185b [media] em28xx: enable tveeprom for device Hauppauge HVR-930C
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:38:05 -03:00
Mauro Carvalho Chehab 0e4bbedd63 [media] mb86a20s: Don't assume a 32.57142MHz clock
Now that some devices initialize register 0x2a with different
values, add the calculus formula, instead of hardcoding it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:37:07 -03:00
Mauro Carvalho Chehab 04fa725e7b [media] mb86a20s: Implement set_frontend cache logic
Up to now, the driver was simply assuming TV mode, 13 segs.
Implement the logic to control the ISDB operational mode.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:36:40 -03:00
Mauro Carvalho Chehab 385cd33c8d [media] em28xx-dvb: Don't put device in suspend mode at feed stop
Putting em28xx in suspend mode when a feed stops is just plain
wrong. Every time a new PES filter is changed, the DVB demux
code will stop the current feed, and then start a new one.
If are there any code that switches off the frontend, via
some GPIO setting, this would make the DVB fail.
This condition was actually trigged with one device, during
DVB scan, as, during scan, it is common that userspace apps
to change the filter several times, in order to get all
tables.
Also, this is not needed at all, since the em28xx code already
hooks into ops.ts_bus_ctrl(). This warrants that em28xx can
check there if DVB frontend is in usage or not. The code there
already puts the device on suspend mode, if the DVB frontend
is not used (closed).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:35:54 -03:00
Mauro Carvalho Chehab 84c09d723c [media] cx231xx: Improve signal reception for PV SBTVD
Instead of using 3.3 MHz IF, use 4MHz. That's the standard
value for the demod, and, while it can be adjusted, 3.3 MHz
is out of the recommended range. So, let's stick with the
default.
With regards to the IF voltage level, instead of using
0.5 V(p-p) for IF, use 2V, giving a 12dB gain.
The rationale is that, on PixelView SBTVD Hybrid,
even 2V(p-p) would be in the nominal range for IF,
as the maximum range on this particular device is 3V.
A higher gain here should help to improve reception under
weak signals.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:35:38 -03:00
Mauro Carvalho Chehab 3a2e47519e [media] mb86a20s: cleanup the status at set_frontend()
As the device got re-initialized, the stats should vanish
until the device gets lock again.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:35:16 -03:00
Mauro Carvalho Chehab 8b8e444a27 [media] mb86a20s: Don't reset strength with the other stats
Signal strength is always available. There's no reason to reset
it, as it has its own logic to reset it already.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:34:52 -03:00
Mauro Carvalho Chehab a78b41d5fd [media] mb86a20s: Always reset the frontend with set_frontend
Always init the frontend when set_frontend is called. The rationale
is: it was noticed that, on some devices, it fails to lock with a
different channel. It seems that some other registers need to be
restored to its initial state, when the channel changes.
As it is better to reset everything, even wasting a few more
miliseconds than to loose channel lock, let's change the logic
to always reset.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:34:31 -03:00
Mauro Carvalho Chehab 17e67d4c7f [media] mb86a20s: change AGC tuning parameters
Use the AGC settings present on a newer device.
The initial settings were taken from one of the first devices with
mb86a20s, and there are several reports that this is not working
properly on some places.
So, instead of keeping using it, get the parameters taken from a
newer device. Tests are welcomed.
Tested also with cx231xx PixelView SBTVD Hybrid with no regressions
noticed so far.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:34:05 -03:00
Mauro Carvalho Chehab 0921ecfdc2 [media] mb86a20s: don't allow updating signal strength too fast
Getting signal strength requires some loop poking with I2C.
Don't let it happen too fast.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:33:43 -03:00
Mauro Carvalho Chehab dad78c5662 [media] mb86a20s: Fix signal strength calculus
A register typo made the calculation to not work. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:33:20 -03:00
Mauro Carvalho Chehab 15b1c5a068 [media] mb86a20s: provide CNR stats before FE_HAS_SYNC
State 9 means TS started to be output, and it should be
associated with FE_HAS_SYNC.
The mb86a20scan get CNR statistics at state 7, when frame sync
is obtained.
As CNR may help to adjust the antenna, provide it earlier.
A latter patch could eventually start outputing MER measures
earlier, but that would require a bigger change, and probably
won't be better than the current way, as the time between
changing from state 8 to 9 is generally lower than the time
to get the stats collected.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:32:55 -03:00
Mauro Carvalho Chehab 768e6dadd7 [media] mb86a20s: adjust IF based on what's set on the tuner
Instead of hardcoding a fixed IF frequency of 3.3 MHz, use
the IF frequency provided by the tuner driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:32:33 -03:00
Mauro Carvalho Chehab d56e326f7b [media] mb86a20s: don't pollute dmesg with debug messages
There are a few debug tests that are shown with dev_err() or
dev_info(). Replace them by dev_dbg().

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:32:08 -03:00
Frank Schaefer 510e884c1a [media] em28xx: extract the device configuration dataset from eeproms with 16 bit address width
The new eeproms with 16 address width still have the the device config dataset
(the content of the old 8 bit eeproms) embedded.
Hauppauge also continues to include the tveeprom data structure inside this
dataset in their devices.
The start address of the dataset depends on the start address of the microcode
and a variable additional offset.
It should be mentioned that Camera devices seem to use a different dataset type,
which is not yet supported.
Tested with devices "Hauppauge HVR-930C". I've also checked the USB-log from the
"MSI Digivox ATSC" and it works the same way.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:29:40 -03:00
Frank Schaefer a217968f91 [media] em28xx: do not store eeprom content permanently
We currently reserve an array of 256 bytes for the eeprom content in the device
struct. For eeproms with 16 bit address width it might even be necessary to
increase the buffer size further.
Having such a big chunk of memory reserved even if the device has no eeprom and
keeping it after it has already been processed seems to be a waste of memory.
Change the code to allocate + free the eeprom memory dynamically.
This also makes it possible to handle different dataset sizes depending on what
is stored/found in the eeprom.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:23:27 -03:00
Frank Schaefer d832c5b28a [media] em28xx: add helper function for reading data blocks from i2c clients
Add a helper function for reading data blocks from i2c devices with 8 or 16 bit
address width and 8 bit register width.
This allows us to reduce the size of new code added by the following patches.
Works only for devices with activated register auto incrementation.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:21:34 -03:00
Frank Schaefer 87b52439cf [media] em28xx: add basic support for eeproms with 16 bit address width
Newer devices (em2874, em2884, em28174, em25xx, em27[6,7,8]x) use eeproms with
16 bit instead of 8 bit address width.
The used eeprom type depends on the chip type, which makes sure eeproms can't
be damaged.
This patch adds basic support for 16 bit eeproms only, which includes
- reading the content
- calculating the eeprom hash
- displaying the content
The eeprom content uses a different format, for which support will be added with
subsequent patches.
Tested with the "Hauppauge HVR-930C" and the "Speedlink VAD Laplace webcam"
(with additional experimental patches).

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:20:51 -03:00
Frank Schaefer 0c28dcc054 [media] em28xx: fix eeprom data endianess
The data is stored as little endian in the eeprom.
Hence the correct data types should be used and the data should be converted
to the machine endianess before using it.
The eeprom id (key) also isn't a 32 bit value but 4 separate bytes instead.

[mchehab@redhat.com: Fix CodingStyle]
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 15:53:54 -03:00
Frank Schaefer f55eacbe74 [media] em28xx: do not interpret eeprom content if eeprom key is invalid
If the eeprom key isn't valid, either a different (currently unknown) format
is used or the eeprom is corrupted.
In both cases it doesn't make sense to interpret the data.
Also print an error message.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 15:48:58 -03:00
Frank Schaefer d90f067713 [media] em28xx-i2c: also print debug messages at debug level 1
The current code uses only a single debug level and all debug messages are
printed for i2c_debug >= 2 only. So debug level 1 is actually the same as
level 0, which is odd.
Users expect debugging messages to become enabled for anything else than
debug level 0.
Fix it and simplify the code a bit by printing the debug messages also at debug
level 1;

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 15:48:54 -03:00
Frank Schaefer 12d7ce185a [media] em28xx-i2c: replace printk() with the corresponding em28xx macros
Reduces the number of characters/lines, unifies the code and improves readability.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 15:48:47 -03:00
Frank Schaefer d7a80eaa9a [media] em28xx-i2c: get rid of the dprintk2 macro
There is only a single place where the dprintk2 macro is used, so get rid of it.

[mchehab@redhat.com: fix checkpathc.pl complain:
 ERROR: space prohibited before that close parenthesis ')']
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 15:20:14 -03:00
Frank Schaefer 43a20d7910 [media] em28xx: bump driver version to 0.2.0
The em28xx driver has changed much, especially since kernel 3.8.
So it's time to bump the driver version.
Changes since kernel 3.8:
- converted the driver to videobuf2
- converted the driver to the v4l2-ctrl framework
- added USB bulk transfer support
- use USB bulk transfers by default for webcams (allows streaming from multiple devices at the same time)
- added image quality bridge controls: contrast, brightness, saturation, blue balance, red balance, sharpness
- removed dependency from module ir-kbd-i2c
- cleaned up the frame data processing code
- removed some unused/obsolete code
- made remote controls of devices with external (i2c) receiver/decoder work again
- fixed audio over USB for device "Terratec Cinergy 250"
- several v4l2 compliance fixes and improvements (including fixes for ioctls enabling/disabling)
- lots of further bug fixes and code improvements

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:52:50 -03:00
Frank Schaefer d5b6a74691 [media] em28xx: fix spacing and some comments in em28xx.h
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:52:26 -03:00
Frank Schaefer a062b291af [media] em28xx: remove some obsolete function declarations
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:51:50 -03:00
Frank Schaefer 8f8b113a03 [media] em28xx: add image quality bridge controls
Add the image quality bridge controls contrast, brightness, saturation,
blue balance, red balance and sharpness.
These controls are enabled only if no subdevice provides them.
Tested with the following devices:
"Terratec Cinergy 200 USB"
"Hauppauge HVR-900"
"SilverCrest 1.3MPix webcam"
"Hauppauge WinTV USB2"
"Speedlink VAD Laplace webcam"

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:51:30 -03:00
Frank Schaefer 43a5e08d00 [media] em28xx: introduce #defines for the image quality default settings
The image quality default values will be used in at least two different places
and by using #defines we make sure that they are always consistent.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:50:31 -03:00
Frank Schaefer 7960205066 [media] em28xx: remove unused ac97 v4l2_ctrl_handler
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:49:56 -03:00
Frank Schaefer 511ffe920b [media] em28xx: remove unused image quality control functions
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:48:58 -03:00
Frank Schaefer 6c3598e641 [media] em28xx: VIDIOC_ENUM_FRAMESIZES: consider the scaler limits when calculating the minimum frame size
Output resolutions <=20% of the input resolution exceed the capabilities of the
scaler.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:43:23 -03:00
Frank Schaefer b837413835 [media] em28xx: add function scale_to_size()
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:42:30 -03:00
Frank Schaefer 6b09a21cbc [media] em28xx: rename function get_scale() to size_to_scale()
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:41:23 -03:00
Frank Schaefer 8168532712 [media] em28xx: introduce #define for maximum supported scaling values (register 0x30-0x33)
The maximum supported scaling value for registers 0x30+0x31 (horizontal scaling)
and 0x32+0x33 (vertical scaling) is 0x3fff, which corresponds to 20% of the
input frame size.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:30:18 -03:00
Frank Schaefer 84e902aa05 [media] em28xx: do not claim VBI support if the device is a camera
Avoids registering a VBI device and streaming in VBI-mode if the device is a
camera.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:26:06 -03:00
Frank Schaefer fff459e36f [media] em28xx: make ioctl VIDIOC_DBG_G_CHIP_IDENT available for radio devices
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:25:10 -03:00
Frank Schaefer 35deba32e4 [media] em28xx: make ioctl VIDIOC_DBG_G_CHIP_IDENT available without CONFIG_VIDEO_ADV_DEBUG selected
VIDIOC_DBG_G_CHIP_IDENT is a "normal" and not an "advanced" debug functionality.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:24:46 -03:00
Frank Schaefer eb17cee275 [media] em28xx: remove obsolete device state checks from the ioctl functions
v4l2_device_disconnect() is called when the device is disconnected, so that the
v4l2-core rejects all ioctl calls.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:21:10 -03:00
Frank Schaefer 7a92de6a4c [media] em28xx: VIDIOC_G_TUNER: remove unneeded setting of tuner type
The tuner type is set by the v4l2-core based on the device type.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:16:46 -03:00
Frank Schaefer aab3461876 [media] em28xx: get rid of duplicate function vidioc_s_fmt_vbi_cap()
vidioc_s_fmt_vbi_cap() is a 100% duplicate of vidioc_g_fmt_vbi_cap() and
therefore can be removed.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:16:01 -03:00
Frank Schaefer 430101bd8b [media] em28xx: remove ioctl VIDIOC_CROPCAP
The em28xx driver doesn't support the VIDIOC_G_CROP and VIDIOC_S_CROP ioctls,
so VIDIOC_CROPCAP is useless and has the potential to confuse applications,
because it can be interpreted as indicator for cropping support.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:01:34 -03:00
Frank Schaefer 1fe184a6ac [media] em28xx: make ioctls VIDIOC_G/S_PARM working for VBI devices
With the current code V4L2_BUF_TYPE_VIDEO_CAPTURE is accepted only, but for VBI
devices only buffer type V4L2_BUF_TYPE_VBI_CAPTURE is used/valid.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:00:28 -03:00
Frank Schaefer 83c8bcce06 [media] em28xx: disable ioctl VIDIOC_S_PARM for VBI devices
VIDIOC_S_PARM doesn't make sense for VBI device nodes, because we don't support
selecting the number of read buffers to use.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 13:40:09 -03:00
Frank Schaefer 3bc85cce36 [media] em28xx: use v4l2_disable_ioctl() to disable ioctl VIDIOC_S_PARM
Instead of checking the device type and returning -ENOTTY inside the ioctl
function, use v4l2_disable_ioctl() to disable the ioctl VIDIOC_S_PARM if the
device is not a camera.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 13:39:47 -03:00
Frank Schaefer c2dcef835e [media] em28xx: use v4l2_disable_ioctl() to disable ioctls VIDIOC_G_AUDIO and VIDIOC_S_AUDIO
Instead of checking the device type and returning -EINVAL inside the ioctl
functions, use v4l2_disable_ioctl() to disable the ioctls VIDIOC_G_AUDIO and
VIDIOC_S_AUDIO if the device doesn't support audio.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 13:39:11 -03:00
Frank Schaefer 66df67b764 [media] em28xx: disable tuner related ioctls for video and VBI devices without tuner
Disable the ioctls VIDIOC_G_TUNER, VIDIOC_S_TUNER, VIDIOC_G_FREQUENCY and
VIDIOC_S_FREQUENCY for video and VBI devices without tuner.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 13:36:40 -03:00
Frank Schaefer 6e46daba56 [media] em28xx: use v4l2_disable_ioctl() to disable ioctls VIDIOC_QUERYSTD, VIDIOC_G/S_STD
Instead of checking the device type and returning -ENOTTY inside the ioctl
functions, use v4l2_disable_ioctl() to disable the ioctls VIDIOC_QUERYSTD,
VIDIOC_G_STD and VIDIOC_S_STD if the device is a camera.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 13:36:02 -03:00
Linus Torvalds 7307c00f33 arm-soc: late OMAP changes
This branch contains changes for OMAP that came in late during the release
 staging, close to when the merge window opened.
 
 It contains, among other things:
 
 - OMAP PM fixes and some patches for audio device integration
 - OMAP clock fixes related to common clock conversion
 - A set of patches cleaning up WFI entry and blocking.
 - A set of fixes and IP block support for PM on TI AM33xx SoCs (Beaglebone, etc)
 - A set of smaller fixes and cleanups around AM33xx restart and revision
   detection, as well as removal of some dead code (CONFIG_32K_TIMER_HZ)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRL9AUAAoJEIwa5zzehBx3BiIQAIwJOAZQhbIsDAmqVAGfj39i
 Y6DneECJ3BvrMsC3nk6IUOC/aW5uUi2GAmhYI6YuDDKzLfeTSGW2VQcMa98cvWig
 dLo2CPqKuuB7YZAwHkg4i3BwHVJcaPntaKOajNmhwJQIiNEiXCauP/f9kG2NKvHu
 XxlWuNyeEB1uQlnB0nXL+HHqcHKxproK6eIvILWYJMdVYnMn+57O3yWBmXkCr07b
 9oOa1NdR+4xN7cSbS5YGUfxqwDWnXSZSKggXEPLglHObmSqj7R7NDBNgRR7ui8+t
 c3UYljPsiRprY8TYVTbator9wyYocZ6pMja+vrPwATHUMsxGZTurURzpYsyAXaMc
 VKWLWItCOOee8CKn1+pGpelon69//EJEFIsg1hChJJZKMRLHYVg48tM64/uN1VOo
 Mu/6XDLx4DearMxZv5pZ7Qe0IkIDGtlpyIwo1Yy6T5xEC6pcwRG0XeTuQtOxndFc
 XUcXrE+Nlg3eW/6xtB7XhftnKVoBsCrIQ5Z+PxMw1QNUTXWxQwZffeBLxGenuoD6
 IofLCdjVyRMcPnVj+s29ZO5k7yMllQ0dO8bySxoU2Y2QvD7wUdZxGDY5Nu7cwfAt
 jL0sEpT32g4ZSD8R75qt+qTDWv/IjB4EE/uNw3y2AUSTT5A+cN7H3MXw5s7hm8nI
 fw5cYz37iH0zUZhoIU/w
 =/vBT
 -----END PGP SIGNATURE-----

Merge tag 'late-omap' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC late OMAP changes from Olof Johansson:
 "This branch contains changes for OMAP that came in late during the
  release staging, close to when the merge window opened.

  It contains, among other things:

   - OMAP PM fixes and some patches for audio device integration
   - OMAP clock fixes related to common clock conversion
   - A set of patches cleaning up WFI entry and blocking.
   - A set of fixes and IP block support for PM on TI AM33xx SoCs
     (Beaglebone, etc)
   - A set of smaller fixes and cleanups around AM33xx restart and
     revision detection, as well as removal of some dead code
     (CONFIG_32K_TIMER_HZ)"

* tag 'late-omap' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (34 commits)
  ARM: omap2: include linux/errno.h in hwmod_reset
  ARM: OMAP2+: fix some omap_device_build() calls that aren't compiled by default
  ARM: OMAP4: hwmod data: Enable AESS hwmod device
  ARM: OMAP4: hwmod data: Update AESS data with memory bank area
  ARM: OMAP4+: AESS: enable internal auto-gating during initial setup
  ASoC: TI AESS: add autogating-enable function, callable from architecture code
  ARM: OMAP2+: hwmod: add enable_preprogram hook
  ARM: OMAP4: clock data: Add missing clkdm association for dpll_usb
  ARM: OMAP2+: PM: Fix the dt return condition in pm_late_init()
  ARM: OMAP2: am33xx-hwmod: Fix "register offset NULL check" bug
  ARM: OMAP2+: AM33xx: hwmod: add missing HWMOD_NO_IDLEST flags
  ARM: OMAP: AM33xx hwmod: Add parent-child relationship for PWM subsystem
  ARM: OMAP: AM33xx hwmod: Corrects PWM subsystem HWMOD entries
  ARM: DTS: AM33XX: Add nodes for OCMC RAM and WKUP-M3
  ARM: OMAP2+: AM33XX: Update the hardreset API
  ARM: OMAP2+: AM33XX: hwmod: Update the WKUP-M3 hwmod with reset status bit
  ARM: OMAP2+: AM33XX: hwmod: Fixup cpgmac0 hwmod entry
  ARM: OMAP2+: AM33XX: hwmod: Update TPTC0 hwmod with the right flags
  ARM: OMAP2+: AM33XX: hwmod: Register OCMC RAM hwmod
  ARM: OMAP2+: AM33XX: CM/PRM: Use __ASSEMBLER__ macros in header files
  ...
2013-02-28 20:00:40 -08:00