Commit graph

223816 commits

Author SHA1 Message Date
Mauro Carvalho Chehab
70de39183a [media] saa7134: use rc-core raw decoders for Encore FM 5.3
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:44 -02:00
Stefan Ringel
c1937f8e34 [media] tm6000: add revision check
adding chip revision check

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:44 -02:00
Joe Perches
101b25b55e [media] drivers/media: Use vzalloc
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:44 -02:00
Jean-François Moine
42e142f6b7 [media] gspca - ov519: New sensor ov7660 with bridge ov530 (ov519)
[mchehab@redhat.com: Some CodingStyle fixes]
Tested-by: Anca Emanuel <anca.emanuel@gmail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:44 -02:00
Jean-François Moine
7491f785dd [media] gspca - ov519: Re-initialize the webcam at resume time
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:43 -02:00
Jean-François Moine
b4e96ea30a [media] gspca - ov519: Initialize the ov519 snapshot register
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:43 -02:00
Jean-François Moine
5927abcb21 [media] gspca - ov519: Change the ov519 start and stop sequences
- start and stop streaming are done via the FRAR
- streaming suspend (for control change) is done by video reset

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:43 -02:00
Jean-François Moine
a23acec4bc [media] gspca - ov519: Simplify the LED control functions
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:43 -02:00
Jean-François Moine
e2817029b3 [media] gspca - ov519: Check the disabled controls at start time only
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:43 -02:00
Jean-François Moine
858ea5e941 [media] gspca - ov519: Clearer debug and error messages
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:42 -02:00
Jean-François Moine
f8f20188e8 [media] gspca - ov519: Propagate errors to higher level
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:42 -02:00
Jean-François Moine
83db76886c [media] gspca - ov519: Define the disabled controls in a table
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:42 -02:00
Jean-François Moine
2186780325 [media] gspca - ov519: Set their numbers in the ov519 and ov7670 register names
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:42 -02:00
Jean-François Moine
87bae740fd [media] gspca - ov519: Cleanup source
- move hexadecimal value to lowercase
- remove/add empty lines and spaces
- comment unused macros
- change some comments

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:41 -02:00
Nicolas Kaiser
9be1d6cde9 [media] gspca - cpia1: Fix error check
It looks to me like it was intended to check the return value
at this point.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:41 -02:00
Jean-François Moine
7bbe6b8d1f [media] gspca - ov519: Define the sensor types in an enum
This patch also checks if the sensor is well detected at connection time.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:41 -02:00
Jean-François Moine
d6fa66384b [media] gspca - ov519: Reduce the size of some variables
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:41 -02:00
Jean-François Moine
9d1593a84c [media] gspca - ov519: Change types '__xx' to 'xx'
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:40 -02:00
Jean-François Moine
d65174c06f [media] gspca - ov519: Don't do USB exchanges after disconnection
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:40 -02:00
Jean-François Moine
14653e64e9 [media] gspca - ov519: Handle the snapshot on capture stop when CONFIG_INPUT=m
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:40 -02:00
Hans de Goede
c0b33bdc5b [media] gspca-stv06xx: support bandwidth changing
stv06xx devices have only one altsetting, but the actual used
bandwidth can be programmed through a register. We were already
setting this register lower then the max packetsize of the altsetting
indicates. This patch makes the gspca-stv06xx update the usb descriptor
for the alt setting to reflect the actual packetsize in use, so that
the usb subsystem uses the correct information for scheduling usb transfers.

This patch also tries to fallback to lower speeds in case a ENOSPC error
is received when submitting urbs, but currently this is only supported
with stv06xx cams with the pb0100 sensor, as this is the only one for
which we know how to change the framerate.

This patch is based on an initial incomplete patch by
Lee Jones <lee.jones@canonical.com>

Signed-off-by: Lee Jones <lee.jones@canonical.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:40 -02:00
Steven Toth
bc25068495 [media] saa7164: Checkpatch compliance cleanup
Checkpatch compliance cleanup across files in the saa7164 driver.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:39 -02:00
Dan Carpenter
0e72cc8b8d [media] saa7164: make buffer smaller
This isn't a runtime bug, it's just to make static checkers happy.

In vidioc_querycap() we copy a saa7164_dev ->name driver array into a
v4l2_capability -> driver array.  The ->driver array is only 16 chars
long so ->name also can't be more than 16 characters.

