[go: nahoru, domu]

History log of /drivers/media/usb/hdpvr/hdpvr-video.c
Revision Date Author Comments
93e6a855fff6bbf95486975e193c13faba47775d 05-Jul-2014 Hans Verkuil <hverkuil@xs4all.nl> [media] hdpvr: fix reported HDTV colorspace

The colorspace for HDTV is REC709, not SMPTE240M.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
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>
3445857b22eafb70a6ac258979e955b116bfd2c6 16-Jun-2014 Hans Verkuil <hverkuil@xs4all.nl> [media] hdpvr: fix two audio bugs

When the audio encoding is changed the driver calls hdpvr_set_audio
with the current opt->audio_input value. However, that should have
been opt->audio_input + 1. So changing the audio encoding inadvertently
changes the input as well. This bug has always been there.

The second bug was introduced in kernel 3.10 and that broke the
default_audio_input module option handling: the audio encoding was
never switched to AC3 if default_audio_input was set to 2 (SPDIF input).

In addition, since starting with 3.10 the audio encoding is always set
at the start the first bug now always happens when the driver is loaded.
In the past this bug would only surface if the user would change the
audio encoding after the driver was loaded.

Also fixes a small trivial typo (bufffer -> buffer).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Scott Doty <scott@corp.sonic.net>
Cc: stable@vger.kernel.org # for v3.10 and up
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
ef1ed8f5d366a035e532456bd747d34e5cb01ee5 15-Aug-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] v4l2-dv-timings: rename v4l_match_dv_timings to v4l2_match_dv_timings

It's the only function in v4l2-dv-timings.c with the v4l prefix instead
of v4l2. Make it consistent with the other functions.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
eacf8f9aa80e2231af43b589cfc18c054e417220 29-Jul-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] v4l2: use new V4L2_DV_BT_BLANKING/FRAME defines

Use the new defines to calculate the full blanking and frame sizes.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2576415846bcbad3c0a6885fc44f950837106364 29-Jul-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] v4l2: move dv-timings related code to v4l2-dv-timings.c

v4l2-common.c contained a bunch of dv-timings related functions.
Move that to the new v4l2-dv-timings.c which is a more appropriate
place for them.
There aren't many drivers that do HDTV, so it is a good idea to separate
common code related to that into a module of its own.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
5f454d82e5958e59c16580b9b4531f4bbc7231f7 29-May-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] hdpvr: improve error handling

get_video_info() should never return EFAULT, instead it should return
the low-level usb_control_msg() error. Add a valid field to the hdpvr_video_info
struct so the driver can easily check if a valid format was detected.
Whenever get_video_info is called and it returns an error (e.g. usb_control_msg
failed), then return that error to userspace as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
79f10b625e5eff93c8fad54ba345e5f35feb8461 29-May-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] hdpvr: code cleanup

Remove an unnecessary 'else' and invert a condition which makes the code
more readable.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
ab6e134a48a58b111f28dfb5c8440a56d6be10c5 29-May-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] hdpvr: fix querystd 'unknown format' return

If no format has been detected, then querystd should return V4L2_STD_UNKNOWN,
not V4L2_STD_ALL.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
4d601c4ca272959ba837b8279f4873b55caaf619 13-May-2013 Leonid Kegulskiy <leo@lumanate.com> [media] hdpvr: Removed unnecessary use of kzalloc() in get_video_info()

[mchehab@redhat.com: CodingStyle fixes]
Signed-off-by: Leonid Kegulskiy <leo@lumanate.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
f74368769048a803e7a7a3dac6434833f563d3bd 25-Apr-2013 Leonid Kegulskiy <leo@lumanate.com> [media] hdpvr: Added some error handling in hdpvr_start_streaming()

Signed-off-by: Leonid Kegulskiy <leo@lumanate.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
5854bf88599545572ce89fba6c4fa0bf6b6e226c 10-Apr-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] hdpvr: allow g/s/enum/querystd when in legacy mode

Both MythTV and gstreamer expect that they can set/get/query/enumerate the
standards, even if the input is the component input for which standards
really do not apply.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
3315c59a45d5314c935a7dd82ab3c324c0d01343 20-Mar-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] hdpvr: add dv_timings support

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
8f69da955873f5e33b60ff117856a2bf1309a336 19-Mar-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] hdpvr: add g/querystd, remove deprecated current_norm

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
97caa318b3ced2241cf1eda772a72c9c2ea19abb 12-Feb-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] hdpvr: small fixes

- return EBUSY instead of EAGAIN.
- add missing break.
- remove unnecessary buf type check (done by the core).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
41022fcb3db75c9777bbd05da114c7eb597694df 12-Feb-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] hdpvr: support device_caps in querycap

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
65fe42d6054bb84c4abc4168310bd5d7c462456e 12-Feb-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] hdpvr: add prio and control event support

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
ede197aac0c64021a0b2139d19edd8fa066530c2 06-Apr-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] hdpvr: remove hdpvr_fh and just use v4l2_fh

This prepares the driver for priority and control event handling.
This patch also checks for correct streaming ownership and it makes a
small improvement to the encoder_cmd ioctls: always zero 'flags' and
drop the memset of 'raw' as that is already done by the v4l2 core.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
99c77aa4281c41fab255a4eb25ccc36a8c2e113d 19-Mar-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] hdpvr: convert to the control framework

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>
54d80904b4c1f7aa1d569d07ca3e62fba0daf3a2 21-Mar-2013 Mauro Carvalho Chehab <mchehab@redhat.com> [media] hdpvr-video: Use the proper check for I2C support

As reported by Geert Uytterhoeven <geert@linux-m68k.org>:
drivers/media/usb/hdpvr/hdpvr-video.c: warning: "CONFIG_I2C_MODULE" is not defined [-Wundef]

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Thanks-to: Randy Dunlap <rdunlap@infradead.org>
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>