platform/kernel/linux-rpi.git
11 years ago[media] it913x: use dev_foo() logging
Antti Palosaari [Thu, 28 Feb 2013 23:54:44 +0000 (20:54 -0300)]
[media] it913x: use dev_foo() logging

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] it913x: include tuner IDs from af9033.h
Antti Palosaari [Thu, 28 Feb 2013 23:14:38 +0000 (20:14 -0300)]
[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>
11 years ago[media] it913x: remove unused variables
Antti Palosaari [Thu, 28 Feb 2013 22:02:19 +0000 (19:02 -0300)]
[media] it913x: remove unused variables

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] it913x: get rid of it913x config struct
Antti Palosaari [Thu, 28 Feb 2013 03:14:06 +0000 (00:14 -0300)]
[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>
11 years ago[media] it913x: tuner power up routines
Antti Palosaari [Thu, 28 Feb 2013 02:29:02 +0000 (23:29 -0300)]
[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>
11 years ago[media] it913x: rename functions and variables
Antti Palosaari [Tue, 26 Feb 2013 23:57:01 +0000 (20:57 -0300)]
[media] it913x: rename functions and variables

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] it913x: merge it913x_fe_suspend() to it913x_fe_sleep()
Antti Palosaari [Tue, 26 Feb 2013 23:42:21 +0000 (20:42 -0300)]
[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>
11 years ago[media] it913x: merge it913x_fe_start() to it913x_init_tuner()
Antti Palosaari [Tue, 26 Feb 2013 23:34:06 +0000 (20:34 -0300)]
[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>
11 years ago[media] af9035: IT9135 dual tuner related changes
Antti Palosaari [Sun, 3 Feb 2013 16:46:56 +0000 (13:46 -0300)]
[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>
11 years ago[media] af9033: IT9135 v2 supported related changes
Antti Palosaari [Sun, 3 Feb 2013 16:39:55 +0000 (13:39 -0300)]
[media] af9033: IT9135 v2 supported related changes

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: basic support for IT9135 v2 chips
Antti Palosaari [Sat, 2 Feb 2013 01:23:07 +0000 (22:23 -0300)]
[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>
11 years ago[media] af9035: merge af9035 and it9135 eeprom read routines
Antti Palosaari [Sat, 12 Jan 2013 01:16:25 +0000 (22:16 -0300)]
[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>
11 years ago[media] af9035: USB1.1 support (== PID filters)
Antti Palosaari [Fri, 11 Jan 2013 23:45:11 +0000 (20:45 -0300)]
[media] af9035: USB1.1 support (== PID filters)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: constify clock tables
Antti Palosaari [Fri, 11 Jan 2013 19:34:06 +0000 (16:34 -0300)]
[media] af9035: constify clock tables

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: [0ccd:0099] TerraTec Cinergy T Stick Dual RC (rev. 2)
Antti Palosaari [Fri, 11 Jan 2013 19:22:07 +0000 (16:22 -0300)]
[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>
11 years ago[media] af9015: reject device TerraTec Cinergy T Stick Dual RC (rev. 2)
Antti Palosaari [Mon, 7 Jan 2013 19:29:13 +0000 (16:29 -0300)]
[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>
11 years ago[media] af9035: fix af9033 demod sampling frequency
Antti Palosaari [Mon, 7 Jan 2013 18:26:05 +0000 (15:26 -0300)]
[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>
11 years ago[media] af9035: add auto configuration heuristic for it9135
Antti Palosaari [Mon, 7 Jan 2013 18:16:54 +0000 (15:16 -0300)]
[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>
11 years ago[media] af9035: add support for 1st gen it9135
Antti Palosaari [Mon, 7 Jan 2013 12:51:13 +0000 (09:51 -0300)]
[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>
11 years ago[media] af9033: support for it913x tuners
Antti Palosaari [Mon, 7 Jan 2013 12:48:03 +0000 (09:48 -0300)]
[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>
11 years ago[media] ITE IT913X silicon tuner driver
Antti Palosaari [Mon, 7 Jan 2013 12:37:30 +0000 (09:37 -0300)]
[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>
11 years ago[media] media/rc/imon.c: avoid flooding syslog with "unknown keypress" when keypad...
Kevin Baradon [Mon, 18 Feb 2013 18:10:22 +0000 (15:10 -0300)]
[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>
11 years ago[media] media/rc/imon.c: make send_packet() delay larger for 15c2:0036
Kevin Baradon [Mon, 18 Feb 2013 17:42:47 +0000 (14:42 -0300)]
[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>
11 years ago[media] Corrected Oops on omap_vout when no manager is connected
Federico Fuga [Fri, 24 Aug 2012 14:54:11 +0000 (11:54 -0300)]
[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>
11 years ago[media] xc5000: fix incorrect debug printnk
Dmitri Belimov [Wed, 13 Mar 2013 03:23:36 +0000 (00:23 -0300)]
[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>
11 years ago[media] soc_camera: remove two outdated selects
Paul Bolle [Mon, 11 Mar 2013 21:30:03 +0000 (18:30 -0300)]
[media] soc_camera: remove two outdated selects

Release v2.6.30 removed the MT9M001_PCA9536_SWITCH and
MT9V022_PCA9536_SWITCH Kconfig symbols, in commits
36034dc325ecab63c8cfb992fbf9a1a8e94738a2 ("V4L/DVB (11032): mt9m001:
allow setting of bus width from board code") and
e958e27adeade7fa085dd396a8a0dfaef7e338c1 ("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>
11 years ago[media] sh_vou: Use module_platform_driver_probe macro
Sachin Kamat [Tue, 5 Mar 2013 04:53:37 +0000 (01:53 -0300)]
[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>
11 years ago[media] sh_veu: Use module_platform_driver_probe macro
Sachin Kamat [Tue, 5 Mar 2013 04:53:36 +0000 (01:53 -0300)]
[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>
11 years ago[media] soc_camera/mx1_camera: Use module_platform_driver_probe macro
Sachin Kamat [Tue, 5 Mar 2013 04:53:38 +0000 (01:53 -0300)]
[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>
11 years ago[media] sh_veu.c: Convert to devm_ioremap_resource()
Sachin Kamat [Mon, 4 Mar 2013 08:15:18 +0000 (05:15 -0300)]
[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>
11 years ago[media] soc_camera/pxa_camera: Convert to devm_ioremap_resource()
Sachin Kamat [Mon, 4 Mar 2013 08:15:19 +0000 (05:15 -0300)]
[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>
11 years ago[media] soc_camera/sh_mobile_csi2: Convert to devm_ioremap_resource()
Sachin Kamat [Mon, 4 Mar 2013 08:15:21 +0000 (05:15 -0300)]
[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>
11 years ago[media] soc_camera/sh_mobile_ceu_camera: Convert to devm_ioremap_resource()
Sachin Kamat [Mon, 4 Mar 2013 08:15:20 +0000 (05:15 -0300)]
[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>
11 years ago[media] mt9v022 driver: send valid HORIZONTAL_BLANKING values to mt9v024 soc camera
Andrei Andreyanau [Wed, 6 Feb 2013 14:29:18 +0000 (11:29 -0300)]
[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>
11 years ago[media] mt9m111: fix Oops - initialise context before dereferencing
Guennadi Liakhovetski [Tue, 12 Mar 2013 11:40:37 +0000 (08:40 -0300)]
[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>
11 years ago[media] soc-camera: mt9m111: Fix auto-exposure control
Benoît Thébaudeau [Tue, 26 Feb 2013 18:32:49 +0000 (15:32 -0300)]
[media] soc-camera: mt9m111: Fix auto-exposure control

Commit f9bd5843658e18a7097fc7258c60fb840109eaa8 changed V4L2_CID_EXPOSURE_AUTO
from boolean to enum, and commit af8425c54beb3c32cbb503a379132b3975535289
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>
11 years ago[media] ts2020: use customise option correctly
Paul Bolle [Mon, 11 Mar 2013 14:31:39 +0000 (11:31 -0300)]
[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>
11 years ago[media] media: tvp514x: enable TVP514X for media controller based usage
Manjunath Hadli [Fri, 8 Mar 2013 07:13:35 +0000 (04:13 -0300)]
[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>
11 years ago[media] media: add support for decoder as one of media entity types
Manjunath Hadli [Thu, 7 Feb 2013 16:48:51 +0000 (13:48 -0300)]
[media] media: add support for decoder as one of media entity types

A lot of SOCs including Texas Instruments Davinci family mainly use
video decoders as input devices. This patch adds a flag
'MEDIA_ENT_T_V4L2_SUBDEV_DECODER' media entity type for decoder's.
Along side updates the documentation for this media entity type.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: ths7353: add support for ths7353 video amplifier
Lad, Prabhakar [Mon, 18 Feb 2013 10:56:41 +0000 (07:56 -0300)]
[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>
11 years ago[media] davinci_vpfe: Use module_platform_driver macro
Sachin Kamat [Tue, 5 Mar 2013 10:52:14 +0000 (07:52 -0300)]
[media] davinci_vpfe: Use module_platform_driver macro

module_platform_driver() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Drivers: staging: media: davinci_vpfe: Use resource_size function
Alexandru Gheorghiu [Sun, 10 Mar 2013 11:14:53 +0000 (08:14 -0300)]
[media] Drivers: staging: media: davinci_vpfe: Use resource_size function

Use resource_size function on resource object instead of explicit
computation.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] solo6x10: Update TODO (maintainer change)
Ismael Luceno [Sat, 9 Mar 2013 06:25:07 +0000 (03:25 -0300)]
[media] solo6x10: Update TODO (maintainer change)

Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] vb2-dma-sg: add debug module option
Hans Verkuil [Sat, 2 Mar 2013 08:12:08 +0000 (05:12 -0300)]
[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>
11 years ago[media] videobuf2: add gfp_flags
Hans Verkuil [Fri, 1 Mar 2013 18:44:20 +0000 (15:44 -0300)]
[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>
11 years ago[media] dvb-core: don't clear stats at DTV_CLEAR
Mauro Carvalho Chehab [Wed, 20 Mar 2013 13:39:31 +0000 (10:39 -0300)]
[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>
11 years ago[media] drxk: Fix bogus signal strength indicator
Mauro Carvalho Chehab [Wed, 20 Mar 2013 11:57:42 +0000 (08:57 -0300)]
[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>
11 years ago[media] drxk: use a better calculus for RF strength
Mauro Carvalho Chehab [Wed, 20 Mar 2013 11:21:52 +0000 (08:21 -0300)]
[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>
11 years ago[media] drxk: Add pre/post BER and PER/UCB stats
Mauro Carvalho Chehab [Wed, 20 Mar 2013 09:15:45 +0000 (06:15 -0300)]
[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>
11 years ago[media] drxk: remove dummy BER read code
Mauro Carvalho Chehab [Wed, 20 Mar 2013 09:36:41 +0000 (06:36 -0300)]
[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>
11 years ago[media] siano: make some functions static
Mauro Carvalho Chehab [Thu, 21 Mar 2013 13:01:47 +0000 (10:01 -0300)]
[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>
11 years ago[media] siano: Fix the remaining checkpatch.pl compliants
Mauro Carvalho Chehab [Thu, 21 Mar 2013 12:40:22 +0000 (09:40 -0300)]
[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>
11 years ago[media] siano: remove the remaining CamelCase compliants
Mauro Carvalho Chehab [Thu, 21 Mar 2013 12:27:37 +0000 (09:27 -0300)]
[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>
11 years ago[media] siano: fix checkpatch.pl compliants on smscoreapi.h
Mauro Carvalho Chehab [Thu, 21 Mar 2013 12:10:22 +0000 (09:10 -0300)]
[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>
11 years ago[media] siano: convert structure names to lowercase
Mauro Carvalho Chehab [Thu, 21 Mar 2013 12:06:03 +0000 (09:06 -0300)]
[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>
11 years ago[media] siano: get rid of CammelCase from smscoreapi.h
Mauro Carvalho Chehab [Thu, 21 Mar 2013 11:49:43 +0000 (08:49 -0300)]
[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>
11 years ago[media] siano: add MODULE_FIRMWARE() macros
Mauro Carvalho Chehab [Tue, 19 Mar 2013 20:46:53 +0000 (17:46 -0300)]
[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>
11 years ago[media] siano: use defines for firmware names
Mauro Carvalho Chehab [Tue, 19 Mar 2013 20:02:54 +0000 (17:02 -0300)]
[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>
11 years ago[media] siano: Remove bogus complain about MSG_SMS_DVBT_BDA_DATA
Mauro Carvalho Chehab [Tue, 19 Mar 2013 16:12:29 +0000 (13:12 -0300)]
[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>
11 years ago[media] siano: remove doubled new line
Mauro Carvalho Chehab [Tue, 19 Mar 2013 16:06:28 +0000 (13:06 -0300)]
[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>
11 years ago[media] siano: remove a bogus printk line
Mauro Carvalho Chehab [Tue, 19 Mar 2013 15:59:50 +0000 (12:59 -0300)]
[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>
11 years ago[media] siano: add a MAINTAINERS entry for it
Mauro Carvalho Chehab [Tue, 19 Mar 2013 15:42:45 +0000 (12:42 -0300)]
[media] siano: add a MAINTAINERS entry for it

Nobody is maintaining this driver. The project started by a
developer that used to work at Hauppauge. A Siano developer
assumed its maintainership after that, but he left the company.
Another Siano developer sent several patches updating it, but,
after upstream feedback, it seems he gave up merging the driver,
as he never answered back to the received feedbacks.
As I have a few siano devices here that work with ISDB-T, I
can help to keep it into a good shape. So, better to take its
maintainership.
I don't have any siano SDIO setup here, trough. So, I'll just
apply without any test any patch that looks sane and touches
only drivers/media/mmc/siano. So, let's tag it as "Odd fixes".

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] siano: reorder smscore_get_fw_filename() function
Mauro Carvalho Chehab [Tue, 19 Mar 2013 15:06:08 +0000 (12:06 -0300)]
[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>
11 years ago[media] siano: remove the bogus firmware lookup code
Mauro Carvalho Chehab [Tue, 19 Mar 2013 15:00:23 +0000 (12:00 -0300)]
[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>
11 years ago[media] siano: honour per-card default mode
Mauro Carvalho Chehab [Thu, 7 Mar 2013 14:40:45 +0000 (11:40 -0300)]
[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>
11 years ago[media] siano: simplify firmware lookup logic
Mauro Carvalho Chehab [Tue, 19 Mar 2013 12:50:17 +0000 (09:50 -0300)]
[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>
11 years ago[media] siano: add support for .poll on debugfs
Mauro Carvalho Chehab [Sun, 17 Mar 2013 13:27:44 +0000 (10:27 -0300)]
[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>
11 years ago[media] siano: fix status report with old firmware and ISDB-T
Mauro Carvalho Chehab [Sun, 17 Mar 2013 00:05:30 +0000 (21:05 -0300)]
[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>
11 years ago[media] siano: Only feed DVB data when there's a feed
Mauro Carvalho Chehab [Fri, 15 Mar 2013 10:22:08 +0000 (07:22 -0300)]
[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>
11 years ago[media] siano: Fix bandwidth report
Mauro Carvalho Chehab [Sun, 10 Mar 2013 22:21:13 +0000 (19:21 -0300)]
[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>
11 years ago[media] siano: fix PER/BER report on DVBv5
Mauro Carvalho Chehab [Sun, 10 Mar 2013 16:38:41 +0000 (13:38 -0300)]
[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>
11 years ago[media] siano: fix signal strength and CNR stats measurements
Mauro Carvalho Chehab [Sun, 10 Mar 2013 15:06:30 +0000 (12:06 -0300)]
[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>
11 years ago[media] siano: don't request statistics too fast
Mauro Carvalho Chehab [Sun, 10 Mar 2013 13:51:25 +0000 (10:51 -0300)]
[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>
11 years ago[media] siano: add two missing fields to ISDB-T stats debugfs
Mauro Carvalho Chehab [Sat, 16 Mar 2013 17:32:25 +0000 (14:32 -0300)]
[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>
11 years ago[media] siano: split debugfs code into a separate file
Mauro Carvalho Chehab [Sun, 10 Mar 2013 12:04:44 +0000 (09:04 -0300)]
[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>
11 years ago[media] siano: allow showing the complete statistics via debugfs
Mauro Carvalho Chehab [Sun, 10 Mar 2013 01:33:06 +0000 (22:33 -0300)]
[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>
11 years ago[media] siano: fix start of statistics
Mauro Carvalho Chehab [Sun, 10 Mar 2013 02:01:48 +0000 (23:01 -0300)]
[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>
11 years ago[media] siano: Convert it to report DVBv5 stats
Mauro Carvalho Chehab [Sat, 9 Mar 2013 22:26:28 +0000 (19:26 -0300)]
[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>
11 years ago[media] siano: split debug logic from the status update routine
Mauro Carvalho Chehab [Sat, 9 Mar 2013 18:54:46 +0000 (15:54 -0300)]
[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>
11 years ago[media] siano: split get_frontend into per-std functions
Mauro Carvalho Chehab [Sat, 9 Mar 2013 15:05:58 +0000 (12:05 -0300)]
[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>
11 years ago[media] siano: simplify message endianness logic
Mauro Carvalho Chehab [Sat, 9 Mar 2013 14:34:56 +0000 (11:34 -0300)]
[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>
11 years ago[media] siano: call MSG_SMS_INIT_DEVICE_REQ
Mauro Carvalho Chehab [Sat, 9 Mar 2013 13:24:38 +0000 (10:24 -0300)]
[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>
11 years ago[media] siano: Configure board's mtu and xtal
Mauro Carvalho Chehab [Fri, 8 Mar 2013 23:48:42 +0000 (20:48 -0300)]
[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>
11 years ago[media] siano: add new devices to the Siano Driver
Mauro Carvalho Chehab [Wed, 6 Mar 2013 01:35:44 +0000 (22:35 -0300)]
[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>
11 years ago[media] siano: use the newer stats message for recent firmwares
Mauro Carvalho Chehab [Fri, 8 Mar 2013 00:58:47 +0000 (21:58 -0300)]
[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>
11 years ago[media] siano: add support for LNA on ISDB-T
Mauro Carvalho Chehab [Thu, 7 Mar 2013 19:34:53 +0000 (16:34 -0300)]
[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>
11 years ago[media] siano: add support for ISDB-T full-seg
Mauro Carvalho Chehab [Thu, 7 Mar 2013 19:34:06 +0000 (16:34 -0300)]
[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>
11 years ago[media] siano: use a separate completion for stats
Mauro Carvalho Chehab [Thu, 7 Mar 2013 19:32:33 +0000 (16:32 -0300)]
[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>
11 years ago[media] siano: add some new messages to the smscoreapi
Mauro Carvalho Chehab [Thu, 7 Mar 2013 14:53:46 +0000 (11:53 -0300)]
[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>
11 years ago[media] siano: cleanups at smscoreapi.c
Mauro Carvalho Chehab [Thu, 7 Mar 2013 14:38:57 +0000 (11:38 -0300)]
[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>
11 years ago[media] siano: always load smsdvb
Mauro Carvalho Chehab [Thu, 7 Mar 2013 14:35:00 +0000 (11:35 -0300)]
[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>
11 years ago[media] siano: fix the debug message
Mauro Carvalho Chehab [Thu, 7 Mar 2013 10:32:47 +0000 (07:32 -0300)]
[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>
11 years ago[media] siano: report the choosed firmware in debug
Mauro Carvalho Chehab [Thu, 7 Mar 2013 09:54:14 +0000 (06:54 -0300)]
[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>
11 years ago[media] siano: make load firmware logic to work with newer firmwares
Mauro Carvalho Chehab [Wed, 6 Mar 2013 15:15:08 +0000 (12:15 -0300)]
[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>
11 years ago[media] siano: store firmware version
Mauro Carvalho Chehab [Sat, 9 Mar 2013 12:56:27 +0000 (09:56 -0300)]
[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>
11 years ago[media] siano: use USB endpoint descriptors for in/out endp
Mauro Carvalho Chehab [Wed, 6 Mar 2013 12:53:50 +0000 (09:53 -0300)]
[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>
11 years ago[media] siano: add additional attributes to cards entries
Mauro Carvalho Chehab [Wed, 6 Mar 2013 11:33:44 +0000 (08:33 -0300)]
[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>
11 years ago[media] siano: Properly initialize board information
Mauro Carvalho Chehab [Wed, 6 Mar 2013 11:42:47 +0000 (08:42 -0300)]
[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>
11 years ago[media] siano: add the remaining new defines from new driver
Mauro Carvalho Chehab [Wed, 6 Mar 2013 10:37:47 +0000 (07:37 -0300)]
[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>
11 years ago[media] siano: better debug send/receive messages
Mauro Carvalho Chehab [Sat, 9 Mar 2013 12:27:39 +0000 (09:27 -0300)]
[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>