History log of /drivers/media/usb/tm6000/tm6000-video.c
Revision Date Author Comments
d52e23813672c3c72f92e7b39c7408d4b9a40a96 27-May-2014 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> [media] v4l: Support extending the v4l2_pix_format structure

The v4l2_pix_format structure has no reserved field. It is embedded in
the v4l2_framebuffer structure which has no reserved fields either, and
in the v4l2_format structure which has reserved fields that were not
previously required to be zeroed out by applications.

To allow extending v4l2_pix_format, inline it in the v4l2_framebuffer
structure, and use the priv field as a magic value to indicate that the
application has set all v4l2_pix_format extended fields and zeroed all
reserved fields following the v4l2_pix_format field in the v4l2_format
structure.

The availability of this API extension is reported to userspace through
the new V4L2_CAP_EXT_PIX_FORMAT capability flag. Just checking that the
priv field is still set to the magic value at [GS]_FMT return wouldn't
be enough, as older kernels don't zero the priv field on return.

To simplify the internal API towards drivers zero the extended fields
and set the priv field to the magic value for applications not aware of
the extensions.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
95cd5d5ee67c2108765ae87d34761d54fd6671ce 19-Jun-2014 Ramakrishnan Muthukrishnan <ramakrmu@cisco.com> [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO

Since all the drivers that use `struct v4l2_fh' use the core
priority checking, the setting of the flag in the drivers can
be removed.

Signed-off-by: Ramakrishnan Muthukrishnan <ramakrmu@cisco.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
8774bed9ce832d8d9ccb79e92800b808aa2d2ad2 28-Apr-2014 Laurent Pinchart <laurent.pinchart@ideasonboard.com> [media] v4l: subdev: Move [gs]_std operation to video ops

The g_std and s_std operations are video-related, move them to the video
ops where they belong.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
804be2d4933a44ce76bce3d12b09c5db980523a4 03-Jun-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] tm6000: remove deprecated current_norm

Replace current_norm by g_std. Also initialize the standard to the more
common NTSC-M format (which is also what current_norm used).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
314527acbbb3f33f72c2ef19d8cfabcada9912a5 15-Mar-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] v4l2: pass std by value to the write-only s_std ioctl

This ioctl is defined as IOW, so pass the argument by value instead of by
reference. I could have chosen to add const instead, but this is 1) easier
to handle in drivers and 2) consistent with the s_std subdev operation.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2f73c7c582a685b3198b974cd6d964d0338f8ab5 15-Mar-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] v4l2: add const to argument of write-only s_tuner ioctl

This ioctl is defined as IOW, so pass the argument as const.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
b530a447bb588fdf43fdf4eb909e4ee1921d47ac 19-Mar-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] v4l2: add const to argument of write-only s_frequency ioctl

This ioctl is defined as IOW, so pass the argument as const.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
82f0efbcd3c4e6bf7cdfeed5c901b812e6d30f92 07-Feb-2013 Hans Verkuil <hverkuil@xs4all.nl> [media] tm6000: fix an uninitialized variable

tm6000_poll could use an uninitialized buf pointer. Move the buf-handling
code inside the 'if' that initializes the buf pointer.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
ed57256f6fe8882cf6dde8d99f5fac5fd84c5a2d 01-Feb-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] tm6000: fix G/TRY_FMT

Two fixes:
- the priv field wasn't set to 0.
- only V4L2_FIELD_INTERLACED is supported.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
52dec548d4244d9ec86c58e5696e1d4ee98c7b3c 11-Sep-2012 Hans Verkuil <hans.verkuil@cisco.com> [media] tm6000: add poll op for radio device node

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
e618578dd828458f35c2cd16edfa7a1dba07ce43 11-Sep-2012 Hans Verkuil <hans.verkuil@cisco.com> [media] tm6000: set colorspace field

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
770056c47fbb5c4d892d1cd55ae5ec68cf44c2b4 11-Sep-2012 Hans Verkuil <hans.verkuil@cisco.com> [media] tm6000: add support for control events and prio handling

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9f7473592bd2c8d73657dcc1644de4ab610b0d90 31-Jan-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] tm6000: convert to the control framework

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2c2a053626cb712d6006cb10f2760a6018a65631 11-Sep-2012 Hans Verkuil <hans.verkuil@cisco.com> [media] tm6000: fix querycap and input/tuner compliance issues

- add device_caps support
- fix bus_info
- fix numerous tuner-related problems due to incorrect tests
and setting v4l2_tuner fields to wrong values.
- remove (audio) input support from the radio: it doesn't belong
there. This also fixed a nasty issue where opening the radio
would set dev->input to 5 for no good reason. This was never
set back to a valid TV input after closing the radio device,
thus leaving it at 5 which is out of bounds of the vinput
card array.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
8e6057b510aad354e017c6dfca7f386a0eb91b63 15-Sep-2012 Sakari Ailus <sakari.ailus@iki.fi> [media] v4l: Convert drivers to use monotonic timestamps

Convert drivers using wall clock time (CLOCK_REALTIME) to timestamp from the
monotonic timer (CLOCK_MONOTONIC).

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
b391b0ef0f9399dcba8fa025ab5e5d4229847467 20-Dec-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tm6000-video.c: warning fix

drivers/media/usb/tm6000/tm6000-video.c: In function '__check_keep_urb':
drivers/media/usb/tm6000/tm6000-video.c:1926:1: warning: return from incompatible pointer type [enabled by default]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16427faf28674451a7a0485ab0a929402f355ffd 04-Oct-2012 Julian Scheel <julian@jusst.de> [media] tm6000: Add parameter to keep urb bufs allocated

On systems where it cannot be assured that enough continous memory is available
all the time it can be very useful to only allocate the memory once when it is
needed the first time. Afterwards the initially allocated memory will be
reused, so it is ensured that the memory will stay available until the driver
is unloaded.

[mchehab@redhat.com: Codingstyle fixups]
Signed-off-by: Julian Scheel <julian@jusst.de>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
97b55f6a4607cc459da0e857b03f90f3667338f9 06-Sep-2012 Peter Senna Tschudin <peter.senna@gmail.com> [media] drivers/media/usb/tm6000/tm6000-video.c: fix error return code

Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
0e8025b9f6011a6bd69d01080d584bc95a89d02e 04-Sep-2012 Hans Verkuil <hans.verkuil@cisco.com> [media] v4l2: make vidioc_s_audio const

Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_audio.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
0c0d06cac63ee327ceaab4b5ffe2206574ab86bd 14-Aug-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] rename most media/video usb drivers to media/usb

Rename all USB drivers with their own directory under
drivers/media/video into drivers/media/usb and update the
building system.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>