Andy Shevchenko [Tue, 7 Aug 2012 15:43:07 +0000 (12:43 -0300)]
[media] gspca: use %*ph to print small buffers
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] dvb: get rid of fe_ioctl_override callback
This callback were meant to allow overriding a FE callback, before its
call, but it is not really needed, as the callback can be intercepted
after tuner attachment.
Worse than that, only DVBv3 calls are intercepted this way, so a DVBv5
application will produce different effects than a DVBv3 one.
So, get rid of it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi>
Julia Lawall [Tue, 31 Jul 2012 08:21:36 +0000 (05:21 -0300)]
[media] drivers/media/radio/radio-si4713.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches. This patch uses these functions for data that is allocated in
the probe function of a platform device and is only freed in the remove
function.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Julia Lawall [Tue, 31 Jul 2012 08:21:35 +0000 (05:21 -0300)]
[media] drivers/media/radio/radio-wl1273.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches. This patch uses these functions for data that is allocated in
the probe function of a platform device and is only freed in the remove
function.
In two cases, the original memory allocation function was kmalloc, which
has been changed to a zeroing allocation to benefit from the devm function.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Julia Lawall [Tue, 31 Jul 2012 08:21:37 +0000 (05:21 -0300)]
[media] drivers/media/radio/radio-timb.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches. This patch uses these functions for data that is allocated in
the probe function of a platform device and is only freed in the remove
function.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sean Young [Mon, 13 Aug 2012 11:59:48 +0000 (08:59 -0300)]
[media] saa7134: simplify timer activation
This simplies the code and resolves a possible race condition between
ir_raw_decode_timer_end() and saa7134_raw_decode_irq().
If the interrupt handler is called after ir_raw_decode_timer_end()
calls ir_raw_event_handle() but before clearing ir->active, then the
timer won't be rearmed.
Compile tested only.
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sean Young [Mon, 13 Aug 2012 11:59:47 +0000 (08:59 -0300)]
[media] rc: do not wake up rc thread unless there is something to do
The TechnoTrend USB IR Receiver sends 125 ISO URBs per second, even when
there is no IR activity. Reduce the number of wake ups from the other
drivers too.
This saves about 0.25ms/s on a 2.4GHz Core 2 according to powertop.
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sean Young [Mon, 13 Aug 2012 11:59:46 +0000 (08:59 -0300)]
[media] rc: Add support for the TechnoTrend USB IR Receiver
This driver adds support for TechnoTrend USB IR Receiver. It is a complete
rewrite of the staging/media/lirc/lirc_ttusbir driver. It adds more
accurate sample reporting and led control.
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sean Young [Mon, 13 Aug 2012 11:59:45 +0000 (08:59 -0300)]
[media] iguanair: fix receiver overflow
The Pioneer CU-700 remote causes receiver overflows if you hold down any
button. The remote does not send NEC IR repeats, it repeats the entire
NEC code after 20ms.
The iguanair hardware advertises an interval of 10 which just not enough;
with 100 URBs per second and at most 7 edges per URB, we handle at most
700 edges per second. The remote generates about 900.
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Mon, 13 Aug 2012 01:27:08 +0000 (22:27 -0300)]
[media] rtl28xxu: generalize streaming control
Move rtl2831u LED from streaming control to power control. It
changes LED behavior slightly but who cares :)
After that same streaming control can be used for both rtl2831u
and rtl2832u.
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Stefan Muenzel [Sat, 28 Jul 2012 22:49:14 +0000 (19:49 -0300)]
[media] uvcvideo: Support 10bit, 12bit and alternate 8bit greyscale formats
The SPCAM SP620U camera uses the alternate "Y8 " GUID for the 8-bit
greyscale format, and supports a 12-bit greyscale format. Add support
for those in the driver, as well as for 10-bit greyscale formats.
Ezequiel García [Sat, 11 Aug 2012 17:32:57 +0000 (14:32 -0300)]
[media] media: Add stk1160 new driver (easycap replacement)
This driver adds support for stk1160 usb bridge as used in some
video/audio usb capture devices.
It is a complete rewrite of staging/media/easycap driver and
it's meant as a replacement.
As stk1160 allows communication with an ac97 codec chip, this
driver allows to register a control-only sound card to allow the user
to access ac97 controls.
Two devices have been used for testing:
* 1-cvbs video and 1-audio ac97 input,
* 4-cvbs inputs
Both of these devices reports with the same id [05e1:0408],
so the driver tries to support a superset of the capabilities.
By using keep_buffers module parameter it's possible to prevent
the driver from releasing urb buffers when streaming is stopped.
The usage of this parameter can avoid memory fragmentation that may
cause the driver to stop working on low memory systems.
A similar mechanism is implemented in em28xx driver (see commit 86d38d).
Devendra Naga [Sat, 4 Aug 2012 17:12:03 +0000 (14:12 -0300)]
[media] staging: media: cxd2099: fix sparse warnings in cxd2099_attach
The following sparse warnings were fixed
drivers/staging/media/cxd2099/cxd2099.c:686:26: warning: Using plain integer as NULL pointer
drivers/staging/media/cxd2099/cxd2099.c:691:24: warning: Using plain integer as NULL pointer
drivers/staging/media/cxd2099/cxd2099.c:696:24: warning: Using plain integer as NULL pointer
Signed-off-by: Devendra Naga <develkernel412222@gmail.com> Cc: Ralph Metzler <rjkm@metzlerbros.de> Cc: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Michael Jones [Thu, 26 Jul 2012 13:48:25 +0000 (10:48 -0300)]
[media] v4l2: typos
[mchehab@redhat.com: fix a merge conflict at Documentation/video4linux/v4l2-framework.txt] Signed-off-by: Michael Jones <michael.jones@matrix-vision.de> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Thu, 9 Aug 2012 09:04:43 +0000 (06:04 -0300)]
[media] DocBook: various version/copyright year updates
- update 2011 to 2012 for copyrights
- update V4L2 spec version to 3.6
- update the intro to also refer to part four: the Media Controller
- fix an incorrect revision section
- fix an incorrect 3.6 kernel changes section
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The structure is only used to store configuration data and pass it to
CCDC configuration functions. Access the data directly from the
locations that need it.
Laurent Pinchart [Wed, 31 Aug 2011 14:57:12 +0000 (11:57 -0300)]
[media] omap3isp: video: Split format info bpp field into width and bpp
The bpp field currently stores the sample width and is aligned to the
next multiple of 8 bits when computing data size in memory. This won't
work anymore for YUYV8_2X8 formats. Split the bpp field into a sample
width and a bytes per pixel value.
Laurent Pinchart [Mon, 18 Jun 2012 14:24:48 +0000 (11:24 -0300)]
[media] omap3isp: preview: Add support for non-GRBG Bayer patterns
Rearrange the CFA interpolation coefficients table based on the Bayer
pattern. Support for non-Bayer CFA patterns is dropped as they were not
correctly supported, and have never been tested.
[media] omap3isp: preview: Pass a prev_params pointer to configuration functions
Instead of using void pointers and offset arithmetics to compute a
pointer to configuration parameters in a generic way, pass the complete
parameters structure to configuration functions and let them access the
parameters they need.
Also modify the enable functions to use a bool enable parameter instead
of a u8.
Laurent Pinchart [Fri, 25 May 2012 12:33:00 +0000 (09:33 -0300)]
[media] omap3isp: Configure HS/VS interrupt source before enabling interrupts
This needs to be performed before enabling interrupts as the sensor
might be free-running and the ISP default setting (HS edge) would put an
unnecessary burden on the CPU.
[media] au0828: fix possible race condition in usage of dev->ctrlmsg
The register read function is referencing the dev->ctrlmsg structure outside
of the dev->mutex lock, which can cause corruption of the value if multiple
callers are invoking au0828_readreg() simultaneously.
Use a stack variable to hold the result, and copy the buffer returned by
usb_control_msg() to that variable.
In reality, the whole recv_control_msg() function can probably be collapsed
into au0288_readreg() since it is the only caller.
Also get rid of cmd_msg_dump() since the only case in which the function is
ever called only is ever passed a single byte for the response (and it is
already logged).
[media] xc5000: change filename to production/redistributable xc5000c firmware
The original xc5000c driver support was based on a beta version of the
firmware, and there were no redistribution rights. Change over to using
the release version, for which freely redistributable firmware can be
found here:
Thanks to Ramon Cazares from Cresta Technology for making the firmware
available as well as working out the licensing issues.
[mchehab@redhat.com: Fix a merge conflict with the patch that added support
for MODULE_FIRMWARE() macro] Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Cc: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] au0828: fix a couple of missed edge cases for i2c gate with analog
This patch addresses a couple of cases where I forgot to pop open the
gate when in analog mode (a correlary to fix the change made in patch 1c58d5b4a5fca42dce5428bd79b9405878017735).
[media] xc5000: show debug version fields in decimal instead of hex
The driver prints out a dotted version number but it's in hex. As a
result, the version doesn't visibly match the filename for the firmware,
and it caused a bunch of confusion while discussing different versions
with the chip manufacturer.
[media] au0828: tweak workaround for i2c clock stretching bug
The hack I put in a couple of years ago to avoid clock stretching issues
when talking to the xc5000 worked fine for writes, but intermittently
fails for register reads, because the xc5000 may stretch the clock for
longer between bytes (I was seeing cases of 21 us on the analyzer).
The problem manifested itself as the xc5000 firmware version and PLL
lock register intermittently showing garbage values.
Slow down the i2c bus from 30 KHz to 20 KHz to accommodate.
[media] xc5000: add support for firmware load check and init status
The xc5000c and newer versions of the xc5000a firmware need minor revisions
to their initialization process. Add support for validating the firmware
was properly loaded, as well as checking the init status after initialization.
Based on advice from CrestaTech support as well as xc5000 datasheet v2.3.
[media] xc5000: reset device if encountering PLL lock failure
It's possible for the xc5000 to enter an unknown state such that all
subsequent tuning requests fail. The only way to recover is to reset the
tuner and reload the firmware. This problem was detected after several days
straight of issuing tuning requests every five seconds.
Reset the firmware in the event that the PLL is in an unlocked state. This
solution was provided by the engineer at CrestaTech (the company that acquired
Xceive).
[media] au0828: tune retry interval for i2c interaction
Adjust the retry timeout and number of retries to speed up xc5000
firmware download. With this change it goes from 4.2 seconds to 2.9.
The net time waited is pretty much the same, but we just poll more
often.