summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [media] sound: Update au0828 quirks tableMauro Carvalho Chehab2014-10-301-1/+9
| | | | | | | | | | | | The au0828 quirks table is currently not in sync with the au0828 media driver. Syncronize it and put them on the same order as found at au0828 driver, as all the au0828 devices with analog TV need the same quirks. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] sound: simplify au0828 quirk tableMauro Carvalho Chehab2014-10-302-127/+36
| | | | | | | | Add a macro to simplify au0828 quirk table. That makes easier to check it against the USB IDs at drivers/media/usb/au0828/au0828-cards.c. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] si2157: add support for SYS_DVBC_ANNEX_BOlli Salonen2014-10-301-0/+3
| | | | | | | | | Set the property for delivery system also in case of SYS_DVBC_ANNEX_B. This behaviour is observed in the sniffs taken with Hauppauge HVR-955Q Windows driver. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] em28xx-dvb: remove unused mfe_sharingMauro Carvalho Chehab2014-10-301-4/+1
| | | | | | This field is not used on this driver anymore. Remove it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] drxk: Fix debug printksMauro Carvalho Chehab2014-10-301-3/+3
| | | | | | | | | | | | This patch partially reverts 0fb220f2a5cb. What happened is that the conversion of debug messages to use pr_debug() was a bad idea, because one needing to debug would need to both enable debug level via a modprobe parameter, and then to enable the dynamic printk's. So, for now, let's use printk() directly at dprintk(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] Documentation: FE_SET_PROPERTY requires R/WMauro Carvalho Chehab2014-10-301-2/+2
| | | | | | | FE_SET_PROPERTY requires to open the devnode on R/W mode, or otherwise it will fail. Document it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dib7000p: get rid of an unused argumentMauro Carvalho Chehab2014-10-301-5/+4
| | | | | | | | | dib7000p is for DVB, and not ISDB. So, there's no layer. That removes this compilation warning: drivers/media/dvb-frontends/dib7000p.c:1972: warning: 'i' is used uninitialized in this function Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] v4l2-ctrls: fix sparse warningHans Verkuil2014-10-281-35/+52
| | | | | | | | | | | | | | | | | The warning is simple: drivers/media/v4l2-core/v4l2-ctrls.c:1685:15: warning: incorrect type in assignment (different address spaces) but the fix isn't. The core problem was that the conversion from user to kernelspace was done at too low a level and that needed to be moved up. That made it possible to drop pointers to v4l2_ext_control from set_ctrl and validate_new and clean up this sparse warning because those functions now always operate on kernelspace pointers. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: davinci: vpbe: return -ENODATA for *dv_timings/*_std callsPrabhakar Lad2014-10-281-3/+15
| | | | | | | | | this patch adds support for returning -ENODATA if the current output doesn't support it. 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>
* [media] media: davinci: vpbe: group v4l2_ioctl_opsPrabhakar Lad2014-10-281-0/+3
| | | | | | | | this patch groups the v4l2_ioctl_ops. 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>
* [media] media: davinci: vpbe: drop unused member memory from vpbe_layerPrabhakar Lad2014-10-281-4/+0
| | | | | | 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>
* [media] media: davinci: vpbe: use helpers provided by core if streaming is ↵Prabhakar Lad2014-10-282-28/+10
| | | | | | | | | | | started this patch uses vb2_is_busy() helper to check if streaming is actually started, instead of driver managing it. 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>
* [media] media: davinci: vpbe: add support for VIDIOC_EXPBUFPrabhakar Lad2014-10-281-0/+1
| | | | | | 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>
* [media] media: davinci: vpbe: add support for VB2_DMABUFPrabhakar Lad2014-10-281-1/+1
| | | | | | 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>
* [media] media: davinci: vpbe: use vb2_ioctl_* helpersPrabhakar Lad2014-10-281-164/+14
| | | | | | | | this patch adds support for using vb2_ioctl_* helpers. 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>
* [media] media: davinci: vpbe: use fh handling provided by v4lPrabhakar Lad2014-10-282-135/+65
| | | | | | | | | this patch converts the driver to use fh handling provided by the v4l core instead of driver doing it. 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>
* [media] media: davinci: vpbe: use vb2_fop_mmap/pollPrabhakar Lad2014-10-281-41/+3
| | | | | | | | this patch teaches vpbe driver to use vb2_fop_mmap/poll helpers. 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>
* [media] media: davinci: vpbe: improve vpbe_buffer_prepare() callbackPrabhakar Lad2014-10-281-15/+8
| | | | | | | | | | | this patch improve vpbe_buffer_prepare() callback, as buf_prepare() callback is never called with invalid state and check for vb2_plane_vaddr(vb, 0) is dropped as payload check should be done unconditionally. 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>
* [media] media: davinci: vpbe: drop buf_cleanup() callbackPrabhakar Lad2014-10-281-24/+0
| | | | | | | | | this patch drops buf_cleanup() callback as this callback is never called with buffer state active. 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>
* [media] media: davinci: vpbe: use vb2_ops_wait_prepare/finish helper functionsPrabhakar Lad2014-10-281-17/+3
| | | | | | | | this patch makes use of vb2_ops_wait_prepare/finish helper functions. 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>
* [media] media: davinci: vpbe: drop buf_init() callbackPrabhakar Lad2014-10-281-10/+0
| | | | | | | | | this patch drops the buf_init() callback as init of buf list is not required. 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>
* [media] media: davinci: vpbe: initialize vb2 queue and DMA context in probePrabhakar Lad2014-10-281-68/+60
| | | | | | | | | this patch moves the initialization of vb2 queue and the DMA context to probe() and clean up in remove() callback respectively. 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>
* [media] s5p-mfc: correct the formats info for encoderayaka2014-10-281-3/+2
| | | | | | | | | | | The NV12M is supported by all the version of MFC, so it is better to use it as default OUTPUT format. MFC v5 doesn't support NV21, I have tested it, for the SEC doc it is not supported either. Signed-off-by: ayaka <ayaka@soulik.info> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: re-queue buffers if start_streaming failsPhilipp Zabel2014-10-281-2/+2
| | | | | | | | | | | Patch b906352c2338 ([media] coda: dequeue buffers if start_streaming fails) incorrectly marked buffers as DEQUEUED in case of start_streaming failure, when in fact they should be set to QUEUED. The videobuf2 core warns about this. Reported-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5p-mfc: fix a race in interrupt flags handlingPawel Osciak2014-10-285-27/+4
| | | | | | | | | | | | | | | | Interrupt result flags have to be cleared before a hardware job is run. Otherwise, if they are cleared asynchronously, we may end up clearing them after the interrupt for which we wanted to wait has already arrived, thus overwriting the job results that we intended to wait for. To prevent this, clear the flags only under hw_lock and before running a hardware job. Signed-off-by: Pawel Osciak <posciak@chromium.org> Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5p-mfc: fix V4L2_CID_MIN_BUFFERS_FOR_CAPTURE on resolution changePawel Osciak2014-10-281-1/+2
| | | | | | | | | | | | G_CTRL on V4L2_CID_MIN_BUFFERS_FOR_CAPTURE will fail if userspace happens to query it after getting a resolution change event and before the codec has a chance to parse the header and switch to an initialized state. Signed-off-by: Pawel Osciak <posciak@chromium.org> Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5p-mfc: Remove unused alloc field from private buffer structPawel Osciak2014-10-281-3/+0
| | | | | | | | | | | This field is no longer used as MFC driver doesn't use vb2 alloc contexts anymore. Signed-off-by: Pawel Osciak <posciak@chromium.org> Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5p-mfc: flush dpbs when resolution changesKiran AVND2014-10-281-18/+2
| | | | | | | | | | | | | | | | | | While resolution change is detected by MFC, we flush out older dpbs, send the resolution change event to application, and then accept further queuing of new src buffers. Sometimes, we error out during dpb flush because of lack of src buffers. Since we have not started decoding new resolution yet, it is simpler to push zero-size buffer until we flush out all dpbs. This is already been done while handling EOS command, and this patch extends the same logic to resolution change as well. Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5p-mfc: De-init MFC when watchdog kicks inArun Mankuzhi2014-10-281-0/+4
| | | | | | | | | | | If the software watchdog kicks in, we need to de-init MFC before reloading firmware and re-intializing it again. Signed-off-by: Arun Mankuzhi <arun.m@samsung.com> Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5p-mfc: modify mfc wakeup sequence for V8Arun Mankuzhi2014-10-281-17/+61
| | | | | | | | | | | MFC wakeup command has to be sent after the host receives firmware load complete status from risc. Signed-off-by: Arun Mankuzhi <arun.m@samsung.com> Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5p-mfc: Don't crash the kernel if the watchdog kicks inPawel Osciak2014-10-281-14/+7
| | | | | | | | | | | | | | | | | | | If the software watchdog kicks in, the watchdog worker is not synchronized with hardware interrupts and does not block other instances. It's possible for it to clear the hw_lock, making other instances trigger a BUG() on hw_lock checks. Since it's not fatal to clear the hw_lock to zero twice, just WARN in those cases for now. We should not explode, as firmware will return errors as needed for other instances after it's reloaded, or they will time out. A clean fix should involve killing other instances when watchdog kicks in, but requires a major redesign of locking in the driver. Signed-off-by: Pawel Osciak <posciak@chromium.org> Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5p-mfc: declare s5p_mfc_bus_reset as staticMauro Carvalho Chehab2014-10-281-1/+1
| | | | | | | | drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:132:5: warning: no previous prototype for 's5p_mfc_bus_reset' [-Wmissing-prototypes] int s5p_mfc_bus_reset(struct s5p_mfc_dev *dev) ^ Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5p-mfc: check mfc bus ctrl before resetKiran AVND2014-10-282-1/+25
| | | | | | | | | | | | | | during reset sequence, it is advisable to follow the below sequence, in order to avoid unexpected behavior from MFC . set SFR 0x7110 MFC_BUS_RESET_CTRL 0x1 // wait for REQ_STATUS to be 1 . get SFR 0x7110 MFC_BUS_RESET_CTRL 0x3 // reset now Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5p-mfc: keep RISC ON during reset for V7/V8Kiran AVND2014-10-282-10/+16
| | | | | | | | | | | | | Reset sequence for MFC V7 and V8 do not need RISC_ON to be set to 0, while for MFC V6 it is still needed. Also, remove a couple of register settings during Reset which are not needed from V6 onwards. Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5p-mfc: Only set timestamp/timecode for new framesIlja Friedel2014-10-281-2/+10
| | | | | | | | | | | | | | | | | | | Timestamp i of a previously decoded buffer was overwritten for some H.264 streams with timestamp i+1 of the next buffer. This happened when encountering frame_type S5P_FIMV_DECODE_FRAME_SKIPPED, indicating no new frame. In most cases this wrong indexing might not have been noticed except for a one frame delay in frame presentation. For H.264 streams though that require reordering of frames for presentation, it caused a slightly erratic presentation time lookup and consequently dropped frames in the Pepper Flash plugin. Signed-off-by: Ilja H. Friedel <ihf@google.com> Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5p-mfc: clear 'enter_suspend' flag if suspend failsPrathyush K2014-10-281-1/+7
| | | | | | | | | | | | | | The enter_suspend flag is set after we enter mfc suspend function but if suspend fails after that due to any reason (like hardware timeout etc), this flag must be cleared before returning an error. Otherwise, this flag never gets cleared and the MFC suspend will always return an error on subsequent tries. If clock off fails, disable hw_lock also. Signed-off-by: Prathyush K <prathyush.k@samsung.com> Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5p-mfc: Fix REQBUFS(0) for encoderPawel Osciak2014-10-281-0/+13
| | | | | | | | | | | Handle REQBUFS(0) for CAPTURE queue as well. Also use the proper queue to call it on for OUTPUT. Signed-off-by: Pawel Osciak <posciak@chromium.org> Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] s5p-mfc: support MIN_BUFFERS query for encoderKiran AVND2014-10-281-0/+42
| | | | | | | | | | | | Add V4L2_CID_MIN_BUFFERS_FOR_OUTPUT query for encoder. Once mfc encoder state is HEAD_PARSED, which is sequence header produced, dpb_count is avaialable. Let user space query this value. Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: drop JPEG buffers not framed by SOI and EOI markersPhilipp Zabel2014-10-283-0/+24
| | | | | | | | | | This patch adds a quick check for valid JPEG frames before feeding them into the bitstream buffer: Frames that do not begin with the JPEG start of image marker and end with the end of image marker are dropped. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: set bitstream end flag in coda_releasePhilipp Zabel2014-10-281-0/+3
| | | | | | | | | This should fix CODA crashes due to timeouts when stopping the decoding process with SIGINT. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: allow userspace to set compressed buffer size in a certain rangePhilipp Zabel2014-10-282-10/+19
| | | | | | | | | | | | | | For small frame sizes, allocating 1 MiB per compressed buffer is a waste of space. On the other hand, incompressible 1080p data can produce JPEGs larger than 1 MiB at higher quality settings. Allow userspace to set the compressed buffer size and clamp the value to a sensible range. Also set the initial sizeimage to a value inside the range allowed by try_fmt. While at it, reduce the default image size to a maximum of 1920*1088 (otherwise JPEG will default to 8k*8k and 96 MiB buffers). Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: try to only queue a single JPEG into the bitstreamPhilipp Zabel2014-10-281-0/+8
| | | | | | | | | | | With bitstream padding, it is possible to decode a single JPEG in the bitstream immediately. This allows us to only ever queue a single JPEG into the bitstream buffer, except to increase payload over 512 bytes or to back out of hold state. This is a measure to decrease JPEG decoder latency. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: pad input stream for JPEG decoderPhilipp Zabel2014-10-281-0/+20
| | | | | | | | | | Before starting a PIC_RUN, pad the bitstream with 0xff until 256 bytes past the next multiple of 256 bytes, if the buffer to be decoded is the last buffer in the bitstream. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: store bitstream buffer position with buffer metadataPhilipp Zabel2014-10-283-32/+43
| | | | | | | | | | | | | Storing the buffer position in the bitstream with the buffer metadata allows to later use that information to drop metadata for skipped buffers and to determine whether bitstream padding has to be applied. This patch also renames struct coda_timestamp to struct coda_buffer_meta to make clear that it contains more than only the buffer timestamp. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: add CODA7541 JPEG supportPhilipp Zabel2014-10-285-52/+398
| | | | | | | | | | | | | | | | | | | | | This patch adds JPEG encoding and decoding support for CODA7541, using the BIT processor. Separate JPEG encoder and decoder video devices are created due to different streaming behaviour and different supported pixel formats. The hardware can not change subsampling on the fly, but encode and decode 4:2:2 subsampled JPEG images from and into this format. The CODA7541 JPEG decoder uses the bitstream buffer and thus can run without new buffers queued if there is a buffer in the bitstream. Since there is no standard way to store the colorspace used in JPEGs, and to make v4l2-compliance happy, the JPEG format always reports V4L2_COLORSPACE_JPEG. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: add JPEG register definitions for CODA7541Philipp Zabel2014-10-281-0/+7
| | | | | | | | | Add JPEG specific sequence initialization registers and bit definitions. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: split out encoder control setup to specify controls per video ↵Philipp Zabel2014-10-281-7/+13
| | | | | | | | | | | device This patch splits the encoder specific controls out of the main control setup function. This way each video device registers only relevant controls. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: add coda_video_device descriptorsPhilipp Zabel2014-10-282-153/+204
| | | | | | | | | | | | Each video device descriptor determines the name, callback ops, and input and output formats on the corresponding video device. This simplifies coda_enum_fmt and coda_try_fmt a bit and will simplify adding separate video devices for JPEG codecs due to the slightly different behavior in the CodaDx6/CODA7542 case and a separate hardware unit on CODA960. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: identify platform device earlierPhilipp Zabel2014-10-281-11/+9
| | | | | | | | We'll use this information to decide whether to request the JPEG IRQ later. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: add support for planar YCbCr 4:2:2 (YUV422P) formatPhilipp Zabel2014-10-282-1/+26
| | | | | | | | | This patch adds support for the three-plane YUV422P format with one luma plane and two horizontally subsampled chroma planes. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
OpenPOWER on IntegriCloud