The ->name gets set in v4l2_capability() and it always is less than 16
characters so we can easily make the buffer smaller.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:39 -02:00
Axel Lin
76e4a9a716 [media] tea6415c: return -EIO if i2c_check_functionality fails
If the adapter does not support I2C_FUNC_SMBUS_WRITE_BYTE,
return -EIO instead of 0.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:39 -02:00
Joe Perches
1ce6a14335 [media] drivers/media/video: Update WARN uses
Add missing newlines.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:39 -02:00
VDR User
9e21ccaa69 [media] dvb-usb-gp8psk: get firmware and fpga versions
This patch adds retrieval of firmware and FPGA versions of Genpix devices.
That information is useful for users who experience performance differences
with the various firmware versions, and may want to use a specific firmware
that best suits their needs.

Example dmesg output:
gp8psk: FW Version = 2.09.4 (0x20904)  Build 2009/04/02
gp8psk: FPGA Version = 1

Signed-off-by: Derek Kelly <user.vdr@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:38 -02:00
Mauro Carvalho Chehab
141bb0dc2d [media] cx231xx: Fix i2c support at cx231xx-input
There was a bug at cx231xx-input, where it were registering the remote
controls twice, one via ir-kbd-i2c and another directly.
Also, the patch that added rc_register_device() broke compilation for it.

This patch fixes cx231xx-input by fixing the depends on, to point to the
new symbol, and initializing the scanmask via platform_data.

While here, also fix Kconfig symbol change for IR core dependencies.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:38 -02:00
Mauro Carvalho Chehab
2eb2583277 [media] ir-kbd-i2c: add rc_dev as a parameter to the driver
There are several fields on rc_dev that drivers can benefit. Allow drivers
to pass it as a parameter to the driver.

For now, the rc_dev parameter is optional. If drivers don't pass it, create
them internally. However, the best is to create rc_dev inside the drivers,
in order to fill other fields, like open(), close(), driver_name, etc.
So, a latter patch making it mandatory and changing the caller drivers is
welcome.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:38 -02:00
David Härdeman
5b2e303f6d [media] rc-core: convert winbond-cir
Move winbond-cir from drivers/input/misc/ into drivers/media/rc/
and convert it to use rc-core.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:38 -02:00
David Härdeman
d8b4b5822f [media] ir-core: make struct rc_dev the primary interface
This patch merges the ir_input_dev and ir_dev_props structs into a single
struct called rc_dev. The drivers and various functions in rc-core used
by the drivers are also changed to use rc_dev as the primary interface
when dealing with rc-core.

This means that the input_dev is abstracted away from the drivers which
is necessary if we ever want to support multiple input devs per rc device.

The new API is similar to what the input subsystem uses, i.e:
rc_device_alloc()
rc_device_free()
rc_device_register()
rc_device_unregister()

[mchehab@redhat.com: Fix compilation on mceusb and cx231xx, due to merge conflicts]
Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: Jarod Wilson <jarod@redhat.com>
Tested-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:37 -02:00
David Härdeman
4c7b355df6 [media] rc-core: Code cleanup after merging rc-sysfs and rc-map into rc-main
[mchehab@redhat.com: this patch were originally bundled with some renaming
stuff and with the file merges, as seen at:
https://patchwork.kernel.org/patch/291092/.

Instead of using the original approach, I wrote the rename patches and the
code merge as separate changes, then applied the difference on this patch.
This way, it is easier to see the real changes at the code, and will be easier
to merge upstream, especially if some conflict rises on the renaming patches]

Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: Jarod Wilson <jarod@redhat.com>
Tested-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:37 -02:00
Mauro Carvalho Chehab
631493ecac [media] rc-core: merge rc-map.c into rc-main.c
With this change, all rc-core functions are into just one file, except
for the rc-raw specific functions.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:37 -02:00
Mauro Carvalho Chehab
bc2a6c5719 [media] rc-core: Merge rc-sysfs.c into rc-main.c
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:37 -02:00
Mauro Carvalho Chehab
f62de675f7 [media] Rename rc-core files from ir- to rc-
As protocol decoders are specific to InfraRed, keep their names as-is.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:36 -02:00
Mauro Carvalho Chehab
32cf86f6d1 [media] rename drivers/media/IR to drives/media/rc
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:36 -02:00
David Härdeman
3ffea4988b [media] ir-core: more cleanups of ir-functions.c
cx88 only depends on VIDEO_IR because it needs ir_extract_bits().
Move that function to ir-core.h and make it inline.

Lots of drivers had dependencies on VIDEO_IR when they really
wanted IR_CORE.

The only remaining drivers to depend on VIDEO_IR are bt8xx and
saa7134 (ir_rc5_timer_end is the only function exported by
ir-functions).

