Mauro Carvalho Chehab [Wed, 30 Jul 2014 14:09:15 +0000 (11:09 -0300)]
[media] xc5000: optimize firmware retry logic
Currently, firmware retry logic keeps reading from FS every
time during the retry logic. This is not needed. Instead,
only release the firmware read after success.
While here, make the non-debug messages less verbose, as it
only matters to the user if the firmware was successfully
loaded, or if some error happened.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Wed, 30 Jul 2014 13:36:32 +0000 (10:36 -0300)]
[media] xc5000: Don't try forever to load the firmware
With the current code, if something bad happens during the
firmware init process, the device will keep trying forever,
and removing it would cause an OOPS.
Instead, try only a limited amount of time. If not, fails.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Fri, 25 Jul 2014 01:49:02 +0000 (22:49 -0300)]
[media] au0828: add support for IR on HVR-950Q
HVR-950Q uses an I2C remote controller at address 0x47 (7-bits
notation). Add support for it.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Wed, 30 Jul 2014 18:49:16 +0000 (15:49 -0300)]
[media] ir-rc5-decoder: print where decoding fails
The IR dprintk message that prints a RC5 decoding failure
is not much helpful, as it doesn't tell on what bit the
error occurred.
Add such information, in order to make the debug message
more useful.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Mon, 28 Jul 2014 17:25:28 +0000 (14:25 -0300)]
[media] rc-main: allow raw protocol drivers to restrict the allowed protos
On some hardware (au0828/au8522), the hardware is broken with
regards to the initial pulse detection. So, the driver needs to
produce a fake start pulse. That limits the acceptable protocols,
as it is not possible to produce a fake pulse that would cover
all supported protocols.
So, allow the driver to explicitly set the allowed protocols.
If the driver doesn't specify, keep the old behavior.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Fri, 25 Jul 2014 17:02:14 +0000 (14:02 -0300)]
[media] au0828: improve I2C speed
Commits
21dc61d3c0a4 and
7a1dd50b89d4 reduced the board I2C
speed to 20 MHz by default, due to a I2C stretch issue:
while xc5000 uses i2c stretch when a command is sent to it,
au0828 doesn't support this feature.
However, this is needed only for Xceive tuners. The other
I2C devices can work at the max speed.
So, revert the workarounds at board level, handling it at
I2C level, only when talking with xc5000.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Mon, 28 Jul 2014 13:34:15 +0000 (10:34 -0300)]
si2135: Declare the structs even if frontend is not enabled
As reported by Kbuildtest:
In file included from drivers/media/usb/cx231xx/cx231xx-dvb.c:35:0:
drivers/media/dvb-frontends/si2165.h:57:9: warning: 'struct si2165_config' declared inside parameter list [enabled by default]
struct i2c_adapter *i2c)
^
drivers/media/dvb-frontends/si2165.h:57:9: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
drivers/media/usb/cx231xx/cx231xx-dvb.c:157:21: error: variable 'hauppauge_930C_HD_1113xx_si2165_config' has initializer but incomplete type
static const struct si2165_config hauppauge_930C_HD_1113xx_si2165_config = {
^
drivers/media/usb/cx231xx/cx231xx-dvb.c:158:2: error: unknown field 'i2c_addr' specified in initializer
.i2c_addr = 0x64,
^
drivers/media/usb/cx231xx/cx231xx-dvb.c:158:2: warning: excess elements in struct initializer [enabled by default]
drivers/media/usb/cx231xx/cx231xx-dvb.c:158:2: warning: (near initialization for 'hauppauge_930C_HD_1113xx_si2165_config') [enabled by default]
drivers/media/usb/cx231xx/cx231xx-dvb.c:159:2: error: unknown field 'chip_mode' specified in initializer
.chip_mode = SI2165_MODE_PLL_XTAL,
^
drivers/media/usb/cx231xx/cx231xx-dvb.c:159:15: error: 'SI2165_MODE_PLL_XTAL' undeclared here (not in a function)
.chip_mode = SI2165_MODE_PLL_XTAL,
^
drivers/media/usb/cx231xx/cx231xx-dvb.c:159:2: warning: excess elements in struct initializer [enabled by default]
.chip_mode = SI2165_MODE_PLL_XTAL,
^
drivers/media/usb/cx231xx/cx231xx-dvb.c:159:2: warning: (near initialization for 'hauppauge_930C_HD_1113xx_si2165_config') [enabled by default]
drivers/media/usb/cx231xx/cx231xx-dvb.c:160:2: error: unknown field 'ref_freq_Hz' specified in initializer
.ref_freq_Hz =
16000000,
^
drivers/media/usb/cx231xx/cx231xx-dvb.c:160:2: warning: excess elements in struct initializer [enabled by default]
drivers/media/usb/cx231xx/cx231xx-dvb.c:160:2: warning: (near initialization for 'hauppauge_930C_HD_1113xx_si2165_config') [enabled by default]
>> drivers/media/usb/cx231xx/cx231xx-dvb.c:163:21: error: variable 'pctv_quatro_stick_1114xx_si2165_config' has initializer but incomplete type
static const struct si2165_config pctv_quatro_stick_1114xx_si2165_config = {
^
drivers/media/usb/cx231xx/cx231xx-dvb.c:164:2: error: unknown field 'i2c_addr' specified in initializer
.i2c_addr = 0x64,
^
drivers/media/usb/cx231xx/cx231xx-dvb.c:164:2: warning: excess elements in struct initializer [enabled by default]
>> drivers/media/usb/cx231xx/cx231xx-dvb.c:164:2: warning: (near initialization for 'pctv_quatro_stick_1114xx_si2165_config') [enabled by default]
drivers/media/usb/cx231xx/cx231xx-dvb.c:165:2: error: unknown field 'chip_mode' specified in initializer
.chip_mode = SI2165_MODE_PLL_EXT,
^
>> drivers/media/usb/cx231xx/cx231xx-dvb.c:165:15: error: 'SI2165_MODE_PLL_EXT' undeclared here (not in a function)
.chip_mode = SI2165_MODE_PLL_EXT,
^
drivers/media/usb/cx231xx/cx231xx-dvb.c:165:2: warning: excess elements in struct initializer [enabled by default]
.chip_mode = SI2165_MODE_PLL_EXT,
^
>> drivers/media/usb/cx231xx/cx231xx-dvb.c:165:2: warning: (near initialization for 'pctv_quatro_stick_1114xx_si2165_config') [enabled by default]
drivers/media/usb/cx231xx/cx231xx-dvb.c:166:2: error: unknown field 'ref_freq_Hz' specified in initializer
.ref_freq_Hz =
24000000,
^
drivers/media/usb/cx231xx/cx231xx-dvb.c:166:2: warning: excess elements in struct initializer [enabled by default]
>> drivers/media/usb/cx231xx/cx231xx-dvb.c:166:2: warning: (near initialization for 'pctv_quatro_stick_1114xx_si2165_config') [enabled by default]
drivers/media/usb/cx231xx/cx231xx-dvb.c: In function 'dvb_init':
drivers/media/usb/cx231xx/cx231xx-dvb.c:731:3: warning: passing argument 1 of 'si2165_attach' from incompatible pointer type [enabled by default]
dev->dvb->frontend = dvb_attach(si2165_attach,
^
In file included from drivers/media/usb/cx231xx/cx231xx-dvb.c:35:0:
drivers/media/dvb-frontends/si2165.h:55:36: note: expected 'const struct si2165_config *' but argument is of type 'const struct si2165_config *'
static inline struct dvb_frontend *si2165_attach(
^
drivers/media/usb/cx231xx/cx231xx-dvb.c:764:3: warning: passing argument 1 of 'si2165_attach' from incompatible pointer type [enabled by default]
dev->dvb->frontend = dvb_attach(si2165_attach,
^
In file included from drivers/media/usb/cx231xx/cx231xx-dvb.c:35:0:
drivers/media/dvb-frontends/si2165.h:55:36: note: expected 'const struct si2165_config *' but argument is of type 'const struct si2165_config *'
static inline struct dvb_frontend *si2165_attach(
^
That happens because the frontend was disabled by .config, but the
si2165_attach void stub require those structs, and also the
drivers that call it.
While here, remove the duplicated info about the possible I2C
addresses.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Fri, 25 Jul 2014 11:19:54 +0000 (08:19 -0300)]
[media] solo6x10: fix potential null dereference
drivers/media/pci/solo6x10/solo6x10-disp.c:221 solo_set_motion_block() error: potential null dereference
'buf'. (kzalloc returns null)
Also propagate this error up the chain.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Sat, 26 Jul 2014 16:02:59 +0000 (13:02 -0300)]
[media] v4l2-ctrls: fix rounding calculation
Commit
958c7c7e65 ("[media] v4l2-ctrls: fix corner case in round-to-range code") broke
controls that use a negative range.
The cause was a s32/u32 mixup: ctrl->step is unsigned while all others are signed. So
the result type of the expression '(ctrl)->maximum - ((ctrl)->step / 2)' became unsigned,
making 'val >= (ctrl)->maximum - ((ctrl)->step / 2)' true, since '((u32)-128) > 128'
(if val = -128, maximum = 128 and step = 1).
So carefully cast (step / 2) to s32.
There was one cast of step to s32 where it should have been u32 because both offset and
step are unsigned, so casting to signed makes no sense there. You do need a cast to u32
there, because otherwise architectures that have no 64-bit division start complaining
(step is a u64).
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sun, 27 Jul 2014 20:28:48 +0000 (17:28 -0300)]
[media] mceusb: select default keytable based on vendor
Some vendors have their on keymap table that are used on
all (or almost all) models for that vendor.
So, instead of specifying the keymap table per USB ID,
let's use the Vendor ID's table by default.
At the end, this will mean less code to be added when newer
devices for those vendors are added.
Of course, if rc_map is specified per board, it takes
precedence.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sun, 27 Jul 2014 20:06:02 +0000 (17:06 -0300)]
[media] mceusb: add support for newer cx231xx devices
Add support for the si2165-based cx231xx devices:
[2013:025e] PCTV QuatroStick 522e
[2013:0259] PCTV QuatroStick 521e
[2040:b131] Hauppauge WinTV 930C-HD (model 1114xx)
They're similar to the already supported:
[2040:b130] Hauppauge WinTV 930C-HD (model 1113xx)
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sun, 27 Jul 2014 19:27:30 +0000 (16:27 -0300)]
[media] cx231xx: handle errors at read_eeprom()
Fix the following warnings:
drivers/media/usb/cx231xx/cx231xx-cards.c: In function 'read_eeprom':
drivers/media/usb/cx231xx/cx231xx-cards.c:979:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Matthias Schwarzott [Tue, 22 Jul 2014 20:12:18 +0000 (17:12 -0300)]
[media] cx231xx: Add support for PCTV QuatroStick 522e
Add support for:
[2013:025e] PCTV QuatroStick 522e
The hardware is identical to Hauppauge WinTV 930C-HD (model 1114xx)
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Matthias Schwarzott [Tue, 22 Jul 2014 20:12:17 +0000 (17:12 -0300)]
[media] cx231xx: Add support for PCTV QuatroStick 521e
Add support for:
[2013:0259] PCTV QuatroStick 521e
The hardware is identical to Hauppauge WinTV 930C-HD (model 1113xx)
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Matthias Schwarzott [Tue, 22 Jul 2014 20:12:16 +0000 (17:12 -0300)]
[media] cx231xx: Add digital support for HVR930C-HD model 1114xx
Add support for:
[2040:b131] Hauppauge WinTV 930C-HD (model 1114xx)
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Tested-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Matthias Schwarzott [Tue, 22 Jul 2014 20:12:15 +0000 (17:12 -0300)]
[media] cx231xx: Add digital support for HVR 930c-HD model 1113xx
Add support for:
[2040:b130] Hauppauge WinTV 930C-HD (model 1113xx)
After loading the driver the first open to dvb device node fails.
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Matthias Schwarzott [Tue, 22 Jul 2014 20:12:14 +0000 (17:12 -0300)]
[media] cx231xx: prepare for i2c_client attachment
This is needed to support PCTV QuatroStick 522e which uses a si2157.
The si2157 driver is written using i2c_client attachment.
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Tested-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Matthias Schwarzott [Tue, 22 Jul 2014 20:12:13 +0000 (17:12 -0300)]
[media] cx23885: Add si2165 support for HVR-5500
The same card entry is used for HVR-4400 and HVR-5500.
Only HVR-5500 has been tested.
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Matthias Schwarzott [Tue, 22 Jul 2014 20:12:12 +0000 (17:12 -0300)]
[media] si2165: Add demod driver for DVB-T only
DVB-T was tested with 8MHz BW channels in germany
This driver is the simplest possible, it uses automatic mode for all
parameters (TPS).
Added spectrum inversion support.
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Tested-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Matthias Schwarzott [Tue, 22 Jul 2014 20:12:11 +0000 (17:12 -0300)]
[media] get_dvb_firmware: Add firmware extractor for si2165
We don't have license to redistribute this firmware, so extract
it from the driver, and add the needed headers.
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Tested-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sun, 27 Jul 2014 19:27:32 +0000 (16:27 -0300)]
[media] cx231xx: return an error if it can't read PCB config
Instead of using some random value, return an error if the
PCB config is not available or doesn't match a know profile
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sun, 27 Jul 2014 19:27:31 +0000 (16:27 -0300)]
[media] cx231xx: move analog init code to a separate function
That makes easier to understand the code. It would also help
to add support for having boards with just digital support
on some latter patch, as allowed by some PCB configs.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sun, 27 Jul 2014 19:27:29 +0000 (16:27 -0300)]
[media] cx231xx: use devm_ functions to allocate memory
The initialization is already too complex. Use devm_ functions
to make the code simpler and easier to modify.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sun, 27 Jul 2014 19:27:28 +0000 (16:27 -0300)]
[media] cx231xx: Don't let an interface number to go past the array
On some newer boards, like HVR-930C HD, the information at
the PCB tables are sometimes higher than the ones actually
available on the device. That causes the probing code to
go past the interfaces array.
Add checks to the interface number before going past the
array.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sun, 27 Jul 2014 19:27:27 +0000 (16:27 -0300)]
[media] cx231xx: Fix the max number of interfaces
The max number of interfaces was read from the wrong descriptor.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Marcel J.E. Mol [Sat, 26 Jul 2014 20:28:26 +0000 (17:28 -0300)]
[media] rc: Add support for decoding XMP protocol
This protocol is found on Dreambox remotes
[m.chehab@samsung.com: CodingStyle fixes and conflict fix]
Signed-off-by: Marcel Mol <marcel@mesa.nl>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Sonic Zhang [Wed, 23 Jul 2014 09:57:16 +0000 (06:57 -0300)]
[media] v4l2: blackfin: select proper pinctrl state in ppi_set_params if CONFIG_PINCTRL is enabled
Multiple pinctrl states are defined for 8, 16 and 24 data pin groups in PPI peripheral.
The driver should select correct group before set up further PPI parameters.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Sonic Zhang [Wed, 23 Jul 2014 09:57:15 +0000 (06:57 -0300)]
[media] v4l2: bfin: Ensure delete and reinit list entry on NOMMU architecture
On NOMMU architecture page fault is not triggered if a deleted list entry is
accessed without reinit.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Sonic Zhang [Wed, 23 Jul 2014 09:57:14 +0000 (06:57 -0300)]
[media] media: blackfin: ppi: Pass device pointer to request peripheral pins
if the pinctrl driver is enabled.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Fri, 25 Jul 2014 18:08:30 +0000 (15:08 -0300)]
[media] em28xx-v4l: fix disabling ioctl VIDIOC_S_PARM for vbi devices
Fixes an old copy+paste bug that has survived all recent code
changes in this code area.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Fri, 25 Jul 2014 17:48:58 +0000 (14:48 -0300)]
[media] em28xx-v4l: get rid of field "users" in struct em28xx_v4l2
Instead of counting the number of opened file handles, use function
v4l2_fh_is_singular_file() in em28xx_v4l2_open() and em28xx_v4l2_close() to
determine if the file handle is the first/last opened one.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Fri, 25 Jul 2014 17:48:57 +0000 (14:48 -0300)]
[media] em28xx-v4l: simplify em28xx_v4l2_open() by using v4l2_fh_open()
Instead of calling
...
struct v4l2_fh *fh = kzalloc(sizeof(*fh), GFP_KERNEL);
filp->private_data = fh;
v4l2_fh_init(fh, vdev);
v4l2_fh_add(fh);
...
simply use function v4l2_fh_open() which does all of these calls for us.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Fri, 25 Jul 2014 17:48:56 +0000 (14:48 -0300)]
[media] em28xx-v4l: get rid of struct em28xx_fh
struct em28xx_fh isn't needed anymore because the only used field which is left is struct v4l2_fh fh.
Use struct v4l2_fh directly and remvove struct em28xx_fh.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Fri, 25 Jul 2014 17:48:55 +0000 (14:48 -0300)]
[media] em28xx-v4l: simplify some pointers in em28xx_init_camera()
Pointer v4l2" can be used instead of "dev->v4l2, which saves some characters.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Zheng Di [Sun, 6 Jul 2014 13:37:06 +0000 (10:37 -0300)]
[media] staging: media: lirc_parallel.c: fix coding style
This patch fix checkpatch:
WARNING: else is not generally useful after a break or return
WARNING: line over 80 characters
[m.chehab@samsung.com: Fix conflicts and use a better coding style for
passing the parameters to parport_register_device()]
Signed-off-by: Zheng Di <zhengdi05@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Raimonds Cicans [Tue, 8 Jul 2014 10:38:20 +0000 (07:38 -0300)]
[media] Fix typo in comments
Expression ((7bit i2c_addr << 1) & 0x01) can not be right
because it is always 0
Signed-off-by: Raimonds Cicans <ray@apollo.lv>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Rasmus Villemoes [Wed, 2 Jul 2014 13:49:46 +0000 (10:49 -0300)]
[media] staging: omap4iss: Fix type of struct iss_device::crashed
The crashed member of struct iss_device is documented to be a bitmask,
but a bool doesn't hold that many (usable) bits. Lines 589 and 659 of
iss.c strongly suggest that "unsigned int" was meant (the same type as
struct iss_pipeline::entities). Currently, any crashed entity will be
blamed on index 0, which is unlikely to be what was intended.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Himangi Saraogi [Thu, 3 Jul 2014 19:38:40 +0000 (16:38 -0300)]
[media] staging: lirc: Introduce the use of managed interfaces
This patch introduces the use of managed interfaces like
devm_request_mem_region and devm_request_irq and does away with the
calls to free the allocated memory in the probe and remove functions.
The remove function is no longer required and is removed completely.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Raphael Poggi [Tue, 1 Jul 2014 07:12:34 +0000 (04:12 -0300)]
[media] staging: lirc: remove return void function
This patch fix checkpath "WARNING: void function return statements are not generally useful".
The removed return were useless in that case.
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Raphael Poggi [Tue, 1 Jul 2014 07:12:33 +0000 (04:12 -0300)]
[media] staging: lirc: fix checkpath errors: blank lines
This patch fix checkpath "WARNING: Missing a blank line after declarations"
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Christopher Reimer [Mon, 30 Jun 2014 13:44:00 +0000 (10:44 -0300)]
[media] ddbridge: Add IDs for several newer Digital Devices cards
This patch adds the necessary IDs for the following dvb cards:
Digital Devices Octopus Mini
Digital Devices Cine S2 V6.5
Digital Devices DVBCT V6.1
Digital Devices Octopus V3
Mystique SaTiX-S2 V3
All these changes are taken from the official driver package by Digital
Devices.
http://download.digital-devices.de/download/linux/
[m.chehab@samsung.com: Fixed whitespace mangling]
Signed-off-by: Christopher Reimer <mail@creimer.net>
Tested-by: "D. Herrendoerfer" <d.herrendoerfer@herrendoerfer.name>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Fabian Frederick [Sat, 28 Jun 2014 10:57:39 +0000 (07:57 -0300)]
[media] drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c: remove unnecessary null test before usb_free_urb
Fix checkpatch warning:
WARNING: usb_free_urb(NULL) is safe this check is probably not required
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Heinrich Schuchardt [Wed, 18 Jun 2014 21:28:10 +0000 (18:28 -0300)]
[media] media: saa7134: remove if based on uninitialized variable
Variable b is not initialized.
Only with a small chance it has random value 0xFF.
Remove if statement based on this value.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Heinrich Schuchardt [Wed, 18 Jun 2014 22:31:27 +0000 (19:31 -0300)]
[media] v4l: omap4iss: configuration using uninitialized variable
Variable reg is not initialized.
Random values are written to OMAP4 ISS registers if !ctx->eof_enabled.
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Thu, 12 Jun 2014 23:12:24 +0000 (20:12 -0300)]
[media] af9035: override tuner for AVerMedia A835B devices
Tuner ID set into EEPROM is wrong, which causes driver to select
wrong tuner profile. That leads device non-working. Fix issue by
overriding known bad tuner IDs with suitable default value.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sat, 26 Jul 2014 14:57:09 +0000 (11:57 -0300)]
[media] remove some new warnings on drxj
changeset
b601fe5688ae did some cleanup, but didn't remove some
now unused vars:
drivers/media/dvb-frontends/drx39xyj/drxj.c: In function 'drx39xxj_set_frontend':
drivers/media/dvb-frontends/drx39xyj/drxj.c:12072:21: warning: unused variable 'uio_data' [-Wunused-variable]
drivers/media/dvb-frontends/drx39xyj/drxj.c: In function 'drx39xxj_set_lna':
drivers/media/dvb-frontends/drx39xyj/drxj.c:12230:21: warning: unused variable 'uio_data' [-Wunused-variable]
drivers/media/dvb-frontends/drx39xyj/drxj.c:12229:20: warning: unused variable 'uio_cfg' [-Wunused-variable]
drivers/media/dvb-frontends/drx39xyj/drxj.c:12224:6: warning: unused variable 'result' [-Wunused-variable]
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sat, 26 Jul 2014 14:53:44 +0000 (11:53 -0300)]
[media] cx23885-dvb: remove previously overriden value
drivers/media/pci/cx23885/cx23885-dvb.c:768:2: warning: initialized field overwritten [-Woverride-init]
.freq_offset_khz_vhf = 550,
^
drivers/media/pci/cx23885/cx23885-dvb.c:768:2: warning: (near initialization for 'dib7070p_dib0070_config.freq_offset_khz_vhf') [-Woverride-init]
Cc: James Harper <james.harper@ejbdigital.com.au>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sat, 26 Jul 2014 14:52:25 +0000 (11:52 -0300)]
[media] update cx23885 and em28xx cardlists
A few new devices were added. Update the lists accordingly.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sat, 26 Jul 2014 14:49:44 +0000 (11:49 -0300)]
[media] cx23885 now needs to select dib0070
Due to DViCO FusionHDTV DVB-T Dual Express2, we also need to
autoselect this tuner.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
James Harper [Thu, 12 Jun 2014 10:12:24 +0000 (07:12 -0300)]
[media] Add support for DViCO FusionHDTV DVB-T Dual Express2
DViCO FusionHDTV DVB-T Dual Express2 is cx23885 + dib7070
[m.chehab@samsung.com: fix conflicts and make checkpatch happy]
Signed-off-by: James Harper <james.harper@ejbdigital.com.au>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
James Harper [Thu, 12 Jun 2014 09:53:38 +0000 (06:53 -0300)]
[media] vmalloc_sg: make sure all pages in vmalloc area are really DMA-ready
Patch originally written by Konrad. Rebased on current linux media tree.
Under Xen, vmalloc_32() isn't guaranteed to return pages which are really
under 4G in machine physical addresses (only in virtual pseudo-physical
addresses). To work around this, implement a vmalloc variant which
allocates each page with dma_alloc_coherent() to guarantee that each
page is suitable for the device in question.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: James Harper <james.harper@ejbdigital.com.au>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Shuah Khan [Thu, 24 Jul 2014 20:29:28 +0000 (17:29 -0300)]
[media] media: drx39xyj - use drxj_set_lna_state() and remove duplicate LNA code
drx39xxj_set_lna() and drx39xxj_set_frontend() set LNA. Instead of
duplicating LNA configure code, change to use drxj_set_lna_state()
which sets LNA to the caller requested state (on or off).
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Shuah Khan [Wed, 23 Jul 2014 15:11:03 +0000 (12:11 -0300)]
[media] media: drx39xyj - fix to return actual error codes instead of -EIO
Several functions ignore the return values in error legs and always
return -EIO. This makes it hard to debug and take proper action in
calling routines.
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Shuah Khan [Thu, 24 Jul 2014 16:02:15 +0000 (13:02 -0300)]
[media] media: drx39xyj - add resume support
drx39xyj driver lacks resume support. Add support by changing
its fe ops init interface to detect the resume status by checking
fe exit flag and do the necessary initialization. With this change,
driver resume correctly in both dvb adapter is not in use and in use
by an application cases.
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Shuah Khan [Thu, 24 Jul 2014 16:02:14 +0000 (13:02 -0300)]
[media] media: dvb-core add new flag exit flag value for resume
Some fe drivers will have to do additional initialization
in their fe ops.init interfaces when called during resume.
Without the additional initialization, fe and tuner driver
resume fails. A new fe exit flag value DVB_FE_DEVICE_RESUME
is necessary to detect resume case. This patch adds a new
define and changes dvb_frontend_resume() to set it prior to
calling fe init and tuner init calls and resets it back to
DVB_FE_NO_EXIT once fe and tuner init is done.
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Shuah Khan [Sat, 12 Jul 2014 16:44:14 +0000 (13:44 -0300)]
[media] media: drx39xyj driver change to check fe exit flag from release
Change drx39xyj_release() to check fe exit flag to detect the
device disconnect state and avoid accessing the device after
it has been removed.
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Shuah Khan [Sat, 12 Jul 2014 16:44:13 +0000 (13:44 -0300)]
[media] media: em28xx-dvb update fe exit flag to indicate device disconnect
Change em28xx_dvb_fini() to set fe exit flag to DVB_FE_DEVICE_REMOVED
when device is disconnected. em28xx maintains device disconnect status
in em28xx device. fe drivers will be able to now check the fe exit
status to avoid accessing the device, from their release interfaces
when called from disconnect path. This change depends on dvb-core
change that exports fe exit flag by moving it from fepriv to fe.
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Shuah Khan [Sat, 12 Jul 2014 16:44:12 +0000 (13:44 -0300)]
[media] media: dvb-core move fe exit flag from fepriv to fe for driver access
Some fe drivers attempt to access the device for power control from
their release routines. When release routines are called after device
is disconnected, the attempts fail. fe drivers should avoid accessing
the device, from their release interfaces when called from disconnect
path. dvb-frontend maintains exit flag to keep track when fe device is
disconnected in its private data structures. Export the flag in fe to
enable drivers to check the device status from their release interfaces.
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Shuah Khan [Fri, 11 Jul 2014 21:25:55 +0000 (18:25 -0300)]
[media] media: em28xx - fix i2c_xfer to return -ENODEV when dev is removed
In em28xx usb disconnect code path, some dvb fe and tuner drivers
attempt i2c transfers from their release interfaces. When device
is removed, return -ENODEV instead of attempting to transfer data
over i2c.
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Shuah Khan [Wed, 9 Jul 2014 20:36:03 +0000 (17:36 -0300)]
[media] media: em28xx - remove reset_resume interface
em28xx uses resume interface as its reset_resume interface.
If usb device is reset during suspend, reset_resume doesn't
do the necessary initialization which leads to resume failure.
Many systems don't maintain do not maintain suspend current to
the USB host controllers during hibernation. Remove reset_resume
to allow disconnect to be called followed by device restore
sequence.
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Shuah Khan [Wed, 9 Jul 2014 20:36:23 +0000 (17:36 -0300)]
[media] media: em28xx - add error handling for KWORLD dvb_attach failures
Add error hanlding when EM2870_BOARD_KWORLD_A340 dvb_attach()
for fe and tuner fail in em28xx_dvb_init().
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Shuah Khan [Wed, 9 Jul 2014 13:21:27 +0000 (10:21 -0300)]
[media] media: em28xx-dvb - fix em28xx_dvb_resume() to not unregister i2c and dvb
em28xx_dvb_resume() unregisters i2c tuner, i2c demod, and dvb.
This erroneous cleanup results in i2c tuner, i2c demod, and dvb
devices unregistered and removed during resume. This error is a
result of merge conflict between two patches that went into 3.15.
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Sebastian [Thu, 12 Jun 2014 06:22:45 +0000 (03:22 -0300)]
[media] rtl28xxu: add [1b80:d3b0] Sveon STV21
Added Sveon STV21 device based on Realtek RTL2832U and FC0013 tuner
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
James Harper [Mon, 9 Jun 2014 00:24:20 +0000 (21:24 -0300)]
[media] Fix regression in some dib0700 based devices
Fix regression in some dib0700 based devices.
Set size_of_priv, and don't call dvb_detach unnecessarily.
This resolves the oops(s) for my "Leadtek Winfast DTV Dongle (STK7700P based)"
Signed-off-by: James Harper <james.harper@ejbdigital.com.au>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Arnd Bergmann [Thu, 5 Jun 2014 20:48:11 +0000 (17:48 -0300)]
[media] staging: lirc: remove sa1100 support
The LIRC support for sa1100 appears to have never worked
because it relies on header files that have never been
present in git history. Actually trying to build the
driver on an ARM sa1100 kernel fails, so let's just remove
the broken support.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jarod Wilson <jarod@wilsonet.com>
Cc: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Fabio Estevam [Wed, 4 Jun 2014 18:46:24 +0000 (15:46 -0300)]
[media] coda: Propagate the correct error on devm_request_threaded_irq()
If devm_request_threaded_irq() fails, we should better propagate the real error.
Also, print out the error code in the dev_err message.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Fabio Estevam [Wed, 4 Jun 2014 18:46:23 +0000 (15:46 -0300)]
[media] coda: Return the real error on platform_get_irq()
No need to return a 'fake' return value on platform_get_irq() failure.
Propagate the real error instead.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
George Spelvin [Sun, 11 May 2014 11:19:01 +0000 (08:19 -0300)]
[media] ati_remote: Better default keycodes
This tries to make them more like other remotes, and/or
the button labels.
Notably, the (>>) button is made KEY_FASTFORWARD, which is the
correct opposite of (<<)'s KEY_REVERSE. (It was KEY_FORWARD,
something else entirely.)
Likewise, KEY_STOP is the Sun keyboard "interrupt program" key;
the media key is KEY_STOPCD.
A restriction is that I try to avoid keycodes above 255, as the X11
client/server protocol is limited to 8-bit key codes. If not for
this, I would have used the KEY_NUMERIC_x codes for the numbers.
Signed-off-by: George Spelvin <linux@horizon.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
George Spelvin [Sun, 11 May 2014 11:17:37 +0000 (08:17 -0300)]
[media] ati_remote: Add comments to keycode table
A more detailed description of what the buttons look like and
their intended function makes it easier for people to maintain
this code without access to the hardware.
[m.chehab@samsung.com: Fixed a typo "Mdeia" instead of "Media"]
Signed-off-by: George Spelvin <linux@horizon.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
George Spelvin [Sun, 11 May 2014 11:16:56 +0000 (08:16 -0300)]
[media] ati_remote: Sort buttons in top-to-bottom order
Since numerical order corresponds to top-left-to-bottom-right
order on the remote, this makes the table easier to read.
Signed-off-by: George Spelvin <linux@horizon.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
George Spelvin [Sun, 11 May 2014 11:16:15 +0000 (08:16 -0300)]
[media] ati_remote: Use non-alomic __set_bit
There's no reason to use a LOCK prefix here.
Signed-off-by: George Spelvin <linux@horizon.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
George Spelvin [Sun, 11 May 2014 11:15:44 +0000 (08:15 -0300)]
[media] ati_remote: Merge some duplicate code
The KIND_FILTERED assignment of old_jiffies can't be merged, because
it must precede repeat handling.
Signed-off-by: George Spelvin <linux@horizon.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
George Spelvin [Sun, 11 May 2014 11:14:54 +0000 (08:14 -0300)]
[media] ati_remote: Shrink the ati_remote_tbl even more
Get rid of the unnecessary "type" and "value" fields.
Signed-off-by: George Spelvin <linux@horizon.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
George Spelvin [Sun, 11 May 2014 11:14:18 +0000 (08:14 -0300)]
[media] ati_remote: Generalize KIND_ACCEL to accept diagonals
Rather than having special code cases for diagonal mouse
movements, extend the general purpose code used for the
cardinal directions to handle arbitrary (x,y) deltas.
The deltas themselves are stored in translation table's "code"
field; this is also progress toward the goal of eliminating
the "value" element entirely.
Signed-off-by: George Spelvin <linux@horizon.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
George Spelvin [Sun, 11 May 2014 11:13:30 +0000 (08:13 -0300)]
[media] ati_remote: Delete superfluous input_sync()
It's not necessary, and since both events happen "at the same time"
in response to a single input event, the input device framework prefers
not to have it there.
(It's not a big deal one way or the other, but deleting cruft
is generally a good thing.)
Signed-off-by: George Spelvin <linux@horizon.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
George Spelvin [Sun, 11 May 2014 11:12:55 +0000 (08:12 -0300)]
[media] ati_remote: Shrink ati_remote_tbl structure
The variable types are simply larger than they need to be.
Shrink to signed and unsigned chars.
Signed-off-by: George Spelvin <linux@horizon.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
George Spelvin [Sun, 11 May 2014 11:12:09 +0000 (08:12 -0300)]
[media] ati_remote: Check the checksum
An input report is 4 bytes long, but there are only 12 bits
of actual payload. The 4 bytes are:
data[0] = 0x14
data[1] = data[2] + data[3] + 0xd5 (a checksum byte)
data[2] = the raw scancode (plus toggle bit in msbit)
data[3] = channel << 4 (the low 4 bits must be zero)
Ignore reports with a bad checksum.
Signed-off-by: George Spelvin <linux@horizon.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Sat, 26 Jul 2014 02:25:36 +0000 (23:25 -0300)]
[media] rc-core: don't use dynamic_pr_debug for IR_dprintk()
The hole point of IR_dprintk() is that, once a level is
given at debug parameter, all enabled IR parsers will show their
debug messages.
While converting it to dynamic_printk might be a good idea,
right now it just makes very hard to debug the drivers, as
one needs to both pass debug=1 or debug=2 to rc-core and
to use the dynamic printk to enable all the desired lines.
That doesn't make sense!
So, revert to the old way, as a single line is changed,
and the debug parameter will now work as expected.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
David Härdeman [Thu, 3 Apr 2014 23:34:53 +0000 (20:34 -0300)]
[media] rc-core: fix various sparse warnings
Fix various sparse warnings under drivers/media/rc/*.c, mostly
by making functions static.
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
David Härdeman [Thu, 3 Apr 2014 23:34:28 +0000 (20:34 -0300)]
[media] rc-core: rename ir-raw.c
Better to be coherent and prefix this file with rc-, in order to
help to identify to what subsystem it belongs.
This is in preparaton for a latter patch that will transform the
raw handling into a separate module.
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Fri, 25 Jul 2014 22:33:40 +0000 (19:33 -0300)]
[media] radio-miropcm20: fix a compilation warning
drivers/media/radio/radio-miropcm20.c: In function 'sanitize':
drivers/media/radio/radio-miropcm20.c:216:3: warning: comparison is always false due to limited range of data type [-Wtype-limits]
if (p[i] < 32 || p[i] >= 128) {
^
As p is declared as a char array, it is signed. So, it can never
be bigger than 127.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Fri, 25 Jul 2014 09:31:32 +0000 (06:31 -0300)]
[media] Kconfig: rtl2832_sdr must depend on USB
Fixes error:
[next:master 7435/8702] ERROR: "usb_alloc_urb
[drivers/media/dvb-frontends/rtl2832_sdr.ko] undefined!
rtl2832_sdr driver implements own USB streaming for SDR data.
Logically that functionality belongs to USB interface driver, but
currently it is implemented here.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Antti Palosaari [Fri, 25 Jul 2014 09:17:59 +0000 (06:17 -0300)]
[media] Kconfig: fix tuners build warnings
[next:master 7472/8702] warning: (USB_MSI2500) selects
MEDIA_TUNER_MSI001 which has unmet direct dependencies
((MEDIA_ANALOG_TV_SUPPORT || ..) && ..)
[next:master 7698/8702] warning: (MEDIA_TUNER && ..) selects
MEDIA_TUNER_XC5000 which has unmet direct dependencies
((MEDIA_ANALOG_TV_SUPPORT || ..) && ..)
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 21 Jul 2014 13:45:43 +0000 (10:45 -0300)]
[media] radio-miropcm20: add RDS support
Once upon a time the radio-miropcm20 driver had RDS support. However, after
some internal kernel changes that support was removed. Now that we have a
nice RDS API I have been working on adding back this support. It has been
tested with the si4713 RDS transmitter and it is working quite nicely.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 21 Jul 2014 13:45:41 +0000 (10:45 -0300)]
[media] DocBook/media: document the new RDS RX controls
Document the new RDS receiver controls. This will be used by the radio-miropcm20
driver.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 21 Jul 2014 13:45:40 +0000 (10:45 -0300)]
[media] v4l2-ctrls: add RX RDS controls
The radio-miropcm20 driver has firmware that decodes the RDS signals. So in that
case the RDS data becomes available in the form of controls.
Add support for these controls to the control framework, allowing the miro driver
to use them.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 21 Jul 2014 13:45:39 +0000 (10:45 -0300)]
[media] si4713: add the missing RDS functionality
Not all the RDS features of the si4713 were supported. Add
the missing bits to fully support the hardware capabilities.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 21 Jul 2014 13:45:38 +0000 (10:45 -0300)]
[media] DocBook/media: document the new RDS TX controls
Document the new RDS features that will be supported by the si4713 driver.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 21 Jul 2014 13:45:37 +0000 (10:45 -0300)]
[media] v4l2-ctrls: add new RDS TX controls
The si4713 supports several RDS features not yet implemented in the driver.
This patch adds the missing RDS functionality to the list of RDS controls.
The ALT_FREQS control is a compound control containing an array of up
to 25 (the maximum according to the RDS standard) frequencies. To support
that the V4L2_CTRL_TYPE_U32 was added.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Thu, 24 Jul 2014 12:19:37 +0000 (09:19 -0300)]
[media] vb2: fix vb2_poll for output streams
vb2_poll should always return POLLOUT | POLLWRNORM as long as there
are fewer buffers queued than there are buffers available. Poll for
an output stream should only wait if all buffers are queued and nobody
is dequeuing them.
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Wed, 23 Jul 2014 06:17:06 +0000 (03:17 -0300)]
[media] vb2: fix videobuf2-core.h comments
A lot of work was done in vb2 to regulate how drivers and the vb2 core handle
buffer ownership, but inexplicably the videobuf2-core.h comments were never
updated. Do so now. The same was true for the replacement of the -ENOBUFS
mechanism by the min_buffers_needed field.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 21 Jul 2014 13:45:42 +0000 (10:45 -0300)]
[media] v4l2-ctrls: add support for setting string controls
Rather than always having to use a v4l2_ext_control struct to set
a control value from within a driver, switch to just setting the
new value. This is faster and it makes it possible to set more
complex types such as a string control as is added by this
patch.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 21 Jul 2014 13:16:47 +0000 (10:16 -0300)]
[media] Docbook/media: improve data_offset/bytesused documentation
This patch explicitly documents the relationship between bytesused and data_offset.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
David Härdeman [Thu, 3 Apr 2014 23:32:31 +0000 (20:32 -0300)]
[media] rc-core: merge rc5 and streamzap decoders
Now that the protocol is part of the scancode, it is pretty easy to merge
the rc5 and streamzap decoders. An additional advantage is that the decoder
is now stricter as it waits for the trailing silence before determining that
a command is a valid rc5/streamzap command (which avoids collisions that I've
seen with e.g. Sony protocols).
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
David Härdeman [Thu, 3 Apr 2014 23:32:26 +0000 (20:32 -0300)]
[media] rc-core: rename dev->scanmask to dev->scancode_mask
We already have dev->scancode_filter and dev->scancode_wakeup_filter
so rename dev->scanmask to dev->scancode_mask for consistency.
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
David Härdeman [Thu, 3 Apr 2014 23:32:21 +0000 (20:32 -0300)]
[media] rc-core: remove protocol arrays
The basic API of rc-core used to be:
dev = rc_allocate_device();
dev->x = a;
dev->y = b;
dev->z = c;
rc_register_device();
which is a pretty common pattern in the kernel, after the introduction of
protocol arrays the API looks something like:
dev = rc_allocate_device();
dev->x = a;
rc_set_allowed_protocols(dev, RC_BIT_X);
dev->z = c;
rc_register_device();
There's no real need for the protocols to be an array, so change it
back to be consistent (and in preparation for the following patches).
[m.chehab@samsung.com: added missing changes at some files]
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
David Härdeman [Thu, 3 Apr 2014 23:32:16 +0000 (20:32 -0300)]
[media] rc-core: simplify sysfs code
Simplify and cleanup the sysfs code a bit.
[m.chehab@samsung.com: rebased and fixed a CodingStyle issue]
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
David Härdeman [Thu, 3 Apr 2014 23:32:01 +0000 (20:32 -0300)]
[media] saa7134: NEC scancode fix
This driver codes the two address bytes in reverse order when compared to the
other drivers, so make it consistent (and update the keymap, note that the
result is a prefix change from 0x6b86 -> 0x866b, and the latter is pretty
common among the NECX keymaps. While not conclusive, it's still a strong hint
that the change is correct).
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
David Härdeman [Thu, 3 Apr 2014 23:31:30 +0000 (20:31 -0300)]
[media] rc-core: document the protocol type
Right now the protocol information is not preserved, rc-core gets handed a
scancode but has no idea which protocol it corresponds to.
This patch (which required reading through the source/keymap for all drivers,
not fun) makes the protocol information explicit which is important
documentation and makes it easier to e.g. support multiple protocols with one
decoder (think rc5 and rc-streamzap). The information isn't used yet so there
should be no functional changes.
[m.chehab@samsung.com: rebased, added cxusb and removed bad whitespacing]
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
David Härdeman [Thu, 3 Apr 2014 23:31:51 +0000 (20:31 -0300)]
[media] dib0700: NEC scancode cleanup
the RC RX packet is defined as:
struct dib0700_rc_response {
...
u8 not_system;
u8 system;
...
u8 data;
u8 not_data;
The NEC protocol transmits in the order:
system
not_system
data
not_data
Note that the code defines the NEC extended scancode as:
scancode = be16_to_cpu(poll_reply->system16) << 8 | poll_reply->data;
i.e.
scancode = poll_reply->not_system << 16 |
poll_reply->system << 8 |
poll_reply->data;
Which, if the order *is* reversed, would mean that the scancode that
gets defined is in reality:
scancode = poll_reply->system << 16 |
poll_reply->not_system << 8 |
poll_reply->data;
Which is the same as the order used in drivers/media/rc/ir-nec-decoder.c.
This patch changes the code to match my assumption (the generated scancode
should, however, not change).
[m.chehab@samsung.com: rebased and fixed the decoding error message]
Signed-off-by: David Härdeman <david@hardeman.nu>
CC: Patrick Boettcher <pboettcher@kernellabs.com>
Tested-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>