aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-core/dmxdev.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-07-08[media] dvb: use ktime_t for internal timeoutArnd Bergmann1-1/+1
The dvb demuxer code uses a 'struct timespec' to pass a timeout as absolute time. This will cause problems on 32-bit architectures in 2038 when time_t overflows, and it is racy with a concurrent settimeofday() call. This patch changes the code to use ktime_get() instead, using the monotonic time base to avoid both the race and the overflow. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-01-11[media] dvb: modify core to implement interfaces/entities at MC new genMauro Carvalho Chehab1-2/+2
The Media Controller New Generation redefines the types for both interfaces and entities to be used on DVB. Make the needed changes at the DVB core for all interfaces, entities and data and interface links to appear in the graph. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-06[media] dvb: get rid of enum dmx_successMauro Carvalho Chehab1-4/+2
This enum is not actually used anymore. The only value used from the enum is DMX_OK, passed as a parameter on two callbacks. Yet, this value is not used anywhere. So, just remove it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-06[media] dvb: don't keep support for undocumented featuresMauro Carvalho Chehab1-0/+4
There are two DVB demux callbacks and ioctls that aren't documented and aren't used at all by the DVB core or by any DVB driver upstream. Let's comment out the code for those two ioctls and remove on some future version. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-26[media] dvb core: rename the media controller entitiesMauro Carvalho Chehab1-2/+2
Prefix all DVB media controller entities with "dvb-" and use dash instead of underline at the names. Requested-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] dmxdev: add support for demux/dvr nodes at media controllerMauro Carvalho Chehab1-3/+8
Make the dvb core demux support aware of the media controller and register the corresponding devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-03[media] dmxdev: don't use before checking file->private_dataMauro Carvalho Chehab1-2/+1
As reported by smatch: drivers/media/dvb-core/dmxdev.c:1091 dvb_demux_poll() warn: variable dereferenced before check 'dmxdevfilter' (see line 1088) This was introduced by changeset d102cac8097c. We need to test before using it. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02[media] media: check status of dmxdev->exit in poll functions of demux&dvrChangbing Xiong1-1/+5
when usb-type tuner is pulled out, user applications did not close device's FD, and go on polling the device, we should return POLLERR directly. Signed-off-by: Changbing Xiong <cb.xiong@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02[media] media: correct return value in dvb_demux_pollChangbing Xiong1-1/+1
Data type of return value is unsigned int, but in function of dvb_demux_poll, when the pointer of dmxdevfilter equals NULL, it will return -EINVAL, which is invalid. Signed-off-by: Changbing Xiong <cb.xiong@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-24dmxdev: get rid of pointless clearing ->f_opAl Viro1-4/+0
nobody else will see that struct file after return from ->release() anyway; just leave ->f_op as is and let __fput() do that fops_put(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-06-19[media] media: dmxdev: remove dvb_ringbuffer_flush() on writer sideSoeren Moch1-6/+2
In dvb_ringbuffer lock-less synchronizationof reader and writer threads is done with separateread and write pointers. Sincedvb_ringbuffer_flush() modifies the read pointer, this function must not be called from the writer thread. This patch removes the dvb_ringbuffer_flush() calls in the dmxdev ringbuffer write functions, this fixes Oopses "Unable to handle kernel paging request" I could observe for the call chaindvb_demux_read ->dvb_dmxdev_buffer_read -> dvb_ringbuffer_read_user -> __copy_to_user (the reader side of the ringbuffer). The flush calls at the write side are not necessary anyway since ringbuffer_flush is also called in dvb_dmxdev_buffer_read() when an error condition is set in the ringbuffer. This patch should also be applied to stable kernels. Signed-off-by: Soeren Moch <smoch@web.de> CC: <stable@vger.kernel.org> Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08[media] demux.h: Remove duplicated enumMauro Carvalho Chehab1-1/+1
"enum dmx_ts_pes" and "typedef enum dmx_pes_type_t" are just the same enum declared twice, since Kernel (2.6.12). There's no reason to duplicate it there, and sparse complains about that: drivers/media/dvb-core/dmxdev.c:600:55: warning: mixing different enum types So, remove the internal define, keeping just the external one. Internally, use only "enum dmx_ts_pes", as it is too late to drop dmx_pes_type_t from the userspace API. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04[media] mb86a20s: change AGC tuning parametersMauro Carvalho Chehab1-1/+2
Use the AGC settings present on a newer device. The initial settings were taken from one of the first devices with mb86a20s, and there are several reports that this is not working properly on some places. So, instead of keeping using it, get the parameters taken from a newer device. Tests are welcomed. Tested also with cx231xx PixelView SBTVD Hybrid with no regressions noticed so far. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] dmxdev: fix a comparition of unsigned expression warningMauro Carvalho Chehab1-1/+1
drivers/media/dvb-core/dmxdev.c: In function 'dvb_dmxdev_pes_filter_set': drivers/media/dvb-core/dmxdev.c:880:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] dvb: move the dvb core one level upMauro Carvalho Chehab1-0/+1275
just like the V4L2 core, move the DVB core to drivers/media, as the intention is to get rid of both "video" and "dvb" directories. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>