OSDN Git Service
Antti Palosaari [Mon, 20 Apr 2015 17:48:33 +0000 (14:48 -0300)]
[media] cx23885: Hauppauge WinTV Starburst bind I2C demod and SEC
Bind tda10071 demod and a8293 SEC using I2C binding.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Thu, 16 Apr 2015 16:59:46 +0000 (13:59 -0300)]
[media] cx23885: add support for DVB I2C SEC client
Add support for I2C SEC (satellite equipment controller) client.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Thu, 16 Apr 2015 16:43:30 +0000 (13:43 -0300)]
[media] em28xx: bind PCTV 460e using I2C client
Load PCTV 460e tda10071 demod and a8293 SEC using I2C client bindings.
Remove old unused tda10071 config struct. We are using I2C platform
data now.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Thu, 16 Apr 2015 16:33:07 +0000 (13:33 -0300)]
[media] em28xx: add support for DVB SEC I2C client
Add support for DVB SEC (satellite equipment controller) I2C client.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Thu, 16 Apr 2015 16:28:39 +0000 (13:28 -0300)]
[media] a8293: implement I2C client bindings
Implement I2C client bindings.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Thu, 16 Apr 2015 14:46:24 +0000 (11:46 -0300)]
[media] tda10071: implement I2C client bindings
Implement I2C client bindings.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 5 Jun 2015 16:09:31 +0000 (13:09 -0300)]
[media] vivid: move PRINTSTR to separate functions
Commit
84cb7be43cec12868e94163c99fdc34c0297c3b8 broke vivid-tpg
(uninitialized variable p).
This patch takes a different approach: four different functions are
created, one for each PRINTSTR version.
In order to avoid the 'the frame size of 1308 bytes is larger than 1024
bytes' warning I had to mark those functions with 'noinline'. For
whatever reason gcc seems to inline this aggressively and it is doing
weird things with the stack.
I tried to read the assembly code, but I couldn't see what exactly it
was doing on the stack.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sun, 31 May 2015 11:10:32 +0000 (08:10 -0300)]
[media] vivid.txt: update the vivid documentation
Document the new Transfer Function control (and fix the documentation for
the other colorspace controls which were not quite correct).
Mention the support for 4:2:0 and more multiplanar formats.
Update the TODO list at the end.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sun, 31 May 2015 10:51:51 +0000 (07:51 -0300)]
[media] cobalt: simplify colorspace code
Simplify cobalt_g/try_fmt_vid_cap by not setting the colorspace fields in
pix again (since v4l2_fill_pix_format does that already), and by using
v4l2_fill_mbus_format in cobalt_s_fmt_vid_out which allows the get_fmt
call to be dropped as well.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sun, 31 May 2015 09:48:00 +0000 (06:48 -0300)]
[media] cobalt: support transfer function
Add support for the transfer function to the cobalt driver: make sure it is
passed on to/retrieved from the sub-device correctly.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Tue, 28 Apr 2015 13:08:43 +0000 (10:08 -0300)]
[media] vivid-tpg: precalculate colorspace/xfer_func combinations
Precalculate all the colorspace/transfer function combinations in order
to easily generate the correct colors.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Tue, 28 Apr 2015 12:41:37 +0000 (09:41 -0300)]
[media] vivid: add xfer_func support
Add support for the transfer function: create a new control for it,
and support it for both capture and output sides.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Tue, 28 Apr 2015 12:41:03 +0000 (09:41 -0300)]
[media] am437x-vpfe: add support for xfer_func
Make this part of the format check.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Tue, 28 Apr 2015 12:40:30 +0000 (09:40 -0300)]
[media] adv7511: add xfer_func support
Still preliminary, but the information is at least there.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Tue, 28 Apr 2015 11:43:50 +0000 (08:43 -0300)]
[media] DocBook/media: document new xfer_func fields
Document the new field and defines to set the transfer function needed
to correctly decode the colors of an image.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Tue, 28 Apr 2015 11:49:09 +0000 (08:49 -0300)]
[media] videodev2.h: add support for transfer functions
In the past the transfer function was implied by the colorspace. However,
it is an independent entity in its own right. Add support for explicitly
choosing the transfer function.
This change will allow us to represent linear RGB (as is used by openGL), and
it will make it easier to work with decoded video material since most codecs
store the transfer function as a separate property as well.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 5 Jun 2015 14:06:46 +0000 (11:06 -0300)]
[media] lirc_imon: simplify error handling code
Instead of using a state machine and a switch with lots of
fall-trough, use gotos and cleanup the error handling loop.
That removes those two smatch warnings:
drivers/staging/media/lirc/lirc_imon.c:933 imon_probe() warn: possible memory leak of 'context'
drivers/staging/media/lirc/lirc_imon.c:933 imon_probe() warn: possible memory leak of 'driver'
And make the error handling code more standard.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 5 Jun 2015 13:47:36 +0000 (10:47 -0300)]
[media] usbvision: cleanup the code
There's a dead code on usbvision that makes it harder to read
and produces a smatch warning about bad identation.
Improve the code readability and add a FIXME to warn about
the current hack there.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 5 Jun 2015 13:30:44 +0000 (10:30 -0300)]
[media] rc: set IR_MAX_DURATION to 500 ms
The current definition is weird, and produce lots of sparse
warnings:
drivers/media/i2c/cx25840/cx25840-ir.c:448 txclk_tx_s_max_pulse_width() warn: impossible condition '(ns >
4294967295) => (0-u32max > u32max)'
drivers/media/i2c/cx25840/cx25840-ir.c:461 rxclk_rx_s_max_pulse_width() warn: impossible condition '(ns >
4294967295) => (0-u32max > u32max)'
drivers/media/i2c/cx25840/cx25840-ir.c:706 cx25840_ir_rx_read() warn: impossible condition '(v >
4294967295) => (0-u32max > u32max)'
drivers/media/pci/ivtv/ivtv-queue.c:145 ivtv_queue_move() error: we previously assumed 'steal' could be null (see line 138)
drivers/media/rc/streamzap.c:155 sz_push_full_pulse() warn: impossible condition '(rawir.duration >
4294967295) => (0-u32max > u32max)'
drivers/media/rc/streamzap.c:169 sz_push_full_pulse() warn: impossible condition '(rawir.duration >
4294967295) => (0-u32max > u32max)'
drivers/media/rc/redrat3.c:325 redrat3_us_to_len() warn: impossible condition '(microsec >
4294967295) => (0-u32max > u32max)'
drivers/media/rc/redrat3.c:383 redrat3_process_ir_data() warn: impossible condition '(rawir.duration >
4294967295) => (0-u32max > u32max)'
drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3676 pvr2_send_request_ex() error: we previously assumed 'write_data' could be null (see line 3648)
drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3829 pvr2_send_request_ex() error: we previously assumed 'read_data' could be null (see line 3649)
drivers/media/pci/cx23885/cx23888-ir.c:463 txclk_tx_s_max_pulse_width() warn: impossible condition '(ns >
4294967295) => (0-u32max > u32max)'
drivers/media/pci/cx23885/cx23888-ir.c:476 rxclk_rx_s_max_pulse_width() warn: impossible condition '(ns >
4294967295) => (0-u32max > u32max)'
drivers/media/pci/cx23885/cx23888-ir.c:696 cx23888_ir_rx_read() warn: impossible condition '(v >
4294967295) => (0-u32max > u32max)'
Use a more realistic value for it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 5 Jun 2015 13:25:24 +0000 (10:25 -0300)]
[media] ir: Fix IR_MAX_DURATION enforcement
Don't assume that IR_MAX_DURATION is a bitmask. It isn't.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 5 Jun 2015 12:33:44 +0000 (09:33 -0300)]
[media] tm6000: remove needless check
Smatch reports a warning:
drivers/media/usb/tm6000/tm6000-video.c:646 tm6000_prepare_isoc() error: we previously assumed 'dev->urb_buffer' could be null (see line 624)
This is not really a problem, but it actually shows that the check
if urb_buffer is NULL is being done twice: at the if and at
tm6000_alloc_urb_buffers().
We don't need to do it twice. So, remove the extra check. The code
become cleaner, and, as a collateral effect, smatch becomes happy.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 5 Jun 2015 12:08:09 +0000 (09:08 -0300)]
[media] ivtv: fix two smatch warnings
Smatch currently produces two warnings:
drivers/media/pci/ivtv/ivtv-fileops.c:901 ivtv_v4l2_close() warn: suspicious bitop condition
drivers/media/pci/ivtv/ivtv-fileops.c:1026 ivtv_open() warn: suspicious bitop condition
Those are false positives, but it is not hard to get rid of them by
using a different way to evaluate the macro, splitting the logical
boolean evaluation from the bitmap one.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 5 Jun 2015 11:35:09 +0000 (08:35 -0300)]
[media] bt8xx: remove needless check
As reported by smatch:
drivers/media/pci/bt8xx/dst_ca.c:323 ca_get_message() warn: this array is probably non-NULL. 'p_ca_message->msg'
drivers/media/pci/bt8xx/dst_ca.c:498 ca_send_message() warn: this array is probably non-NULL. 'p_ca_message->msg'
Those two checks are needless/useless, as the ca_msg struct is
declared as:
typedef struct ca_msg {
unsigned int index;
unsigned int type;
unsigned int length;
unsigned char msg[256];
} ca_msg_t;
So, if the p_ca_message pointer is not null, msg will also be
not null.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 5 Jun 2015 11:27:18 +0000 (08:27 -0300)]
[media] dib0090: Remove a dead code
As reported by smatch:
drivers/media/dvb-frontends/dib0090.c:1710 dib0090_dc_offset_calibration() warn: missing break? reassigning '*tune_state'
There's no need to change tune_state there, as the fall though code
will change it again to another state. So, simplify it by
removing the dead code.
While here, fix a typo:
Sart => Start
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 5 Jun 2015 11:07:19 +0000 (08:07 -0300)]
[media] sh_vou: avoid going past arrays
Smatch reports two issues:
drivers/media/platform/sh_vou.c:670 vou_adjust_output() error: buffer overflow 'vou_scale_v_num' 3 <= 4
drivers/media/platform/sh_vou.c:670 vou_adjust_output() error: buffer overflow 'vou_scale_v_den' 3 <= 4
It seems that there's actually a bug here: the same var (idx) is used
as an index for vertical and horizontal scaling arrays. However,
there are 4 elements on the h arrays, and only 3 at the v ones.
On the first loop, it may select index 4 for the horizontal array.
In this case, if the second loop fails to select an index, the
code would keep using 4 for the vertical array, with is past of
the array sizes.
The intent here seems to use index 0, if the scale is not found.
So, use a separate var for the vertical index.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 5 Jun 2015 11:03:01 +0000 (08:03 -0300)]
[media] em28xx: remove dead code
As reported by smatch:
drivers/media/usb/em28xx/em28xx-video.c:842 get_ressource() info: ignoring unreachable code.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 5 Jun 2015 10:58:52 +0000 (07:58 -0300)]
[media] drxk: better handle errors
As reported by smatch:
drivers/media/dvb-frontends/drxk_hard.c:3277 dvbt_sc_command() warn: missing break? reassigning 'status'
This is basically because the error handling logic there was crappy.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 5 Jun 2015 10:24:22 +0000 (07:24 -0300)]
[media] vivid: don't use more than 1024 bytes of stack
Remove the following compilation warnings:
drivers/media/platform/vivid/vivid-tpg.c: In function 'tpg_gen_text':
drivers/media/platform/vivid/vivid-tpg.c:1562:1: warning: the frame size of 1308 bytes is larger than 1024 bytes [-Wframe-larger-than=]
}
^
This seems to be due to some bad optimization done by gcc.
Moving the for() loop to happen inside the macro solves the
issue.
While here, fix CodingStyle at the switch().
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Marek Szyprowski [Thu, 28 May 2015 11:11:47 +0000 (08:11 -0300)]
[media] media: s5p-mfc: fix sparse warnings
Commits
a0f10c131cc49d7d84394beb7903e1f246331224 and
6c9fe765360efa97c63b89af685b620baf5e0012 ("media: s5p-mfc: fix broken
pointer cast on 64bit arch") fixed issue with lossy cast on 64-bit
architectures. However it also removed __iomem attribute from that cast.
This leads to sparse warnings. This patch fixes those warnings by adding
__iomem cast in case of v6+ code version and replacing readl/writel by
simple u32 load/store operations in case of v5 code (which is called on
system memory allocated by dma_alloc_coherent() instead of io registers).
Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lad, Prabhakar [Tue, 26 May 2015 14:20:27 +0000 (11:20 -0300)]
[media] media: davinci: vpbe: use v4l2_get_timestamp()
this patch makes use of helper function v4l2_get_timestamp()
to set the timestamp of vb2 buffer.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lad, Prabhakar [Mon, 25 May 2015 15:34:29 +0000 (12:34 -0300)]
[media] media: davinci_vpfe: use monotonic timestamp
V4L2 drivers should use MONOTONIC timestamps instead of gettimeofday,
which is affected by daylight savings time.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lad, Prabhakar [Mon, 25 May 2015 15:34:28 +0000 (12:34 -0300)]
[media] media: davinci_vpfe: set minimum required buffers to three
this patch sets nbuffers to three or more and drops the
unset member video_limit which just a copy paste from
earlier driver.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lad, Prabhakar [Mon, 25 May 2015 15:34:27 +0000 (12:34 -0300)]
[media] media: davinci_vpfe: clear the output_specs
clear of the output_specs before passing it to the
configure_resizer_out_params(), so that no garbage values
are set.
This fixes following build warning:
drivers/staging/media/davinci_vpfe/dm365_resizer.c: In function 'resizer_set_stream':
drivers/staging/media/davinci_vpfe/dm365_resizer.c:190:46: warning: 'output_specs.vst_c'
may be used uninitialized in this function [-Wmaybe-uninitialized]
param->ext_mem_param[index].rsz_sdr_ptr_s_c = output->vst_c;
^
drivers/staging/media/davinci_vpfe/dm365_resizer.c:316:30: note: 'output_specs.vst_c' was declared here
struct vpfe_rsz_output_spec output_specs;
^
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Sun, 7 Sep 2014 14:20:34 +0000 (11:20 -0300)]
[media] si2157: implement signal strength stats
Implement DVBv5 signal strength stats. Returns dBm.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Tested-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Fri, 29 May 2015 19:42:33 +0000 (16:42 -0300)]
[media] si2168: Implement own I2C adapter locking
We need own I2C locking because of tuner I2C adapter/repeater.
Firmware command is executed using I2C send + reply message. Default
I2C adapter locking protects only single I2C operation, not whole
send + reply sequence as needed. Due to that, it was possible tuner
I2C message interrupts firmware command sequence.
Reported-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Mon, 1 Jun 2015 09:10:15 +0000 (06:10 -0300)]
[media] DocBook: fix FE_SET_PROPERTY ioctl arguments
FE_SET_PROPERTY/FE_GET_PROPERTY actually expects a struct dtv_properties
argument.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Mon, 1 Jun 2015 08:54:20 +0000 (05:54 -0300)]
[media] DocBook: some fixes for DVB FE open()
The changeset
dc9ef7d11207 change the open() ioctl documentation to
match the V4L2 open(). However, some cut-and-pasted stuff doesn't
match what actually happens at the DVB core.
So, fix the documentation entry to be more accurate with the DVB
frontend open() specifics.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sun, 31 May 2015 12:59:12 +0000 (09:59 -0300)]
[media] DocBook media: rewrite frontend open/close
To fix the last xmllint errors the open and close function reference
description was rewritten based on the v4l2 open and close functions.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sun, 31 May 2015 12:59:11 +0000 (09:59 -0300)]
[media] DocBook media: xmllint fixes
Fixes a large number of xmllint errors.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sun, 31 May 2015 12:59:10 +0000 (09:59 -0300)]
[media] DocBook media: fix typos
satellital -> satellite
antena -> antenna
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Laurent Pinchart [Sun, 24 May 2015 22:45:38 +0000 (19:45 -0300)]
[media] uvcvideo: Remove unneeded device disconnected flag
The UVC_DEV_DISCONNECTED flag is set when the USB device is
disconnected, and checked in the open() handler to refuse opening a
device that has been disconnected.
This is inherently racy, but the race condition is taken care of in the
V4L2 core, which also fails open() calls when the V4L2 device node has
been unregistered. As the uvcvideo USB disconnect handler unregisters
all its video device nodes, the UVC_DEV_DISCONNECTED flag doesn't serve
any purpose anymore and can be removed.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Laurent Pinchart [Tue, 12 May 2015 21:57:53 +0000 (18:57 -0300)]
[media] uvcvideo: Fix incorrect bandwidth with Chicony device 04f2:b50b
The "TOSHIBA Web Camera - 5M" Chicony device (04f2:b50b) seems to
compute the bandwidth on 16 bits and erroneously sign-extend it to
32 bits, resulting in a huge bandwidth value. Detect and fix that
condition by setting the 16 MSBs to 0 when they're all equal to 1.
Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Laurent Pinchart [Tue, 14 Apr 2015 07:19:51 +0000 (04:19 -0300)]
[media] uvcvideo: Implement DMABUF exporter role
Now that videobuf2-vmalloc supports exporting buffers, add support for
the DMABUF exporter role by plugging in the videobuf2 ioctl helper.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Thu, 21 May 2015 19:47:15 +0000 (16:47 -0300)]
[media] af9035: add USB ID 07ca:0337 AVerMedia HD Volar (A867)
It is AF9035 + MxL5007T.
Driver reports:
prechip_version=00 chip_version=03 chip_type=3802
Not sure if that USB ID is reserved only for HP brand or if it is
common, but the stick I have is branded as HP part no. 580715-001
rmn A867.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Thu, 16 Apr 2015 23:04:55 +0000 (20:04 -0300)]
[media] m88ds3103: add I2C client binding
Implement I2C client device binding.
Wrap media attach to driver I2C probe.
Add wrapper from m88ds3103_attach() to m88ds3103_probe() via driver
core in order to provide proper I2C client for legacy media attach
binding.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Tue, 14 Apr 2015 15:56:24 +0000 (12:56 -0300)]
[media] m88ds3103: use jiffies when polling DiSEqC TX ready
Use jiffies to set timeout for DiSEqC TX ready polling. Using jiffies
is more elegant solution than looping N times with sleep.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Tue, 14 Apr 2015 12:44:20 +0000 (09:44 -0300)]
[media] m88ds3103: implement DVBv5 BER
Implement DVBv5 BER statistics.
Wrap legacy DVBv3 BER to DVBv5 BER.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Mon, 13 Apr 2015 23:56:13 +0000 (20:56 -0300)]
[media] m88ds3103: implement DVBv5 CNR statistics
Implement DVBv5 CNR statistics.
Wrap legacy DVBv3 SNR to DVBv5 CNR.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Tue, 14 Apr 2015 00:00:09 +0000 (21:00 -0300)]
[media] m88ds3103: do not return error from get_frontend() when not ready
Do not return error from get_frontend() when status is queried, but
the frontend didn't lock yet. The proper behavior is to only update the
cache after having a lock.
[mchehab@osg.samsung.com: fix the patch description]
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Vasily Khoruzhick [Fri, 24 Apr 2015 07:04:04 +0000 (04:04 -0300)]
[media] gspca: sn9c2028: Add gain and autogain controls Genius Videocam Live v2
Autogain algorithm is very simple, if average luminance is low - increase gain,
if it's high - decrease gain. Gain granularity is low enough for this algo to
stabilize quickly.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Vasily Khoruzhick [Fri, 24 Apr 2015 07:04:03 +0000 (04:04 -0300)]
[media] gspca: sn9c2028: Add support for Genius Videocam Live v2
This cam seems to return different values on long commands, so make status check
in sn9c2028_long_command() more tolerant. Anyway, read value isn't used anywhere
later.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Geert Uytterhoeven [Tue, 5 May 2015 16:32:26 +0000 (13:32 -0300)]
[media] wl128x: Allow compile test of GPIO consumers if !GPIOLIB
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
functionality only, can still be compiled if GPIOLIB is not enabled.
Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
appropriate.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Florian Echtler [Mon, 25 May 2015 12:04:16 +0000 (09:04 -0300)]
[media] return BUF_STATE_ERROR if streaming stopped during acquisition
When stop_streaming is called while a frame is currently being retrieved, the
buffer being filled will still be returned with BUF_STATE_DONE. By resetting
the sequence number and checking before returning the buffer, it can now
correctly be returned with BUF_STATE_ERROR.
Signed-off-by: Martin Kaltenbrunner <modin@yuri.at>
Signed-off-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Florian Echtler [Mon, 25 May 2015 12:04:15 +0000 (09:04 -0300)]
[media] add extra debug output, remove noisy warning
Add dev_dbg statements for easier future debugging; also change the warning
about packet ID mismatches to debug output to avoid flooding the logs. This
warning is only important in a very specific/rare use case when trying to
correlate input events with video data.
Signed-off-by: Martin Kaltenbrunner <modin@yuri.at>
Signed-off-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Florian Echtler [Mon, 25 May 2015 12:04:14 +0000 (09:04 -0300)]
[media] add frame size/frame rate query functions
Add missing functions to query the single fixed frame size (960x540) and
supported frame rates. Technically, the SUR40 supports any arbitrary frame
rate up to 60 FPS, as it is polled and not interrupt-driven. For now, we
just report 30 and 60 FPS, which is sufficient to make most V4L2 tools work.
Signed-off-by: Martin Kaltenbrunner <modin@yuri.at>
Signed-off-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Florian Echtler [Mon, 25 May 2015 12:04:13 +0000 (09:04 -0300)]
[media] reduce poll interval to allow full 60 FPS framerate
The SUR40 hardware can deliver images at up to 60 FPS; at full USB2 bandwidth,
one raw frame will take about 11 ms to transmit. If the poll interval is above
5 ms, fully handling one frame will take longer than 16 ms and the overall
frame rate will drop below 60 FPS. To get the full frame rate without blocking
all the time and still allowing for a bit of timing jitter, we reduce the poll
interval to 4 ms.
Signed-off-by: Martin Kaltenbrunner <modin@yuri.at>
Signed-off-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Sun, 17 May 2015 11:38:04 +0000 (08:38 -0300)]
[media] v4l2: correct two SDR format names
U8 and U16LE format human readable names were translated with string
containing emulated word. These strings were taken from msi2500 driver,
where those formats were emulated (after module parameter is set). But
on API correct names should be used, without any special case notes.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Sun, 17 May 2015 11:34:37 +0000 (08:34 -0300)]
[media] vivid: SDR cap add 'CU08' Complex U8 format
Add complex unsigned 8-bit sample format for SDR capture.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 15 May 2015 12:29:10 +0000 (09:29 -0300)]
[media] vivid: use new V4L2_MAP_*_DEFAULT defines
Use these defines instead of hardcoding this in any driver that needs it.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 15 May 2015 12:29:09 +0000 (09:29 -0300)]
[media] videodev2.h: add macros to map colorspace defaults
The mapping of COLORSPACE_DEFAULT, YCBCR_ENC_DEFAULT or QUANTIZATION_DEFAULT
to proper non-default values is fairly complex, and it is something that
needs to be done both in the kernel and in userspace.
So add macros that can do this conversion, making this available to both
kernel and userspace.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 15 May 2015 12:29:08 +0000 (09:29 -0300)]
[media] DocBook/media: document COLORSPACE_RAW
Document this new colorspace define.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 15 May 2015 12:29:07 +0000 (09:29 -0300)]
[media] videodev2.h: add COLORSPACE_RAW
V4L2_COLORSPACE_RAW is added for raw image formats where the picture
is minimally processed and is in the internal colorspace of the sensor.
This is typically used in digital cameras where the image processing is
done later.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 15 May 2015 12:29:06 +0000 (09:29 -0300)]
[media] DocBook/media: document COLORSPACE_DEFAULT
Document this new colorspace define.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 15 May 2015 12:29:05 +0000 (09:29 -0300)]
[media] videodev2.h: add COLORSPACE_DEFAULT
V4L2_COLORSPACE_DEFAULT is added so we have a specific define for
the default case where applications do not set it but leave it to 0.
In that case the driver will set the colorspace based on what it
captures.
This is already used, but we never had a define for the value 0.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Mon, 18 May 2015 13:29:17 +0000 (10:29 -0300)]
[media] ivtv: fix incorrect audio mode report in log_status
The log_status ioctl should report if the audio input has mode Bilingual. However, the
check against the itv->dualwatch_stereo_mode is completely wrong and is a left-over from
the distant past. Not only is the bitmask obviously wrong, the test itself is broken too
since itv->dualwatch_stereo_mode is no longer a bitmask at all.
Fix this code properly.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 15 May 2015 12:11:13 +0000 (09:11 -0300)]
[media] DocBook/media: add missing entry for V4L2_PIX_FMT_Y16_BE
This format was added but not documented. Do this now.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Ricardo Ribalda [Mon, 4 May 2015 08:07:31 +0000 (05:07 -0300)]
[media] media/vivid: Add support for Y16_BE format
Support for V4L2_PIX_FMT_Y16_BE, a 16 bit big endian greyscale format.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Ricardo Ribalda [Mon, 4 May 2015 08:07:30 +0000 (05:07 -0300)]
[media] media/v4l2-core: Add support for V4L2_PIX_FMT_Y16_BE
16 bit greyscale format, structured in Big Endian. Such a format can be
converted into a PMN image just by adding a header.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Ricardo Ribalda [Wed, 29 Apr 2015 12:00:47 +0000 (09:00 -0300)]
[media] media/videobuf2-dma-vmalloc: Save output from dma_map_sg
dma_map_sg returns the number of areas mapped by the hardware,
which could be different than the areas given as an input.
The output must be saved to nent.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Ricardo Ribalda [Wed, 29 Apr 2015 12:00:46 +0000 (09:00 -0300)]
[media] media/videobuf2-dma-contig: Save output from dma_map_sg
dma_map_sg returns the number of areas mapped by the hardware,
which could be different than the areas given as an input.
The output must be saved to nent.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Ricardo Ribalda [Wed, 29 Apr 2015 12:00:45 +0000 (09:00 -0300)]
[media] media/videobuf2-dma-sg: Fix handling of sg_table structure
When sg_alloc_table_from_pages() does not fail it returns a sg_table
structure with nents and nents_orig initialized to the same value.
dma_map_sg returns the number of areas mapped by the hardware,
which could be different than the areas given as an input.
The output must be saved to nent.
The output of dma_map, should be used to transverse the scatter list.
dma_unmap_sg needs the value passed to dma_map_sg (nents_orig).
sg_free_tables uses also orig_nent.
This patch fix the file to follow this paradigm.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 22 May 2015 14:02:45 +0000 (11:02 -0300)]
[media] adv7604/cobalt: missing GPIOLIB dependency
The adv7604 driver depends on GPIOLIB, and therefore cobalt depends
on it as well.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 22 May 2015 13:45:28 +0000 (10:45 -0300)]
[media] saa7164: fix sparse warning
drivers/media/pci/saa7164/saa7164-i2c.c:45:33: warning: Using plain integer as NULL pointer
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 22 May 2015 13:44:49 +0000 (10:44 -0300)]
[media] cx24120: fix sparse warning
drivers/media/dvb-frontends/cx24120.c:837:6: warning: symbol 'cx24120_calculate_ber_window' was not declared. Should it be static?
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 22 May 2015 09:30:59 +0000 (06:30 -0300)]
[media] cobalt: fix sparse warnings
drivers/media/pci/cobalt/cobalt-v4l2.c:189:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:191:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:192:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:193:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:194:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:195:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:196:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:197:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:198:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:199:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:201:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:202:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:203:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:234:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:240:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:246:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:266:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:267:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:271:28: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:275:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:276:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:312:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:313:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:314:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:315:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:317:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:320:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:321:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:321:36: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:324:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:327:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:328:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:328:41: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:329:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:331:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:332:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:334:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:335:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:336:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:362:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:367:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:368:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:420:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:421:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:422:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:423:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:516:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:516:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:518:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:518:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:518:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:525:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:525:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:546:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:546:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:548:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:549:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:550:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:551:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:552:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:553:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:554:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:555:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:556:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:556:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:556:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:563:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:564:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:564:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:569:9: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:595:16: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-v4l2.c:602:9: warning: dereference of noderef expression
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 22 May 2015 08:51:39 +0000 (05:51 -0300)]
[media] cobalt: fix sparse warnings
drivers/media/pci/cobalt/cobalt-i2c.c:130:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:147:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:151:26: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:156:34: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:206:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:210:26: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:215:34: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:225:27: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:335:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:336:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:337:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:348:34: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:352:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:353:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:356:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:357:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-i2c.c:359:17: warning: dereference of noderef expression
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 22 May 2015 08:44:23 +0000 (05:44 -0300)]
[media] cobalt: fix sparse warnings
drivers/media/pci/cobalt/cobalt-irq.c:62:33: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:64:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:65:23: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:72:21: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:73:25: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:74:25: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:82:33: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:83:33: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:91:25: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:94:23: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:103:25: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:107:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:109:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:116:13: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:119:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:120:17: warning: dereference of noderef expression
drivers/media/pci/cobalt/cobalt-irq.c:122:17: warning: dereference of noderef expression
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 22 May 2015 08:30:02 +0000 (05:30 -0300)]
[media] cobalt: fix sparse warnings
drivers/media/pci/cobalt/cobalt-flash.c:101:5: warning: symbol 'cobalt_flash_probe' was not declared. Should it be static?
drivers/media/pci/cobalt/cobalt-flash.c:126:6: warning: symbol 'cobalt_flash_remove' was not declared. Should it be static?
drivers/media/pci/cobalt/cobalt-cpld.c:101:6: warning: symbol 'cobalt_cpld_status' was not declared. Should it be static?
drivers/media/pci/cobalt/cobalt-cpld.c:240:6: warning: symbol 'cobalt_cpld_set_freq' was not declared. Should it be static?
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 22 May 2015 08:31:46 +0000 (05:31 -0300)]
[media] cobalt: fix sparse warnings
drivers/media/pci/cobalt/cobalt-flash.c:39:36: warning: incorrect type in initializer (different address spaces)
drivers/media/pci/cobalt/cobalt-flash.c:54:36: warning: incorrect type in initializer (different address spaces)
drivers/media/pci/cobalt/cobalt-flash.c:63:36: warning: incorrect type in initializer (different address spaces)
drivers/media/pci/cobalt/cobalt-flash.c:82:36: warning: incorrect type in initializer (different address spaces)
drivers/media/pci/cobalt/cobalt-flash.c:107:19: warning: incorrect type in assignment (different address spaces)
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 22 May 2015 07:39:54 +0000 (04:39 -0300)]
[media] e4000: fix compiler warning
drivers/media/tuners/e4000.c:287:3: warning: this decimal constant is unsigned only in ISO C90
.rangehigh = 2208000000L,
^
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 22 May 2015 07:37:27 +0000 (04:37 -0300)]
[media] cobalt: fix compiler warnings on 32 bit OSes
Fixes these warnings:
drivers/media/pci/cobalt/cobalt-omnitek.c: In function 'omni_sg_dma_start':
drivers/media/pci/cobalt/cobalt-omnitek.c:112:28: warning: right shift count >= width of type [-Wshift-count-overflow]
iowrite32((u32)(desc->bus >> 32), DESCRIPTOR(s->dma_channel) + 4);
^
drivers/media/pci/cobalt/cobalt-omnitek.c: In function 'descriptor_list_create':
drivers/media/pci/cobalt/cobalt-omnitek.c:222:28: warning: right shift count >= width of type [-Wshift-count-overflow]
d->next_h = (u32)(next >> 32);
^
drivers/media/pci/cobalt/cobalt-omnitek.c:268:32: warning: right shift count >= width of type [-Wshift-count-overflow]
d->next_h = (u32)(desc->bus >> 32);
^
drivers/media/pci/cobalt/cobalt-omnitek.c:275:27: warning: right shift count >= width of type [-Wshift-count-overflow]
d->next_h = (u32)(next >> 32);
^
drivers/media/pci/cobalt/cobalt-omnitek.c: In function 'descriptor_list_chain':
drivers/media/pci/cobalt/cobalt-omnitek.c:293:31: warning: right shift count >= width of type [-Wshift-count-overflow]
d->next_h = (u32)(next->bus >> 32);
^
drivers/media/pci/cobalt/cobalt-omnitek.c: In function 'descriptor_list_loopback':
drivers/media/pci/cobalt/cobalt-omnitek.c:332:30: warning: right shift count >= width of type [-Wshift-count-overflow]
d->next_h = (u32)(desc->bus >> 32);
^
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Thu, 21 May 2015 12:37:40 +0000 (09:37 -0300)]
[media] cobalt: fix 64-bit division link error
[linuxtv-media:master 1023/1029] ERROR: "__aeabi_uldivmod" [drivers/media/pci/cobalt/cobalt.ko] undefined!
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Thu, 21 May 2015 09:19:28 +0000 (06:19 -0300)]
[media] cobalt: fix irqs used for the adv7511 transmitter
The interrupt bit assignments use for the adv7511 were off by one.
This means that the current scheme (bit << (4 * stream_index)) can
no longer be used.
Fix this by precalculating and storing the correct masks in the
cobalt_stream struct.
This wasn't noticed before because the adv7511 interrupts are very
rare. But for CEC support these interrupts are essential, so this made
me realize that it wasn't working correctly.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 29 May 2015 13:52:09 +0000 (10:52 -0300)]
[media] DocBook: Update DocBook version and fix a few legacy things
The DVB part of the media API documentation has several
legacy things on it:
- Examples that don't work;
- APIs unused and deprecated;
- places mentioning the wrong API version.
Fix them and bump the documentation version, in order to
reflect the cleanup efforts to make it more consistent with
the current status of the API.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 29 May 2015 13:19:55 +0000 (10:19 -0300)]
[media] DocBook: Fix arguments on some ioctl documentation
Due to a cut-and-paste error, the argument is missing or wrong
on 3 ioctl documentation. Fix them.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 29 May 2015 12:39:55 +0000 (09:39 -0300)]
[media] DocBook: cleaup the notes about DTV properties
The notes there are somewhat confusing and assumes that the
reader would have read the DVBv3 way. This is not true anymore,
as the DVBv3 is now on a separate section that is marked as
deprecated.
So, cleanup the notes.
While here, add a note about using libdvbv5, instead of using
the DVBv5 API directly.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 29 May 2015 12:39:51 +0000 (09:39 -0300)]
[media] DocBook: Add an example for using FE_SET_PROPERTY
In order to make it clearer about how to use the DVBv5 calls,
add an example of its usage. That should make it clearer about
what's actually required for the DVBv5 calls to work.
While here, also mentions the libdvbv5 library.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 29 May 2015 10:34:50 +0000 (07:34 -0300)]
[media] DocBook: improve documentation of the properties structs
Rename the tytle of the struct documentation to reflect
the name of the structures, and use links to do cross-ref.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 29 May 2015 01:06:56 +0000 (22:06 -0300)]
[media] DocBook: improve documentation for hierarchy
Format it as a table and links it with the legacy API xml.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 29 May 2015 01:01:41 +0000 (22:01 -0300)]
[media] DocBook: improve documentation for guard interval
Format it as a table and add more details, in special for
DTMB guard intervals.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Fri, 29 May 2015 00:38:44 +0000 (21:38 -0300)]
[media] DocBook: improve documentation for FEC fields
Format it as a table and add more details. Also, remove the
duplicated occurrences.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Thu, 28 May 2015 23:57:53 +0000 (20:57 -0300)]
[media] DocBook: move fe_bandwidth to the frontend legacy section
fe_bandwidth/fe_bandwidth_t is used only on DVBv3 API. So, move
it to the frontend legacy xml, and convert it into a table.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Thu, 28 May 2015 23:52:52 +0000 (20:52 -0300)]
[media] DocBook: improve documentation for OFDM transmission mode
Format it as a table and add more details, in special, for
the DTMB modes.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Thu, 28 May 2015 23:00:43 +0000 (20:00 -0300)]
[media] DocBook: improve documentation for DVB spectral inversion
Format it as a table and provide more details.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Thu, 28 May 2015 23:12:38 +0000 (20:12 -0300)]
[media] DocBook: cross-reference enum fe_modulation where needed
At frontend legacy API description, there are three places
where fe_modulation_t is defined. Cross-reference it to point
to the right place at the documentation.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Thu, 28 May 2015 23:09:45 +0000 (20:09 -0300)]
[media] DocBook/Makefile: improve typedef parser
The typedef parser is wrong and doesn't get some of the
types defined at the DVB API. Improve it, as we want to add
cross-references to those types.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Thu, 28 May 2015 17:32:28 +0000 (14:32 -0300)]
[media] DocBook: some fixes at FE_GET_INFO
There are a few issues at FE_GET_INFO documentation:
- name is a string, not a pointer to a string;
- the return text should be after the paragraph.
While here, better to bold that two fields of the structure used
by FE_GET_INFO are actually deprecated.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Thu, 28 May 2015 20:21:05 +0000 (17:21 -0300)]
[media] DocBook: Better document enum fe_modulation
Instead of using programlisting, use a table, as this provides
a better view of the structure.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Thu, 28 May 2015 18:44:55 +0000 (15:44 -0300)]
[media] DocBook: add a proper description for dvb_frontend_info.fe_type
The fe_type is deprecated at the DVB API. However, it may still
be used by legacy DVBv3 applications. While this works with old
devices, modern devices may support more than one delivery
system.
Add an explanation about that and a point to what should be
used, instead, in order for legacy apps to support newer hardware.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Thu, 28 May 2015 17:45:17 +0000 (14:45 -0300)]
[media] DocBook: Provide a high-level description for DVB frontend
Instead of just showing ioctls, let's add an introdutory text
briefly explaining the DVB frontend API.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>