summaryrefslogtreecommitdiff
path: root/drivers/media
AgeCommit message (Collapse)Author
2015-02-26[media] siano: replace sms_log() by pr_debug()Mauro Carvalho Chehab
Despite its name, those functions are acutally debug prints for the IR part of the driver. So, properly map them using pr_debug() Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-26[media] siano: replace sms_err by pr_errMauro Carvalho Chehab
Originally, sms_err() would be also displaying the line where the error occurs, but the messages are clear enough. Also, the function is always printed. So, no need for it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-26[media] siano: replace sms_warn() by pr_warn()Mauro Carvalho Chehab
There's no reason for a sms' own sms_warn macro. Just replace it by the standard pr_warn(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-26[media] siano: use pr_* print functionsMauro Carvalho Chehab
Instead of defining its own set of printk functions, let's use the common Kernel debug logic provided by pr_foo functions. As a first step, let's just define the existing macros as the Kernel ones. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-26[media] siano: add support for the media controller at USB driverMauro Carvalho Chehab
Adding support for the media controller for a pure DVB device is simple: just create a struct media_device and add it to the dvb adapter. After creating all DVB devices, we need to call the DVB core, for it to create the media graph. More work is needed for pure DVB tuners, but this is hidden at the Siano driver, just like several others non-hybrid devices. So, this is streight forward. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-26[media] cx25840: better document the media padsMauro Carvalho Chehab
Use an enum to better document the media pads. No functional changes. Suggested-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-26[media] cx25840: fix return logic when media entity init failsMauro Carvalho Chehab
There's no need to free state, as it was allocated via devm_kzalloc(). Also, let's return the error code, instead of something else. Reported-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-26[media] cx231xx: enable the analog tuner at buffer setupMauro Carvalho Chehab
buf_prepare callback is called for every queued buffer. This is an overkill. Call it at buf_setup, as this should be enough. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-26[media] cx231xx: Improve the media controller commentMauro Carvalho Chehab
There are two problems at the comment: - it is badly idented; - its comment doesn't mean anything. Fix it. 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-26[media] cx25840: better document the media controller TODOMauro Carvalho Chehab
Analog video inputs are the tuner, plus composite, svideo, etc, e. g. the input pat should actually be like: ___________ TUNER --------> | | | | SVIDEO .......> | cx25840 | | | COMPOSITE1 ...> |_________| (in the above, dashes represent the enabled link, and periods represent the disabled ones) In other words, if we want to properly represent the pipeline, it should be possible to see via the media controller if the tuner is being used as an image source, or if the source is something else. I didn't map those other inputs here yet, due to a few things: - The extra inputs would require subdevs that won't be controlled - I was in doubt about the best way for doing that - That would likely require some extra setup for cx25840 caller drivers, in order to represent what of the possible internal inputs are actually used on each specific board Actually, at least for now, I was unable to see much benefit on adding such map now, so let's just document it, as this could be added later on, as needed. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-26[media] dvb core: rename the media controller entitiesMauro Carvalho Chehab
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-26[media] tuner-core: fix compilation if the media controller is not definedMauro Carvalho Chehab
drivers/media/v4l2-core/tuner-core.c:440:7: error: 'struct v4l2_subdev' has no member named 'entity' t->sd.entity.name = t->name; Reported-by: kbuild test robot <fengguang.wu@intel.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-26[media] cx231xx: fix compilation if the media controller is not definedMauro Carvalho Chehab
drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_usb_probe’: drivers/media/usb/cx231xx/cx231xx-cards.c:1589:15: error: ‘struct v4l2_device’ has no member named ‘mdev’ dev->v4l2_dev.mdev = dev->media_dev; ^ drivers/media/usb/cx231xx/cx231xx-cards.c:1589:26: error: ‘struct cx231xx’ has no member named ‘media_dev’ dev->v4l2_dev.mdev = dev->media_dev; ^ scripts/Makefile.build:257: recipe for target 'drivers/media/usb/cx231xx/cx231xx-cards.o' failed Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-26[media] dvb-frontend: remove a warningMauro Carvalho Chehab
if CONFIG_MEDIA_CONTROLLER_DVB is not selected, it is now producing this warning: drivers/media/dvb-core/dvb_frontend.c: In function ‘dvb_frontend_thread’: drivers/media/dvb-core/dvb_frontend.c:695:6: warning: unused variable ‘ret’ [-Wunused-variable] int ret; ^ Reported-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-23[media] dvb core: only start media entity if not NULLMauro Carvalho Chehab
The logic there tries to start the media entity even if it doesn't exist, causing this bug: [ 314.356162] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 [ 314.356202] IP: [<ffffffffa02ef74c>] media_entity_pipeline_start+0x1c/0x390 [media] Reported-by: Gert-Jan van der Stroom <gjstroom@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-23Merge tag 'v4.0-rc1' into patchworkMauro Carvalho Chehab
Linux 34.0-rc1 * tag 'v4.0-rc1': (8947 commits) Linux 4.0-rc1 autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation procfs: fix race between symlink removals and traversals debugfs: leave freeing a symlink body until inode eviction Documentation/filesystems/Locking: ->get_sb() is long gone trylock_super(): replacement for grab_super_passive() fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry) SELinux: Use d_is_positive() rather than testing dentry->d_inode Smack: Use d_is_positive() rather than testing dentry->d_inode TOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR() Apparmor: Use d_is_positive/negative() rather than testing dentry->d_inode Apparmor: mediated_filesystem() should use dentry->d_sb not inode->i_sb VFS: Split DCACHE_FILE_TYPE into regular and special types VFS: Add a fallthrough flag for marking virtual dentries VFS: Add a whiteout dentry type VFS: Introduce inode-getting helpers for layered/unioned fs environments kernel: make READ_ONCE() valid on const arguments blk-throttle: check stats_cpu before reading it from sysfs ...
2015-02-13[media] dvb_frontend: start media pipeline while thread is runningMauro Carvalho Chehab
While the DVB thread is running, the media pipeline should be streaming. This should prevent any attempt of using the analog TV while digital TV is working, and vice-versa. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] cx231xx: enable tuner->decoder link at videobuf startMauro Carvalho Chehab
The tuner->decoder needs to be enabled when we're about to start streaming. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] dvb-frontend: enable tuner link when the FE thread startsMauro Carvalho Chehab
If the dvb frontend thread starts, the tuner should be switched to the frontend. Add a code that ensures that this will happen, using the media controller. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] dvbdev: enable DVB-specific linksMauro Carvalho Chehab
For now, let's keep the DVB-specific media controller links enabled by default. On most devices, this is fixed anyway, so no big issue. Ok, the demux actually have dynamic links based on the filters, but we don't represent them yet, as the media controller currently lacks the capability of dynamically create/delete entities. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] cx231xx: create DVB graphMauro Carvalho Chehab
cx231xx is simple with regards to DVB: all boards have just one DVB adapter. So, we can use the default DVB helper function to create the DVB media graph. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] dvbdev: add a function to create DVB media graphMauro Carvalho Chehab
We need to create a DVB graph, linking the several DVB devnodes. Add such function. Please notice that this helper function doesn't take into account devices with multiple DVB adapters and frontends. For devices with multiple adapters, they should either create two different media controller instances or to improve this function to take the adapter ID into account. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] dvbdev: represent frontend with two padsMauro Carvalho Chehab
While on some devices the tuner is bound inside the frontend, other devices use a separate subdevice for it. So, in order to be more generic, better to map it with two pads. That will allows to use the media controller to lock the tuner between the DVB and the V4L2 sub-drivers, on hybrid devices. While here, change the logic to use pad 0 as sink for devices with both sink and source pads. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] cx231xx: create media links for analog modeMauro Carvalho Chehab
Now that we have entities and pads, let's create media links between them, for analog setup. We may not have all the links for digital yet, as the dvb extention may not be loaded yet. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] cx231xx: initialize video/vbi padsMauro Carvalho Chehab
Both video and vbi are sink pads. Initialize them as such. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] cx25840: fill the media controller entityMauro Carvalho Chehab
Instead of keeping the media controller entity not initialized, fill it and create the pads for cx25840. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] tuner-core: properly initialize media controller subdevMauro Carvalho Chehab
Properly initialize tuner core subdev at the media controller. That requires a new subtype at the media controller API. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] dvbdev: add pad for the DVB devnodesMauro Carvalho Chehab
We want to represent the links between the several DVB devnodes, so let's create PADs for them. The DVB net devnode is a different matter, as it is not related to the media stream, but with network. So, at least for now, let's not add any pad for it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] dvb_net: add support for DVB net node at the media controllerMauro Carvalho Chehab
Make the dvb core network support aware of the media controller and register the corresponding devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] dvb_ca_en50221: add support for CA node at the media controllerMauro Carvalho Chehab
Make the dvb core CA support aware of the media controller and register the corresponding devices. 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 Chehab
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>
2015-02-13[media] dvb_frontend: add media controller support for DVB frontendMauro Carvalho Chehab
Now that the dvb core is capable of registering devices via the media controller, add support for the DVB frontend devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] cx231xx: add media controller supportMauro Carvalho Chehab
Let's add media controller support for this driver and register it for both V4L and DVB. The media controller on this driver is not mandatory, as it can fully work without it. So, if the media controller register fails, just print an error message, but proceed with device registering. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] dvbdev: add support for media controllerMauro Carvalho Chehab
Provide a way to register media controller device nodes at the DVB core. Please notice that the dvbdev callers also require changes for the devices to be registered via the media controller. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-13[media] media: Fix DVB devnode representation at media controllerMauro Carvalho Chehab
The previous provision for DVB media controller support were to define an ID (likely meaning the adapter number) for the DVB devnodes. This is just plain wrong. Just like V4L, DVB devices (and any other device node)) are uniquely identified via a (major, minor) tuple. This is enough to uniquely identify a devnode, no matter what API it implements. So, before we go too far, let's mark the old v4l, fb, dvb and alsa "devnode" info as deprecated, and just call it as "dev". We can latter add fields specific to each API if needed. As we don't want to break compilation on already existing apps, let's just keep the old definitions as-is, adding a note that those are deprecated at media-entity.h. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-11mm: gup: use get_user_pages_unlockedAndrea Arcangeli
This allows those get_user_pages calls to pass FAULT_FLAG_ALLOW_RETRY to the page fault in order to release the mmap_sem during the I/O. Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Peter Feiner <pfeiner@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-11[media] ir-hix5hd2: remove writel/readl_relaxed defineZhangfei Gao
Commit 9439eb3ab9d1ec ("asm-generic: io: implement relaxed accessor macros as conditional wrappers") has added {read,write}{b,w,l,q}_relaxed to include/asm-generic/io.h Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-10[media] gpsca: remove the risk of a division by zeroLuis de Bethencourt
As reported by Peter Kovar, there's a potential risk of a division by zero on calls to jpeg_set_qual() when quality is zero. As quality can't be 0 or lower than that, add an extra clause to cover this special case. Signed-off-by: Luis de Bethencourt <luis.bg@samsung.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03[media] dvb_net: Convert local hex dump to print_hex_dump_debugJoe Perches
Use the generic facility instead of a home-grown one. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03[media] dvb_net: Use standard debugging facilitiesJoe Perches
Convert dprintk to netdev_dbg where appropriate. Remove dvb_net_debug module_param. Remove __func__ from output as that can be added by dynamic_debug. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03[media] dvb_net: Use vsprintf %pM extension to print Ethernet addressesJoe Perches
No need for more macros, so remove them and use the kernel extension. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03[media] stb0899: use sign_extend32() for sign extensionMartin Kepplinger
Instead of implement its own logic, use the already-defined one. Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03[media] si2168: add support for 1.7MHz bandwidthOlli Salonen
This patch is based on Antti's silabs branch. Add support for 1.7 MHz bandwidth. Supported in all versions of Si2168 according to short data sheets. [mchehab@osg.samsung.com: Fix CodingStyle] Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03[media] si2168: return error if set_frontend is called with invalid parametersOlli Salonen
This patch should is based on Antti's silabs branch. According to dvb-frontend.h set_frontend may be called with bandwidth_hz set to 0 if automatic bandwidth is required. Si2168 does not support automatic bandwidth and does not declare FE_CAN_BANDWIDTH_AUTO in caps. This patch will change the behaviour in a way that EINVAL is returned if bandwidth_hz is 0. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03[media] lirc_dev: avoid potential null-dereferenceAndy Shevchenko
We have to check pointer for NULL and then dereference it. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03[media] dvb: tc90522: re-add symbol-rate reportAkihiro Tsukada
symbol-rate report was wrongly removed off by the commit:906aaf5a . Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03[media] lmedm04: add read snr, signal strength and ber call backsMalcolm Priestley
This allows calling the original functions providing the streaming is off. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03[media] lmedm04: Create frontend call back for read statusMalcolm Priestley
Create dm04_read_status to check lock through either interrupt values or directly by the call back. When the device is not streaming the frontends original call back is used. When streaming has started it turns off I2C messaging by setting st->i2c_talk_onoff to zero. I2C can only be turn on again by one of the other allowed frontend calls. All old code is removed from lme2510_msg and this function only needs to set st->i2c_talk_onoff to 1. The lock status is saved and when the frondend is locked is maintained by lme2510_int_response who will now just kill the lock. The call back for rs2000 tuner is nologer required. All frontend types have been tested. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03[media] lmedm04: create frontend callbacks for signal/snr/ber/ucblocksMalcolm Priestley
Create call backs dm04_read_signal_strength, dm04_read_snr and move dm04_read_ber and dm04_read_ucblocks for all frontends Removing the I2C filtering from lme2510_msg and the old rs2000 callbacks. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03[media] lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in ↵Malcolm Priestley
interrupt urb A quirk of some older firmwares that report endpoint pipe type as PIPE_BULK but the endpoint otheriwse functions as interrupt. Check if usb_endpoint_type is USB_ENDPOINT_XFER_BULK and set as usb_rcvbulkpipe. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>