aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-12-23[media] coda: don't start streaming without queued buffersPhilipp Zabel1-10/+3
We could support start streaming with an empty output queue for the BIT decoders due to the bitstream buffer which could still contain data at this point, but there is really no reason for userspace to expect this to work. Simplify the code by disallowing it. Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Kamil Debski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-23[media] coda: hook up vidioc_prepare_bufPhilipp Zabel1-0/+1
Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Kamil Debski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-23[media] coda: relax coda_jpeg_check_buffer for trailing bytesPhilipp Zabel3-8/+22
coda_jpeg_check_buffer only cares about the buffer length and contents, so change the parameter type back from v4l2_vb2_buffer to just the vb2_buffer. Instead of just checking the first and last bytes for the SOI and EOI markers, relax the EOI marker check a bit and allow up to 32 trailing bytes after the EOI marker as hardware generated JPEGs sometimes contain some alignment overhead. Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Kamil Debski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-23[media] coda: make to_coda_video_device staticPhilipp Zabel1-1/+2
This function is not used outside coda-common.c. Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Kamil Debski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-23[media] s5p-mfc: remove volatile attribute from MFC register addressesAndrzej Hajda1-244/+244
MFC register addresses are used only by writel/readl macros which already takes care of proper register accessing. Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Kamil Debski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-23[media] s5p-mfc: merge together s5p_mfc_hw_call and s5p_mfc_hw_call_voidAndrzej Hajda6-58/+52
Both macros can be merged into one. Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Kamil Debski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-23[media] s5p-mfc: use spinlock to protect MFC contextAndrzej Hajda6-70/+11
MFC driver uses dev->irqlock spinlock to protect queues only, but many context fields require protection also - they can be accessed concurrently from IOCTLs and IRQ handler. The patch increases protection range of irqlock to those fields also. Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Kamil Debski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-23[media] s5p-mfc: remove unnecessary callbacksAndrzej Hajda3-102/+0
Many version specific functions are not called by common code, so there is no need to use callbacks. Additionally some of them are not used at all, so they can be safely removed. Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Kamil Debski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-23[media] s5p-mfc: make queue cleanup code commonAndrzej Hajda7-50/+23
Code for queue cleanup has nothing specific to hardware version. Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Kamil Debski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-23[media] s5p-mfc: use one implementation of s5p_mfc_get_new_ctxAndrzej Hajda4-45/+21
Both version of MFC driver use functions with the same body and name. The patch moves them to common location. It also simplifies it. Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Kamil Debski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-23[media] s5p-mfc: constify s5p_mfc_codec_ops structuresJulia Lawall5-7/+7
The s5p_mfc_codec_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Kamil Debski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-21[media] au8522: Avoid memory leak for device config dataMauro Carvalho Chehab4-26/+16
As reported by kmemleak: unreferenced object 0xffff880321e1da40 (size 32): comm "modprobe", pid 3309, jiffies 4295019569 (age 2359.636s) hex dump (first 32 bytes): 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 G............... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<ffffffff82278c8e>] kmemleak_alloc+0x4e/0xb0 [<ffffffff8153c08c>] kmem_cache_alloc_trace+0x1ec/0x280 [<ffffffffa13a896a>] au8522_probe+0x19a/0xa30 [au8522_decoder] [<ffffffff81de0032>] i2c_device_probe+0x2b2/0x490 [<ffffffff81ca7004>] driver_probe_device+0x454/0xd90 [<ffffffff81ca7c1b>] __device_attach_driver+0x17b/0x230 [<ffffffff81ca15da>] bus_for_each_drv+0x11a/0x1b0 [<ffffffff81ca6a4d>] __device_attach+0x1cd/0x2c0 [<ffffffff81ca7d43>] device_initial_probe+0x13/0x20 [<ffffffff81ca451f>] bus_probe_device+0x1af/0x250 [<ffffffff81c9e0f3>] device_add+0x943/0x13b0 [<ffffffff81c9eb7a>] device_register+0x1a/0x20 [<ffffffff81de8626>] i2c_new_device+0x5d6/0x8f0 [<ffffffffa0d88ea4>] v4l2_i2c_new_subdev_board+0x1e4/0x250 [v4l2_common] [<ffffffffa0d88fe7>] v4l2_i2c_new_subdev+0xd7/0x110 [v4l2_common] [<ffffffffa13b2f76>] au0828_card_analog_fe_setup+0x2e6/0x3f0 [au0828] Checking where the error happens: (gdb) list *au8522_probe+0x19a 0x99a is in au8522_probe (drivers/media/dvb-frontends/au8522_decoder.c:761). 756 printk(KERN_INFO "au8522_decoder attach existing instance.\n"); 757 break; 758 } 759 760 demod_config = kzalloc(sizeof(struct au8522_config), GFP_KERNEL); 761 if (demod_config == NULL) { 762 if (instance == 1) 763 kfree(state); 764 return -ENOMEM; 765 } Shows that the error path is not being handled properly. The are actually several issues here: 1) config free should have been calling hybrid_tuner_release_state() function, by calling au8522_release_state(); 2) config is only allocated at the digital part. On the analog one, it is received from the caller. A complex logic could be added to address it, however, it is simpler to just embeed config inside the state. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-21[media] ir-lirc-codec.c: don't leak lirc->drv-rbufMauro Carvalho Chehab1-0/+1
As reported by kmemleak: unreferenced object 0xffff8802adae0ba0 (size 192): comm "modprobe", pid 3024, jiffies 4296503588 (age 324.368s) hex dump (first 32 bytes): 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... ff ff ff ff ff ff ff ff c0 48 25 a0 ff ff ff ff .........H%..... backtrace: [<ffffffff82278c8e>] kmemleak_alloc+0x4e/0xb0 [<ffffffff8153c08c>] kmem_cache_alloc_trace+0x1ec/0x280 [<ffffffffa0250f0d>] ir_lirc_register+0x8d/0x7a0 [ir_lirc_codec] [<ffffffffa07372b8>] ir_raw_event_register+0x318/0x4b0 [rc_core] [<ffffffffa07351ed>] rc_register_device+0xf2d/0x1450 [rc_core] [<ffffffffa13c5451>] au0828_rc_register+0x7d1/0xa10 [au0828] [<ffffffffa13b0dc2>] au0828_usb_probe+0x6c2/0xcf0 [au0828] [<ffffffff81d7619d>] usb_probe_interface+0x45d/0x940 [<ffffffff81ca7004>] driver_probe_device+0x454/0xd90 [<ffffffff81ca7a61>] __driver_attach+0x121/0x160 [<ffffffff81ca141f>] bus_for_each_dev+0x11f/0x1a0 [<ffffffff81ca5d4d>] driver_attach+0x3d/0x50 [<ffffffff81ca5039>] bus_add_driver+0x4c9/0x770 [<ffffffff81ca944c>] driver_register+0x18c/0x3b0 [<ffffffff81d71e58>] usb_register_driver+0x1f8/0x440 [<ffffffffa13680b7>] 0xffffffffa13680b7 0xf3d is in ir_lirc_register (drivers/media/rc/ir-lirc-codec.c:348). 343 drv = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL); 344 if (!drv) 345 return rc; 346 347 rbuf = kzalloc(sizeof(struct lirc_buffer), GFP_KERNEL); 348 if (!rbuf) 349 goto rbuf_alloc_failed; 350 351 rc = lirc_buffer_init(rbuf, sizeof(int), LIRCBUF_SIZE); 352 if (rc) Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] uvcvideo: small cleanup in uvc_video_clock_update()Dan Carpenter1-1/+1
Smatch is not smart enough to see that "&stream->clock.lock" and "&clock->lock" are the same thing so it complains about the locking here. Let's make it more consistent. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] uvcvideo: Fix reading the current exposure value of UVCAnton V. Shokurov1-1/+2
V4L2_CID_EXPOSURE_ABSOLUTE property does not return an updated value when autoexposure (V4L2_CID_EXPOSURE_AUTO) is turned on. This patch fixes this issue by adding the UVC_CTRL_FLAG_AUTO_UPDATE flag. Tested on a C920 camera. Signed-off-by: Anton V. Shokurov <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] cx23885-dvb: move initialization of a8293_pdataMauro Carvalho Chehab1-3/+5
Smatch complains about where the au8293_data is placed: drivers/media/pci/cx23885/cx23885-dvb.c:2174 dvb_register() info: 'a8293_pdata' is not actually initialized (unreached code). It is not actually expected to have such initialization at switch { foo = bar; case: ... } Not really sure how gcc does that, but this is something that I would expect that different compilers would do different things. David Howells checked with the compiler people: it's not really expected to initialise as expected. So, move the initialization outside the switch(), making smatch to shut up one warning. Acked-by: David Howells <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] cx23885-dvb: initialize a8293_pdataMauro Carvalho Chehab1-1/+1
As reported by smatch: drivers/media/pci/cx23885/cx23885-dvb.c:2174 dvb_register() info: 'a8293_pdata' is not actually initialized (unreached code). Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] videobuf2: avoid memory leak on errorsMauro Carvalho Chehab1-2/+4
As reported by smatch: drivers/media/v4l2-core/videobuf2-core.c:2415 __vb2_init_fileio() warn: possible memory leak of 'fileio' While here, avoid the usage of sizeof(struct foo_struct). Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] videobuf2-core: fix plane_sizes handling in VIDIOC_CREATE_BUFSHans Verkuil2-19/+24
The handling of q->plane_sizes was wrong in vb2_core_create_bufs(). The q->plane_sizes array was global and it was overwritten by create_bufs. So if reqbufs was called with e.g. size 100000 then q->plane_sizes[0] would be set to 100000. If create_bufs was called afterwards with size 200000, then q->plane_sizes[0] would be overwritten with the new value. Calling create_bufs again for size 100000 would cause an error since 100000 is now less than q->plane_sizes[0]. This patch fixes this problem by 1) removing q->plane_sizes and using the vb->planes[].length field instead, and 2) by introducing a min_length field in struct vb2_plane. This field is set to the plane size as returned by the queue_setup op and is the minimum required plane size. So user pointers or dmabufs should all be at least this size. Signed-off-by: Hans Verkuil <[email protected]> Reported-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] videobuf2-core: call __setup_offsets before buf_init()Hans Verkuil1-26/+16
Ensure that the offsets are correct before buf_init() is called. As a consequence the __setup_offsets() function now sets up the offsets for the given buffer instead of for all new buffers. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] videobuf2-core: fill in q->bufs[vb->index] before buf_init()Hans Verkuil1-2/+3
Fill in q->bufs[vb->index] before the call to buf_init: it makes sense that this is initialized correctly. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] videobuf2-core: move __setup_lengths into __vb2_queue_alloc()Hans Verkuil1-21/+3
Rather than setting up the lengths at the end, set them up when the vb2_buffer is allocated. This also ensures that buf_init() sees the right length values. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] videobuf2-core: fill_user_buffer and copy_timestamp should return voidHans Verkuil3-25/+31
This ops can never fail, so make these void functions. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] videobuf2-core.c: update module descriptionHans Verkuil1-1/+1
This module is no longer V4L2 specific, so update the module description accordingly. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] media: videobuf2: Move vb2_fileio_data and vb2_thread to core partJunghak Sung5-818/+817
Move things related with vb2 file I/O and vb2_thread without doing any functional changes. After that, videobuf2-internal.h is removed because it is not necessary any more. Signed-off-by: Junghak Sung <[email protected]> Signed-off-by: Geunyoung Kim <[email protected]> Acked-by: Seung-Woo Kim <[email protected]> Acked-by: Inki Dae <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] media: videobuf2: Refactor vb2_fileio_data and vb2_threadJunghak Sung1-55/+49
Replace v4l2-stuffs with common things in struct vb2_fileio_data and vb2_thread(). Signed-off-by: Junghak Sung <[email protected]> Signed-off-by: Geunyoung Kim <[email protected]> Acked-by: Seung-Woo Kim <[email protected]> Acked-by: Inki Dae <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] media: videobuf2: last_buffer_queued is set at fill_v4l2_buffer()Junghak Sung1-4/+5
The location in which last_buffer_queued is set is moved to fill_v4l2_buffer(). So, __vb2_perform_fileio() can use vb2_core_dqbuf() instead of vb2_internal_dqbuf(). Signed-off-by: Junghak Sung <[email protected]> Signed-off-by: Geunyoung Kim <[email protected]> Acked-by: Seung-Woo Kim <[email protected]> Acked-by: Inki Dae <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] media: videobuf2: Separate vb2_poll()Junghak Sung1-34/+59
Separate vb2_poll() into core and v4l2 part. Signed-off-by: Junghak Sung <[email protected]> Signed-off-by: Geunyoung Kim <[email protected]> Acked-by: Seung-Woo Kim <[email protected]> Acked-by: Inki Dae <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] media: videobuf2: Add copy_timestamp to struct vb2_queueJunghak Sung3-20/+17
Add copy_timestamp to struct vb2_queue as a flag set if vb2-core should copy timestamps. Signed-off-by: Junghak Sung <[email protected]> Signed-off-by: Geunyoung Kim <[email protected]> Acked-by: Seung-Woo Kim <[email protected]> Acked-by: Inki Dae <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] media: videobuf2: Move timestamp to vb2_bufferJunghak Sung71-106/+108
Move timestamp from struct vb2_v4l2_buffer to struct vb2_buffer for common use, and change its type to u64 in order to handling y2038 problem. This patch also includes all device drivers' changes related to this restructuring. Signed-off-by: Junghak Sung <[email protected]> Signed-off-by: Geunyoung Kim <[email protected]> Acked-by: Seung-Woo Kim <[email protected]> Acked-by: Inki Dae <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] solo6x10: use v4l2_get_timestamp to fill in buffer timestampHans Verkuil1-2/+1
The timestamp of a v4l2_buffer was advertised as being CLOCK_MONOTONIC, but instead a timestamp from a header field was used. This is inconsistent and not what applications expect. Use v4l2_get_timestamp to properly set the timestamp. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] DocBook media: update VIDIOC_CREATE_BUFS documentationHans Verkuil1-16/+14
During the Seoul media workshop we decided to relax the VIDIOC_CREATE_BUFS specification so it would no longer require drivers to validate the format field since almost no driver did that anyway. Instead drivers use the buffer size(s) based on the format type and the corresponding format fields and will ignore any other fields. If the size cannot be used an error is returned, otherwise the size is used as-is. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] vb2: drop v4l2_format argument from queue_setupHans Verkuil81-520/+356
The queue_setup callback has a void pointer that is just for V4L2 and is the pointer to the v4l2_format struct that was passed to VIDIOC_CREATE_BUFS. The idea was that drivers would use the information from that struct to buffers suitable for the requested format. After the vb2 split series this pointer is now a void pointer, which is ugly, and the reality is that all existing drivers will effectively just look at the sizeimage field of v4l2_format. To make this more generic the queue_setup callback is changed: the void pointer is dropped, instead if the *num_planes argument is 0, then use the current format size, if it is non-zero, then it contains the number of requested planes and the sizes array contains the requested sizes. If either is unsupported, then return -EINVAL, otherwise use the requested size(s). Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] cx23885: video instead of vbi register usedHans Verkuil1-2/+1
The VID_A_GPCNT register is for video, not vbi. Read from the right register and don't write to the video register. Based upon Devin's initial patch made for an older kernel which I cleaned up and rebased. Thanks to Kernel Labs for that work. Signed-off-by: Devin Heitmueller <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] cx23885: add support for ViewCast 260e and 460eHans Verkuil6-1/+132
Add support for these two new cards. Based upon Devin's initial patch made for an older kernel which I cleaned up and rebased. Thanks to Kernel Labs for that work. Signed-off-by: Devin Heitmueller <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] cs3308: add new 8-channel volume control driverHans Verkuil4-0/+158
Add simple support for this 8 channel volume control driver. Currently all it does is to unmute all 8 channels. Based upon Devin's initial patch made for an older kernel which I cleaned up and rebased. Thanks to Kernel Labs for that work. Signed-off-by: Devin Heitmueller <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] cx25840: initialize the standard to NTSC_MHans Verkuil1-1/+2
This is necessary since the *_std_setup functions rely on a valid state->std field. Also fix the cx23888_std_setup() to test for 60Hz instead of NTSC, just like cx25840_std_setup() does. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] cx25840: fix cx25840_s_stream for cx2388x and cx231xxHans Verkuil1-18/+19
For those two devices the code wrote to addresses 0x115/6, but on those devices those addresses have nothing to do with power controls. So clearly this never worked. Rather than writing to bogus addresses, just do nothing for the cx2388x and cx231xx. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] cx25840: relax a Vsrc checkHans Verkuil1-1/+7
The cx23888 reports a slightly different Vsrc value than the other chip variants do. Relax the check by 1, otherwise cx25840_set_fmt() would fail for the cx23888. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] cx25840: more cx23888 register address changesHans Verkuil1-26/+23
The cx23888 also moves the following registers around: !cx23888 cx23888 -------- ------- 0x418, 0x41c 0x434, 0x438 0x420 0x418 (expect for bit 29 which has a different meaning) 0x478 0x454 Also drop the set_input code where the scaler is changed: this does not belong here, changing the input should not change the scaler. And that's besides the fact that that code is plain wrong. After this change the cx23888 behaves much better. In particular, calling set_input no longer changes the saturation to 0, causing a grayscale image. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] cx25840: fix VBI support for cx23888Hans Verkuil3-19/+34
The cx23888 has the VBI registers at different addresses compared to the other variants. In most cases it is a fixed offset, but not always. Update the code so the right registers are written for the cx23888. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] ivtv/cx18: fix inverted pixel aspect ratioHans Verkuil2-6/+6
These two drivers reported the pixel aspect ratio the wrong way around. This caused qv4l2 to scale the image incorrectly. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] cx231xx: fix NTSC cropcap, add missing cropcap for 417Hans Verkuil2-2/+25
The pixelaspect ratio was set incorrectly for 60Hz formats. And since cropcap wasn't implemented at all for the -417 (compressed video) the pixelaspect was unknown for compressed video. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-18[media] cx23885: fix format/crop handlingHans Verkuil2-6/+38
While testing the cx23885 driver with various TV standards I found a number of bugs: 1) norm_maxw() returned 768 instead of 720 for PAL formats. This should always be 720, so drop this inline function and just always use 720. 2) cropcap() was missing, so the pixelaspect was never known and qv4l2 would scale the image incorrectly. Add cropcap support. 3) cx23885_set_tvnorm() should just return 0 if the same standard was set again. If another standard is set, then reset the width/height and call set_fmt for the subdevs. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-12Revert "[media] UVC: Add support for ds4 depth camera"Mauro Carvalho Chehab3-35/+0
This reverts commit 120c41d3477a23c6941059401db63677736f1935. The patch doesn't add the corresponding documentation bits to the media infrastructure uAPI DocBook. Also, they're for 3D formats, with requre further discussions. Requested-by: Hans Verkuil <[email protected]> Requested-by: Laurent Pinchart <[email protected]>
2015-12-04[media] use https://linuxtv.org for LinuxTV URLsMauro Carvalho Chehab42-64/+64
While https was always supported on linuxtv.org, only in Dec 3 2015 the website is using valid certificates. As we're planning to drop pure http support on some future, change all references at the media subsystem to point to the https URL instead. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-04drm, ipu-v3: use https://linuxtv.org for LinuxTV URLMauro Carvalho Chehab2-2/+2
While https was always supported on linuxtv.org, only in Dec 3 2015 the website is using valid certificates. As we're planning to drop pure http support on some future, change the references at DRM include and at the ipu-v3 driver to point to the https://linuxtv.org URL instead. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-04WHENCE: use https://linuxtv.org for LinuxTV URLsMauro Carvalho Chehab1-1/+1
While https was always supported on linuxtv.org, only in Dec 3 2015 the website is using valid certificates. As we're planning to drop pure http support on some future, change the http://linuxtv.org references at firmware/WHENCE file to point to https://linuxtv.org instead. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-04MAINTAINERS: use https://linuxtv.org for LinuxTV URLsMauro Carvalho Chehab1-96/+96
While https was always supported on linuxtv.org, only in Dec 3 2015 the website is using valid certificates. As we're planning to drop pure http support on some future, change all references at MAINTAINERS file to point to the https URL instead. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-12-03[media] staging: media: lirc: Replace timeval with ktime_t in lirc_parallel.cArnd Bergmann1-20/+15
'struct timeval tv' and 'struct timeval now' is used to calculate the elapsed time. 'LIRC_SFH506_DELAY' is a delay t_phl in usecs. 32-bit systems using 'struct timeval' will break in the year 2038, so we have to replace that code with more appropriate types. This patch changes the lirc_parallel.c file of media: lirc driver to use ktime_t. ktime_get() is better than using do_gettimeofday(), because it uses the monotonic clock. ktime_sub is used to subtract two ktime variables. ktime_to_us() is used to convert ktime to microsecond. New ktime_t variable timeout, is added in lirc_off(),to improve clarity. Introduced a new ktime_t variable in lirc_lirc_irq_handler() function, to avoid the use of signal variable for storing seconds in the first part of this function as later it uses a time unit that is defined by the global "timer" variable. This makes it more clear. ktime_set() is used to set a value in seconds to a value in nanosecond so that ktime_compare() can be used appropriately. ktime_compare() is used to compare two ktime values. ktime_add_ns() is used to increment a ktime value by 1 sec. One comment is also shifted a line up, as it was creating a 80 character warning. Build tested it. Also tested it with sparse. Signed-off-by: Tapasweni Pathak <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>