[media] cx231xx: fix undefined function cx231xx_g_chip_ident()
This patch:
http://git.linuxtv.org/media_tree.git/commit/b86d15440b683f8634c0cb26fc0861a5bc4913ac
is missing a chunk when compared to an older version:
https://patchwork.kernel.org/patch/2063281/
probably because of an unresolved merging conflict.
This causes the following error:
WARNING: "cx231xx_g_chip_ident" [/home/jena/media_build/v4l/cx231xx.ko] undefined!
Hans Verkuil [Fri, 15 Feb 2013 09:07:13 +0000 (06:07 -0300)]
[media] s2255: don't zero struct v4l2_streamparm
All fields after 'type' are already zeroed by the core framework.
Clearing the full struct also clears 'type', which causes a wrong
type value to be returned.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 15 Feb 2013 09:12:58 +0000 (06:12 -0300)]
[media] s2255: fixes in the way standards are handled
Instead of comparing against STD_NTSC and STD_PAL compare against 60 and
50 Hz formats. That's what you really want.
When the standard is changed, make sure the width and height of the format
are also updated to reflect the current standard.
Also replace the deprecated current_norm by the g_std ioctl.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Instead use v4l2_dbg and v4l2_err. Note that the PDEBUG macro is kept to
make this patch-set less invasive, but it is simply a wrapper around
v4l2_dbg now. Most of the other changes are there to make the dev parameter
for the v4l2_xxx macros available everywhere we do logging.
Signed-off-by: Theodore Kilgore <kilgota@auburn.edu> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 11 Feb 2013 09:31:55 +0000 (06:31 -0300)]
[media] gspca_sonixb: Remove querymenu function (dead code)
We forgot to remove that when sonixb was converted to the control framework.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 11 Feb 2013 09:31:12 +0000 (06:31 -0300)]
[media] gspca_sonixj: Convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] s3c-camif: Fail on insufficient number of allocated buffers
Ensure the driver gets always at least its minimum required
number of buffers allocated by checking actual number of
allocated buffers in vb2_reqbufs(). And free any partially
allocated buffer queue with signaling an error to user space.
Without this patch applications may wait forever to dequeue
a filled buffer, because the hardware didn't even start after
VIDIOC_STREAMON, VIDIOC_QBUF calls, due to insufficient number
of empty buffers.
Kamil Debski [Fri, 25 Jan 2013 09:29:57 +0000 (06:29 -0300)]
[media] vb2: Add support for non monotonic timestamps
Not all drivers use monotonic timestamps. This patch adds a way to set the
timestamp type per every queue.
In addition, set proper timestamp type in drivers that I am sure that use
either MONOTONIC or COPY timestamps. Other drivers will correctly report
UNKNOWN timestamp type instead of assuming that all drivers use monotonic
timestamps.
Hans Verkuil [Sun, 10 Feb 2013 17:37:58 +0000 (14:37 -0300)]
[media] stk-webcam: implement support for count == 0 when calling REQBUFS
The spec specifies that setting count to 0 in v4l2_requestbuffers
should result in releasing any streaming resources and the stream
ownership. Implement this.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Arvydas Sidorenko <asido4@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 4 Feb 2013 12:18:14 +0000 (09:18 -0300)]
[media] stk-webcam: zero the priv field of v4l2_pix_format
The priv field should be set to 0. In this case the driver abused the priv
field for internal housekeeping. Modify the code so priv is no longer used
for that purpose.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Arvydas Sidorenko <asido4@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 10 Feb 2013 17:32:52 +0000 (14:32 -0300)]
[media] stk-webcam: fix querycap and simplify s_input
Add device_caps support to querycap, fill in bus_info correctly and
do not set the version field (let the core handle that).
Also simplify the s_input ioctl.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Arvydas Sidorenko <asido4@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 12 Feb 2013 08:25:38 +0000 (05:25 -0300)]
[media] stk-webcam: add ASUS F3JC to upside-down list
And add an extensive comment relating the history of the upside-down
handling in this driver.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Arvydas Sidorenko <asido4@gmail.com> Thanks-to: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Thu, 7 Feb 2013 16:22:06 +0000 (13:22 -0300)]
[media] cx231xx: disable 417 support from the Conexant video grabber
The 417 support doesn't work. Until someone can dig into this driver to
figure out why it isn't working the 417 support is disabled.
Sometimes you can actually stream a bit, but very soon the whole machine
crashes, so something is seriously wrong.
For the record, this was not introduced by my recent changes to this driver,
it was broken before that.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Colorspace, field and priv were not set, and sizeimage was calculated
using the wrong values (dev->ts1.ts_packet_size and dev->ts1.ts_packet_count
can be 0 at module load).
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 29 Jan 2013 13:50:54 +0000 (10:50 -0300)]
[media] cx231xx: improve std handling
Set the initial standard of subdevices instead of leaving it undefined.
Also update the width and height when a new standard is chosen and
return -EBUSY when attempting to change the standard while videobuf is
busy.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 17 Sep 2012 11:30:07 +0000 (08:30 -0300)]
[media] cx231xx: remove current_norm usage
The use of this field is deprecated since it will not work when multiple
device nodes reference the same video input (the video and vbi nodes in
this case). The norm field should be a device-global value.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 9 Feb 2013 09:41:11 +0000 (06:41 -0300)]
[media] cx231xx: fix vbi compliance issues
Various v4l2-compliance fixes: remove unused sliced VBI functions, zero the
reserved fields of struct v4l2_vbi_format and implement the missing s_fmt_vbi_cap.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Thu, 13 Sep 2012 15:54:36 +0000 (12:54 -0300)]
[media] cx231xx: fix tuner compliance issues
The g_tuner call wasn't passed on to the subdevices, g_frequency didn't
check for invalid tuners and a low-level function that was expected to
return 0 or a negative error returned a positive number instead, causing
s_frequency to return bogus errors.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Thu, 13 Sep 2012 09:17:47 +0000 (06:17 -0300)]
[media] cx231xx: remove broken audio input support from the driver
The audio selection code is broken. Audio and video indices were
mixed up and s_audio would reject changing the audio input to
something else anyway, so what's the point?
All the audio input code has been removed.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 15 Feb 2013 09:56:48 +0000 (06:56 -0300)]
[media] bttv: remove g/s_audio since there is only one audio input
Note that the current driver does not implement enumaudio (so apps cannot
tell that audio inputs are present), it does not set V4L2_CAP_AUDIO, nor
does it set audioset when calling ENUM_INPUT. And G_AUDIO doesn't set the
stereo flag either. So these g/s_audio ioctls are quite pointless and
misleading. Especially since some surveillance boards do not have audio
at all.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 10 Feb 2013 12:24:14 +0000 (09:24 -0300)]
[media] bttv: do not switch to the radio tuner unless it is accessed
Just opening the radio tuner should not cause a switch to the radio tuner.
Only after calling g/s_tuner or g/s_frequency should this happen.
This prevents audio being unmuted as soon as the driver is loaded because
some process opens /dev/radioX just to see what sort of node it is, which
switches on the radio tuner and unmutes audio.
This code can be improved further by actually keeping track of who owns the
tuner and returning -EBUSY if switching tuner modes will cause problems.
But for now just fix the annoying case where on boot the radio turns on
automatically.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Thu, 7 Feb 2013 10:56:11 +0000 (07:56 -0300)]
[media] bttv: fix try_fmt_vid_overlay and setup initial overlay size
try_fmt_vid_overlay should map incorrect sizes and fields to valid values.
It also expects that an initial overlay size is defined so g_fmt_vid_overlay
returns valid information.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 6 Feb 2013 15:43:37 +0000 (12:43 -0300)]
[media] bttv: there may be multiple tvaudio/tda7432 devices
Probe for additional tvaudio devices, and allow tvaudio+tda7432 to
co-exist. My STB TV PCI FM bttv card has a tda7432, a tda9850 and a
tea6420 and with this patch it finally works again (probably for the
first time in many years).
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 6 Feb 2013 15:40:28 +0000 (12:40 -0300)]
[media] bttv: convert to the control framework
Note that the private chroma agc control has been replaced with the standard
CHROMA_AGC control.
Also fixes a mute/automute problem where closing the file handle would force
mute on. That's not what you want since that would make the mute state out of
sync with the mute control. Instead check against the user count.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 6 Feb 2013 15:03:30 +0000 (12:03 -0300)]
[media] bttv: fix field handling inside TRY_FMT
- don't return -EINVAL for invalid field types, handle those as if it
was FIELD_ANY.
- the handling of FIELD_SEQ_BT/TB was wrong as well: if such field formats
aren't supported, then fall back to FIELD_ANY instead of returning an error.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 6 Feb 2013 14:43:07 +0000 (11:43 -0300)]
[media] bttv: disable g/s_tuner and g/s_freq when no tuner present, fix return codes
If no tuner is present, then disable the tuner and frequency ioctls.
We can remove a number of checks from those ioctls testing for the presence
of a tuner.
Also remove some tuner type checks (now done by the core) and fix an
error return when the prio check fails.
Finally some 'unlikely' statements are removed since those only make sense
in tightly often executed loops, otherwise they just clutter up the code.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 9 Sep 2012 12:03:29 +0000 (09:03 -0300)]
[media] bttv: fix querycap and radio v4l2-compliance issues
The querycap ioctl didn't support V4L2_CAP_DEVICE_CAPS and the radio device
implemented audio and video inputs and s_std, which are not part of the radio
API.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Thu, 7 Feb 2013 12:26:14 +0000 (09:26 -0300)]
[media] tlg2300: update MAINTAINERS file
Remove two maintainers: telegent.com no longer exists, so those email
addresses are invalid as well.
Added myself as co-maintainer and change the status to 'Odd Fixes'.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Thu, 31 Jan 2013 09:27:37 +0000 (06:27 -0300)]
[media] tlg2300: fix frequency handling
The usual set of problems: the frequency isn't clamped to the frequency range,
no tuner index check and the frequency isn't initialized properly on module
load.