Rename VIDEO_IR -> IR_LEGACY to give a hint to anyone writing or
converting drivers to IR_CORE that they do not want a dependency
on IR_LEGACY.

Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:36 -02:00
David Härdeman
62c6503125 [media] ir-core: remove remaining users of the ir-functions keyhandlers
This patch removes the remaining usages of the ir_input_nokey() and
ir_input_keydown() functions provided by drivers/media/IR/ir-functions.c
by using the corresponding functionality in ir-core instead.

Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:35 -02:00
David Härdeman
2997137be8 [media] ir-core: convert drivers/media/video/cx88 to ir-core
This patch converts the cx88 driver (for sampling hw) to use the
decoders provided by ir-core instead of the separate ones provided
by ir-functions (and gets rid of those).

The value for MO_DDS_IO had a comment saying it corresponded to
a 4kHz samplerate. That comment was unfortunately misleading. The
actual samplerate was something like 3250Hz.

The current value has been derived by analyzing the elapsed time
between interrupts for different values (knowing that each interrupt
corresponds to 32 samples).

Thanks to Mariusz Bialonczyk <manio@skyboo.net> for testing my patches
(about one a day for two weeks!) on actual hardware.

Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:35 -02:00
Jarkko Nikula
00df055ae3 [media] radio-si4713: Add regulator framework support
Convert the driver to use regulator framework instead of set_power callback.
This with gpio_reset platform data provide cleaner way to manage chip VIO,
VDD and reset signal inside the driver.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:35 -02:00
Devin Heitmueller
bf797165f0 [media] au0828: enable VBI timeout when calling read() without streamon()
Because some clients (e.g. tvtime) will just open the filehandle and call
read() instead of explicitly calling streamon first, we need to make sure the
VBI timeout routine gets enabled in this case.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:35 -02:00
Devin Heitmueller
78ca500559 [media] au0828: fixes for timeout on no video
The first pass of fixes to cause the driver to continue streaming even when
there is no video arriving over the ITU656 bus were not adequate.  Continue
the work from the previous patch.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:34 -02:00
Devin Heitmueller
6e04b7b95a [media] au0828: continue video streaming even when no ITU-656 coming in
We need the au0828 to continue delivering frames even when the device is not
delivering video, or else applications such as tvtime will block indefinitely.

Unfortunately, the au8522 doesn't have any sort of free-running mode or "blue
screen on no video" like some other decoders.

This work was sponsored by GetWellNetwork Inc.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:34 -02:00
Devin Heitmueller
301c9f26d7 [media] au8522: Handle differences in comb filter config for s-video input
Tweak the comb filter config when in s-video mode to match the Hauppauge
Windows driver values (based on register dumps).

This work was sponsored by GetWellNetwork Inc.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:34 -02:00
Devin Heitmueller
d2c194ce47 [media] au8522: fix clamp control for different video modes
Straighten out the clamp control configurations for the various video modes,
based off of register diffs done against the Hauppauge Windows driver.

This work was sponsored by GetWellNetwork Inc.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:34 -02:00
Devin Heitmueller
2428a2ed6a [media] au8522: cleanup code which disables audio decoder
Cleanup the routine which disables the audio decoder.  In particular, the i2s
output was being shut off but the audio processor itself was not, resulting
in more power being consumed than needed.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:33 -02:00
Devin Heitmueller
bde3bb9a67 [media] au0828: Fix field alignment for video frames delivered by driver
Fix the alignment of fields being delivered by the driver, which was
resulting in jerky video when there was horizontal motion (since the bottom
field of the frame was being sent with the top field of the previous frame)

This work was sponsored by GetWellNetwork Inc.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:33 -02:00
Devin Heitmueller
83f859c5a6 [media] au0828: set max packets per URB to match Windows driver
We had the max packets per URB set to an incredibly low "10" as opposed to
the Windows driver which has it as 128.  Set the value to match the
Windows driver, which will reduce interrupts considerably.

This work was sponsored by GetWellNetwork Inc.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:33 -02:00
Devin Heitmueller
88464106f9 [media] au8522: Properly set default brightness
The chip's default value for the brightness didn't match what we were sending
back in the queryctrl ioctl(), so if the application actually set the
brightness to the "default", it would actually end up being way too bright.

This work was sponsored by GetWellNetwork Inc.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:33 -02:00
Jean-François Moine
1d00d6c1ff [media] gspca: Convert some uppercase hexadecimal values to lowercase
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:33 -02:00
Jean-François Moine
a79cc7b918 [media] gspca - sonixj: Simplify and clarify the hv7131r probe function
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:32 -02:00