summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [media] soc_camera/mx3_camera.c: move to staging in preparation, for removalHans Verkuil2016-03-037-10/+21
| | | | | | | | | | | | | This driver is deprecated: it should become a stand-alone driver instead of using the soc-camera framework. Unless someone is willing to take this on (unlikely with such ancient hardware) it is going to be removed from the kernel soon. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] soc_camera/mx2_camera.c: move to staging in preparation, for removalHans Verkuil2016-03-037-10/+18
| | | | | | | | | | | | | This driver is deprecated: it should become a stand-alone driver instead of using the soc-camera framework. Unless someone is willing to take this on (unlikely with such ancient hardware) it is going to be removed from the kernel soon. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] soc_camera/omap1: move to staging in preparation for removalHans Verkuil2016-03-037-11/+19
| | | | | | | | | | | | | | This driver is deprecated: it needs to be converted to vb2 and it should become a stand-alone driver instead of using the soc-camera framework. Unless someone is willing to take this on (unlikely with such ancient hardware) it is going to be removed from the kernel soon. Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] vivid: support new multiplanar YUV formatsHans Verkuil2016-03-032-2/+69
| | | | | | | | Add support for the new YUV422M, YVU422M, YUV444M and YVU444M formats. This allows applications to check their support for these formats. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: add support for firmware files named as distributed by NXPPhilipp Zabel2016-03-032-17/+47
| | | | | | | | | Try loading the firmware from firmware files named vpu_fw_imx*.bin, as they are originally distributed by NXP. Fall back to v4l-coda*-imx6*.bin. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] adv7604: fix SPA register location for ADV7612Ulrich Hecht2016-03-031-1/+2
| | | | | | | | SPA location LSB register is at 0x70. Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: add support for native order firmware files with Freescale headerPhilipp Zabel2016-03-031-2/+33
| | | | | | | | | | | | | Freescale distribute their VPU firmware files with a 16 byte header in BIT processor native order. This patch allows to detect the header and to reorder the firmware on the fly. With this patch it should be possible to use the distributed vpu_fw_imx{53,6q,6d}.bin files directly after renaming them to v4l-coda*-imx{53,6q,6dl}.bin. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] V4L: fix a confusing function nameGuennadi Liakhovetski2016-03-031-4/+6
| | | | | | | | | is_state_active_or_queued() actually returns true if the buffer's state is neither active nore queued. Rename it for clarity. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] atmel-isi: Fix bad usage of IS_ERR_VALUEGuenter Roeck2016-03-031-2/+2
| | | | | | | | | | | | | | | | | | | | IS_ERR_VALUE() assumes that its parameter is an unsigned long. It can not be used to check if an unsigned int reflects an error. Doing so can result in the following build warning. drivers/media/platform/soc_camera/atmel-isi.c: In function "atmel_isi_probe": include/linux/err.h:21:38: warning: comparison is always false due to limited range of data type drivers/media/platform/soc_camera/atmel-isi.c:1089:6: note: in expansion of macro "IS_ERR_VALUE" If that warning is seen, the return value from platform_get_irq() is not checked for errors. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] pxa_camera: conversion to dmaengineRobert Jarzmik2016-03-032-229/+174Star
| | | | | | | | | | | | | | | Convert pxa_camera to dmaengine. This removes all DMA registers manipulation in favor of the more generic dmaengine API. The functional level should be the same as before. The biggest change is in the sg_split() function, which splits a videobuf-dma into several scatterlists for 3 planes captures (Y, U, V). Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> [g.liakhovetski@gmx.de: fix a function prototype, use bool, struct init] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] pxa_camera: trivial move of dma irq functionsRobert Jarzmik2016-03-031-18/+24
| | | | | | | | | | | This moves the dma irq handling functions up in the source file, so that they are available before DMA preparation functions. It prepares the conversion to DMA engine, where the descriptors are populated with these functions as callbacks. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] pxa_camera: move interrupt to taskletRobert Jarzmik2016-03-031-15/+29
| | | | | | | | | | | In preparation for dmaengine conversion, move the camera interrupt handling into a tasklet. This won't change the global flow, as this interrupt is only used to detect the end of frame and activate DMA fifos handling. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] pxa_camera: fix the buffer free pathRobert Jarzmik2016-03-031-11/+5Star
| | | | | | | | | | Fix the error path where the video buffer wasn't allocated nor mapped. In this case, in the driver free path don't try to unmap memory which was not mapped in the first place. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] mx3_camera: use %pad format string for dma_ddr_tArnd Bergmann2016-03-031-6/+6
| | | | | | | | | | | | | | | | | | | The mx3_camera driver prints DMA addresses using the "%x" format string, which is wrong when using a 64-bit dma_addr_t definition: media/platform/soc_camera/mx3_camera.c: In function 'mx3_cam_dma_done': media/platform/soc_camera/mx3_camera.c:149:125: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=] media/platform/soc_camera/mx3_camera.c: In function 'mx3_videobuf_queue': media/platform/soc_camera/mx3_camera.c:317:119: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=] media/platform/soc_camera/mx3_camera.c: In function 'mx3_videobuf_release': media/platform/soc_camera/mx3_camera.c:346:119: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=] This changes the code to use the special %pad format string, which always does the right thing. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] soc_camera: rcar_vin: Add ARGB8888 caputre format supportKoji Matsuoka2016-03-031-10/+29
| | | | | | | | | This patch adds ARGB8888 capture format support for R-Car Gen3. Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] UVC: Add support for R200 depth cameraAviv Greenberg2016-03-033-0/+35
| | | | | | | | | | | | | Add support for Intel R200 depth camera in uvc driver. This includes adding new uvc GUIDs for the new pixel formats, adding new V4L pixel format definition to user api headers, and updating the uvc driver GUID-to-4cc tables with the new formats. Tested-by: Greenberg, Aviv D <aviv.d.greenberg@intel.com> Signed-off-by: Aviv Greenberg <aviv.d.greenberg@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] V4L: add Y12I, Y8I and Z16 pixel format documentationGuennadi Liakhovetski2016-03-034-0/+220
| | | | | | | | Add documentation for 3 formats, used by RealSense cameras like R200. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] au0828: use v4l2_mc_create_media_graph()Mauro Carvalho Chehab2016-03-032-99/+25Star
| | | | | | | There's no reason to implement its own function to create the media graph. So, use the core one. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] au0828: use standard demod pads structMauro Carvalho Chehab2016-03-036-19/+13Star
| | | | | | | | As we want au0828 to use the core function to create the MC graphs, use enum demod_pad_index instead of enum au8522_media_pads. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rc-core: allow calling rc_open with device not initializedMauro Carvalho Chehab2016-03-032-28/+23Star
| | | | | | | | | | | | | | | | | | The device initialization completes only after calling input_register_device(). However, rc_open() can be called while the device is being registered by the input/evdev core. So, we can't expect that rc_dev->initialized to be true. Change the logic to don't require initialized == true at rc_open and change the type of initialized to be atomic. this way, we can check for it earlier where it is really needed, without needing to lock the mutex just for testing it. Tested with nuvoton_cir driver on a NUC5i7RYB with CIR integrated on it. Reported-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media.h: use hex values for IF and AUDIO entities tooHans Verkuil2016-03-031-5/+5
| | | | | | | | Make the base offset hexadecimal to simplify debugging since the base addresses are hex too. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* Merge branch 'v4l_for_linus' into patchworkMauro Carvalho Chehab2016-03-032-12/+11Star
|\ | | | | | | | | | | | | | | | | We need to import the changes at media.h, as we have a followup patch that depends on it. * v4l_for_linus: [media] media.h: use hex values for range offsets, move connectors base up. [media] adv7604: fix tx 5v detect regression
| * [media] media.h: use hex values for range offsets, move connectors base up.Hans Verkuil2016-03-031-10/+10
| | | | | | | | | | | | | | | | | | | | | | Make the base offset hexadecimal to simplify debugging since the base addresses are hex too. The offsets for connectors is also changed to start after the 'reserved' range 0x10000-0x2ffff. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] adv7604: fix tx 5v detect regressionHans Verkuil2016-02-161-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | The 5 volt detect functionality broke in 3.14: the code reads IO register 0x70 again after it has already been cleared. Instead it should use the cached irq_reg_0x70 value and the io_write to 0x71 to clear 0x70 can be dropped since this has already been done. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: <stable@vger.kernel.org> # for v3.14 and up Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media-device.h: fix compiler warningHans Verkuil2016-03-021-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix these compiler warnings: media-git/include/media/media-device.h: In function 'media_device_pci_init': media-git/include/media/media-device.h:610:9: warning: 'return' with a value, in function returning void return NULL; ^ media-git/include/media/media-device.h: In function '__media_device_usb_init': media-git/include/media/media-device.h:618:9: warning: 'return' with a value, in function returning void return NULL; ^ Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] lirc_dev: avoid double mutex unlockMauro Carvalho Chehab2016-03-011-2/+5
| | | | | | | | | | | | | | | | | | We can only unlock if mutex_lock() succeeds. Fixes the following warning: drivers/media/rc/lirc_dev.c:535 lirc_dev_fop_close() error: double unlock 'mutex:&lirc_dev_lock' Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] ati_remote: Put timeouts at the accel arrayMauro Carvalho Chehab2016-03-011-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having the timeouts hardcoded, and getting only the accel value from the array, put everything in the same place. That simplifies the logic. As a side effect, it also cleans several smatch errors: include/linux/jiffies.h:359:41: error: strange non-value function or array include/linux/jiffies.h:361:42: error: strange non-value function or array (one per time_after/time_before line) Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] pt3: fix device identificationMauro Carvalho Chehab2016-03-011-1/+2
| | | | | | | | | | | | | | | | | | | | As warned by smatch: drivers/media/pci/pt3/pt3.c:398 pt3_attach_fe() error: strncmp() '"tc90522sat"' too small (11 vs 20) Clearly, the logic is doing the wrong thing, as it is not comparing the strings on the right way. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] technisat-usb2: don't do DMA on the stackMauro Carvalho Chehab2016-03-011-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As warned by smatch: drivers/media/usb/dvb-usb/technisat-usb2.c:263 technisat_usb2_set_led() error: doing dma on the stack (led) drivers/media/usb/dvb-usb/technisat-usb2.c:280 technisat_usb2_set_led_timer() error: doing dma on the stack (&b) drivers/media/usb/dvb-usb/technisat-usb2.c:341 technisat_usb2_identify_state() error: doing dma on the stack (version) drivers/media/usb/dvb-usb/technisat-usb2.c:609 technisat_usb2_get_ir() error: doing dma on the stack (buf) drivers/media/usb/dvb-usb/technisat-usb2.c:619 technisat_usb2_get_ir() error: doing dma on the stack (buf) Create a buffer at the device state and use it for all the DMA transfers. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] dib0090: Do the right check for state->rf_rampMauro Carvalho Chehab2016-03-011-1/+1
| | | | | | | | | | | | | | Smatch with -pkernel --no-data keeps complaining about rf_ramp: drivers/media/dvb-frontends/dib0090.c:1119 dib0090_pwm_gain_reset() error: we previously assumed 'state->rf_ramp' could be null (see line 1086) Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] drxj: don't do math if not neededMauro Carvalho Chehab2016-03-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While there's no risk of divison by zero, the logic there is akward, as it does the calculus for the numerator and denominator before checking if this will be used. Change the order to check first if the denominator is zero, and only calculating the numerator/denominator if not. This should also avoid those smatch errors: drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] airspy: fix bit set/clean mess on s->flagsMauro Carvalho Chehab2016-03-011-6/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As warned by smatch: drivers/media/usb/airspy/airspy.c:541 airspy_start_streaming() warn: test_bit() takes a bit number drivers/media/usb/airspy/airspy.c:569 airspy_start_streaming() warn: test_bit() takes a bit number drivers/media/usb/airspy/airspy.c:605 airspy_stop_streaming() warn: test_bit() takes a bit number set_bit/clear_bit argument is the bit number, and not 1 << bit. Thankfully, one of the bits was not used (URB_BUF), with would otherwise cause a driver misfunctioning. Clean this mess by always using set_bit/clear_bit/test_bit and removing the unused bit. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] gspca: Remove unused ovfx2_vga_mode/ovfx2_cif_mode arraysHans de Goede2016-03-011-34/+0Star
| | | | | | | | | | | | | | | | Remove the unused ovfx2_vga_mode/ovfx2_cif_mode arrays from the ov519 driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] gspca: Fix ov519 i2c r/w not working when connected to a xhci hostWesley Post2016-03-012-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the ov519 driver not working (unable to talk to the sensor) when plugged into a xhci host. The root cause here is that uhci/ohci/ehci hosts typically will send any pending async requests every milli-second and then go to sleep for the rest if the milli-second, where as xhci hosts send them immediately, causing things to go too fast for the ov519 bridge. This commit adds a few delays fixing this. Signed-off-by: Wesley Post <pa4wdh@xs4all.nl> [hdegoede@redhat.com: Also add delays to w996Xcf.c, as that needs them too] Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] bttv: Width must be a multiple of 16 when capturing planar formatsHans de Goede2016-03-011-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On my bttv card "Hauppauge WinTV [card=10]" capturing in YV12 fmt at max size results in a solid green rectangle being captured (all colors 0 in YUV). This turns out to be caused by max-width (924) not being a multiple of 16. We've likely never hit this problem before since normally xawtv / tvtime, etc. will prefer packed pixel formats. But when using a video card which is using xf86-video-modesetting + glamor, only planar XVideo fmts are available, and xawtv will chose a matching capture format to avoid needing to do conversion, triggering the solid green window problem. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: au0828 video change to use v4l_enable_media_source()Shuah Khan2016-02-271-63/+39Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change au0828 to check if tuner is free or not before changing tuner configuration. vidioc_g_tuner(), and au0828_v4l2_close() now call v4l-core interface v4l_enable_media_source() before changing tuner configuration. Remove au0828_enable_analog_tuner() as it is no longer needed because v4l2-core implements common interfaces to check for media source availability. In addition, queue_setup() no longer needs the tuner availability check since v4l2-core does it. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: dvb-frontend invoke enable/disable_source handlersShuah Khan2016-02-271-114/+21Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change dvb frontend to check if tuner is free when device opened in RW mode. Call to enable_source handler either returns with an active pipeline to tuner or error if tuner is busy. Tuner is released when frontend is released calling the disable_source handler. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: au0828 add enable, disable source handlersShuah Khan2016-02-273-0/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add enable_source and disable_source handlers. The enable source handler is called from v4l2-core, dvb-core, and ALSA drivers to check if the shared media source is free. The disable source handler is called to release the shared media source. [mchehab@osg.samsung.com: fix merge conflicts] Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: au0828-core register entity_notify hookShuah Khan2016-02-272-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | Register entity_notify async hook to create links between existing bridge driver entities and a newly added non-bridge driver entities. For example, this handler creates link between V4L decoder entity and ALSA mixer entity. [mchehab@osg.samsung.com: fix merge conflicts and make au0828_media_graph_notify static to shut up a warning] Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: au0828 disable tuner to demod linkShuah Khan2016-02-271-1/+19
| | | | | | | | | | | | | | | | | | Change au0828_create_media_graph() to find and disable tuner and demod link. This helps avoid an additional disable step when tuner is requested by video or audio. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: au0828 create tuner to decoder link in disabled stateShuah Khan2016-02-271-2/+1Star
| | | | | | | | | | | | | | | | | | | | Create tuner to demod pad link in disabled state to avoid disable step when tuner resource is requested by dvb. [mchehab@osg.samsung.com: fix a merge conflict] Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: au0828 handle media_init and media_register windowShuah Khan2016-02-271-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Media device initialization and registration steps are split. There is a window between media device init and media device register during usb probe. au0828 bridge driver and snd-usb-audio could try to initialize the media device, if they simply checked, whether the device has been registered. They also need to check whether the device has been initialized. Change the au0828-core to check if media device is already initialized during initialization step and check if media device is already registered during the registration step. [mchehab@osg.samsung.com: fix a merge conflict] Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: au0828 change to use Managed Media Controller APIShuah Khan2016-02-271-7/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change au0828 to use Managed Media Controller API to share media device and coordinate creating/deleting the shared media device with the snd-usb-audio driver. The shared media device is created as device resource of the parent usb device of the two drivers. Populate media device model with USB Device product name instead of au0828 device board name. This change is necessary because, if the media device is registered by the snd-usb-audio driver first, and it doesn't know the au0828 board name. [mchehab@osg.samsung.com: Fix merge conflicts] Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: Change v4l-core to check if source is freeShuah Khan2016-02-273-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change s_input, s_fmt, s_tuner, s_frequency, querystd, s_hw_freq_seek, and vb2_core_streamon interfaces that alter the tuner configuration to check if it is free, by calling v4l_enable_media_source(). If source isn't free, return -EBUSY. v4l_disable_media_source() is called from v4l2_fh_exit() to release tuner (source). vb2_core_streamon() uses v4l_vb2q_enable_media_source(). Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: au0828 Use au8522_media_pads enum for pad definesShuah Khan2016-02-271-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | Change au0828-core to use au8522_media_pads enum defines instead of hard-coding the pad values. [mchehab@osg.samsung.com: patch rebased, as the code was moved to au0828-video.c. Also added AU8522_PAD_INPUT to the list of pad number replacements] Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: au8522 change to create MC pad for ALSA Audio OutShuah Khan2016-02-272-0/+2
| | | | | | | | | | | | | | Add new pad for ALSA Audio Out to au8522_media_pads. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: Move au8522_media_pads enum to au8522.h from au8522_priv.hShuah Khan2016-02-272-8/+7Star
| | | | | | | | | | | | | | | | | | Move the au8522_media_pads enum to au8522.h from au8522_priv.h to export them. This will allow au0828-core to use these defines instead of hard-coding them them. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: v4l-core add enable/disable source common interfacesShuah Khan2016-02-273-1/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new interfaces to be used by v4l-core to invoke enable source and disable_source handlers in the media_device. The enable_source helper function invokes the enable_source handler to find media source entity connected to the entity and check is it is available or busy. If source is available, link is activated and pipeline is started. The disable_source helper function invokes the disable_source handler to deactivate and stop the pipeline. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: Media Controller non-locking __media_entity_pipeline_start/stop()Shuah Khan2016-02-272-10/+43
| | | | | | | | | | | | | | | | | | Add non-locking __media_entity_pipeline_start/stop() interfaces to be called from code paths that hold the graph_mutex. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media: Media Controller export non locking __media_entity_setup_link()Shuah Khan2016-02-271-0/+1
| | | | | | | | | | | | | | | | Export __media_entity_setup_link() to be used from code paths that hold the graph_mutex. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>