1
0
Fork 0
Commit Graph

11441 Commits (cfee95977bea090ae5ec4fd442ebd381792d46c4)

Author SHA1 Message Date
Ondrej Zary 240d57bb82 [media] usbvision: add Nogatech USB MicroCam
Add Nogatech USB MicroCam PAL (NV3001P) and NTSC (NV3000N) support to
usbvision driver.
PAL version is tested, NTSC untested.
Data captured using usbsnoop, init_values are listed in the INF file along
with image dimensions, offsets and frame rates.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:29 -03:00
Malcolm Priestley 449a0bada3 [media] lmedm04: PID filtering changes
Improve PID filtering and program register 20 correctly.
 Make sure stream_on message is sent if streaming is off, otherwise
 PIDs are not registered.
 Move mutex outside lme2510_enable_pid.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:27 -03:00
Malcolm Priestley a760d63878 [media] lmedm04: don't write to buffer without a mutex
usb_buffer not inside mutex lock, waiting caller can alter buffer.
 Static added to lme2510_exit and lme2510_exit_int.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:26 -03:00
Malcolm Priestley 853e3b2930 [media] IX2505V Keep I2C gate control alive
Gate could close after first I2C message. On stv0288 it does.
 Keep 2nd and 3rd message I2C gate control alive.
 Remove unnecessary gate closing in this module.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:25 -03:00
Jesper Juhl 08921ac9e9 [media] Media, DVB, Siano, smsusb: Avoid static analysis report about 'use after free'
In drivers/media/dvb/siano/smsusb.c we have this code:
 ...
               kfree(dev);

               sms_info("device %p destroyed", dev);
 ...

at least one static analysis tool (Coverity Prevent) complains about this
as a use-after-free bug.
While it's true that we do use the pointer variable after freeing it, the
only use is to print the value of the pointer, so there's not actually any
problem here. But still, silencing the complaint is trivial by just moving
the kfree() call below the sms_info(), so why not just do it?. It doesn't
change the workings of the code in any way, but it makes the tool shut up.
The patch below also removes a rather pointless blank line.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:57 -03:00
Malcolm Priestley dca6b74bb3 [media] dvb-usb: don't return error if stream stop
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:54 -03:00
Malcolm Priestley c8b7ced346 [media] dvb-usb return device errors to demuxer
Return device errors to demuxer from on/off streamming and
 pid filtering.

Please test this patch with all dvb-usb devices.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:53 -03:00
Alexey Khoroshilov 6f030abf9a [media] lmedm04: Do not unlock mutex if mutex_lock_interruptible failed
There are a couple of places where mutex_unlock() is called even
if mutex_lock_interruptible() failed. The patch fixes the issue.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:51 -03:00
Márcio Alves eeaaf817c7 [media] cx231xx: add support for Kworld
[mchehab@redhat.com: avoided board renumberation, removed an unused #define
 and re-used the existing mb86a20s dvb attach code]
Signed-off-by: Márcio A Alves <froooozen@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:49 -03:00
Marko Ristola 38e009aac9 [media] Speed up DVB TS stream delivery from DMA buffer into dvb-core's buffer
Avoid unnecessary DVB TS 188 sized packet copying from DMA buffer into stack.
Backtrack one 188 sized packet just after some garbage bytes when possible.
This obsoletes patch https://patchwork.kernel.org/patch/118147/

Signed-off-by: Marko Ristola <marko.ristola@kolumbus.fi>
Acked-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:48 -03:00
Jesper Juhl 3f84a4e1c1 [media] cx23885: Don't leak firmware in cx23885_card_setup()
We leak the memory allocated to 'fw' (the firmware) when the variable goes
out of scope.
Fix the leak by calling release_firmware(fw) before 'fw' goes out of
scope.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:47 -03:00
Jesper Juhl 451a51b218 [media] DVB, DiB9000: Fix leak in dib9000_attach()
If the second memory allocation in dib9000_attach() fails, we'll leak the
memory allocated by the first.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:45 -03:00
Steven Toth b7101de3ff [media] cx18: mmap() support for raw YUV video capture
Add support for mmap method streaming of raw YUV video on cx18-based
hardware, in addition to the existing support for read() streaming of
raw YUV and MPEG-2 encoded video.

[simon.farnsworth@onelan.co.uk: I forward-ported this from Steven's original work,
 done under contract to ONELAN. The original code is at
 http://www.kernellabs.com/hg/~stoth/cx18-videobuf]

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:43 -03:00
Sensoray Linux Development e42e28f9d6 [media] s2255drv: jpeg enable module parameter
Adding jpeg enable module parameter.

Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:41 -03:00
Sensoray Linux Development d0ef8540f2 [media] s2255drv: adding MJPEG format
adding MJPEG format

Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:39 -03:00
Thiago Farina b01ff50035 [media] wl128x: Remove unused NO_OF_ENTRIES_IN_ARRAY macro
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:37 -03:00
Malcolm Priestley eb02d8571b [media] DM04/QQBOX v1.84 added PID filter
A greatly simplified version of the PID Filter now added
back to the Driver.

The driver allows for the PID filter to be turned off.

applied after patch 683781.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:36 -03:00
Malcolm Priestley bb19a42105 [media] STV0288 Register 42 - Incorrect settings
Register 42 bits 2,3,6 and 7 should be set to 0.
 This gives difficult locking on some channels and may be compensated
 for by other methods.

This affects any driver using the stv0288 frontend on the default
or earda inittab.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:35 -03:00
Malcolm Priestley 910c41cac0 [media] DM04/QQBOX stv0288 register 42 - incorrect setting
stv0288 Register 42 bits 6 & 7 should be set to 0.
 This is causing intermittent lock, the dvb-usb-lmedm04 driver uses
 register 50 (auto fine mode) to correct for this, this register is
 now returned to its default setting.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:33 -03:00
Pete Eberlein a1b4c86b2b [media] s2255drv: atomic submit urb in completion handler
An usb_submit_urb should be atomic in a completion handler. This fixes
"BUG: scheduling while atomic" messages.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:31 -03:00
Oliver Endriss 574312d8ce [media] budget-ci: Add support for TT S-1500 with BSBE1-D01A tuner
Add support for TT S-1500 with BSBE1-D01A tuner.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:30 -03:00
Hans Petter Selasky 53f1fe9465 [media] cx24116.c - fix for wrong parameter description
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:29 -03:00
Jean-Francois Moine 6588687a60 [media] pwc: Handle V4L2_CTRL_FLAG_NEXT_CTRL in queryctrl
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:27 -03:00
Mariusz Kozlowski fd20650849 [media] dib0700: fix possible NULL pointer dereference
Seems like 'adap->fe' test for NULL was meant to be before we dereference
that pointer.

Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl>
Acked-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:26 -03:00
Dan Carpenter 92f6ed71ca [media] pvrusb2: delete generic_standards_cnt
The generic_standards_cnt define is only used in one place and it's
more readable to just call ARRAY_SIZE(generic_standards) directly.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:25 -03:00
Dan Carpenter 0cff593732 [media] pvrusb2: check for allocation failures
This function returns NULL on failure so lets do that if kzalloc()
fails.  There is a separate problem that the caller for this function
doesn't check for errors...

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-By: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:24 -03:00
Timothy Lee ce02704d48 [media] saa7134: support MagicPro ProHDTV Pro2 Hybrid DMB-TH PCI card
This card has a TD18271 silicon tuner, and uses TDA8290 and LGS8G75 to
demodulate analog and digital broadcast respectively.  GPIO configurations
were derived using DScaler regspy.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:22 -03:00
Jean Delvare 5398b62215 [media] zoran: Drop unused module parameters encoder and decoder
The ability to force the encoder or decoder chip was broken by commit
0ab6e1c38d in February 2009. As nobody
complained for over 2 years, I take it that these parameters were no
longer used so we can simply drop them.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:21 -03:00
Florian Mickler 945b876600 [media] lmedm04: get rid of on-stack dma buffers
usb_control_msg initiates (and waits for completion of) a dma transfer using
the supplied buffer. That buffer thus has to be seperately allocated on
the heap.

In lib/dma_debug.c the function check_for_stack even warns about it:
	WARNING: at lib/dma-debug.c:866 check_for_stack

Tested-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:19 -03:00
Florian Mickler 2a596f84e2 [media] au6610: get rid of on-stack dma buffer
usb_control_msg initiates (and waits for completion of) a dma transfer using
the supplied buffer. That buffer thus has to be seperately allocated on
the heap.

In lib/dma_debug.c the function check_for_stack even warns about it:
	WARNING: at lib/dma-debug.c:866 check_for_stack

Signed-off-by: Florian Mickler <florian@mickler.org>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Tested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:18 -03:00
Florian Mickler 029461dbea [media] ce6230: get rid of on-stack dma buffer
usb_control_msg initiates (and waits for completion of) a dma transfer using
the supplied buffer. That buffer thus has to be seperately allocated on
the heap.

In lib/dma_debug.c the function check_for_stack even warns about it:
	WARNING: at lib/dma-debug.c:866 check_for_stack

Signed-off-by: Florian Mickler <florian@mickler.org>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Tested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:17 -03:00
Florian Mickler 26b72c6e5a [media] ec168: get rid of on-stack dma buffers
usb_control_msg initiates (and waits for completion of) a dma transfer using
the supplied buffer. That buffer thus has to be seperately allocated on
the heap.

In lib/dma_debug.c the function check_for_stack even warns about it:
	WARNING: at lib/dma-debug.c:866 check_for_stack

Signed-off-by: Florian Mickler <florian@mickler.org>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Tested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:16 -03:00
Florian Mickler 60f81f12fa [media] vp702x: use preallocated buffer in the frontend
Note: This change is tested to compile only as I don't have the
hardware.

Signed-off-by: Florian Mickler <florian@mickler.org>
Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:14 -03:00
Florian Mickler ee52f120b0 [media] vp702x: use preallocated buffer in vp702x_usb_inout_cmd
If we need a bigger buffer, we reallocte a new buffer and free the old
one.

Note: This change is tested to compile only as I don't have the
hardware.

Signed-off-by: Florian Mickler <florian@mickler.org>
Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:12 -03:00
Florian Mickler 8ea793aa73 [media] vp702x: use preallocated buffer
Note: This change is tested to compile only as I don't have the
hardware.

Signed-off-by: Florian Mickler <florian@mickler.org>
Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:11 -03:00
Florian Mickler 9a187c4183 [media] vp702x: fix locking of usb operations
Otherwise it is not obvious that vp702x_usb_in_op or vp702x_usb_out_op
will not interfere with any vp702x_usb_inout_op.

Note: This change is tested to compile only, as I don't have the
hardware.

Signed-off-by: Florian Mickler <florian@mickler.org>
Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:10 -03:00
Florian Mickler 57873c720c [media] vp702x: get rid of on-stack dma buffers
usb_control_msg initiates (and waits for completion of) a dma transfer using
the supplied buffer. That buffer thus has to be seperately allocated on
the heap.

In lib/dma_debug.c the function check_for_stack even warns about it:
	WARNING: at lib/dma-debug.c:866 check_for_stack

Note: This change is tested to compile only, as I don't have the hardware.

Signed-off-by: Florian Mickler <florian@mickler.org>
Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:08 -03:00
Florian Mickler cf53b82d5d [media] vp702x: remove unused variable
struct vp702x_device_state.power_state is nowhere referenced.

Signed-off-by: Florian Mickler <florian@mickler.org>
Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:07 -03:00
Florian Mickler 1c6410f317 [media] vp702x: preallocate memory on device probe
This sets up a buffer and a mutex protecting that buffer in
the struct vp702x_device_state.

The definition of struct vp702x_device_state is moved into the header
in order to use the buffer also in the frontend.

Signed-off-by: Florian Mickler <florian@mickler.org>
Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:05 -03:00
Florian Mickler 36f773e8e3 [media] vp702x: rename struct vp702x_state -> vp702x_adapter_state
We need a state struct for the dvb_usb_device.
In order to reduce confusion we rename the vp702x_state struct.

Signed-off-by: Florian Mickler <florian@mickler.org>
Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:04 -03:00
Florian Mickler d30615d87e [media] vp702x: cleanup: whitespace and indentation
Some whitespace, one linebreak and one unneded variable
initialization...

Signed-off-by: Florian Mickler <florian@mickler.org>
Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:03 -03:00
Florian Mickler 12fe2a6193 [media] opera1: get rid of on-stack dma buffer
usb_control_msg initiates (and waits for completion of) a dma transfer using
the supplied buffer. That buffer thus has to be seperately allocated on
the heap.

In lib/dma_debug.c the function check_for_stack even warns about it:
	WARNING: at lib/dma-debug.c:866 check_for_stack

Note: This change is tested to compile only, as I don't have the hardware.

Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:02 -03:00
Florian Mickler 513ea35ff9 [media] m920x: get rid of on-stack dma buffers
usb_control_msg initiates (and waits for completion of) a dma transfer using
the supplied buffer. That buffer thus has to be seperately allocated on
the heap.

In lib/dma_debug.c the function check_for_stack even warns about it:
	WARNING: at lib/dma-debug.c:866 check_for_stack

Note: This change is tested to compile only, as I don't have the hardware.

Signed-off-by: Florian Mickler <florian@mickler.org>
Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:59 -03:00
Florian Mickler b47b850116 [media] dw2102: get rid of on-stack dma buffer
usb_control_msg initiates (and waits for completion of) a dma transfer using
the supplied buffer. That buffer thus has to be seperately allocated on
the heap.

In lib/dma_debug.c the function check_for_stack even warns about it:
	WARNING: at lib/dma-debug.c:866 check_for_stack

Note: This change is tested to compile only, as I don't have the hardware.

Signed-off-by: Florian Mickler <florian@mickler.org>
Cc: Igor M. Liplianin <liplianin@tut.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:58 -03:00
Florian Mickler 0e4e7208e6 [media] friio: get rid of on-stack dma buffers
usb_control_msg initiates (and waits for completion of) a dma transfer using
the supplied buffer. That buffer thus has to be seperately allocated on
the heap.

In lib/dma_debug.c the function check_for_stack even warns about it:
	WARNING: at lib/dma-debug.c:866 check_for_stack

Note: This change is tested to compile only, as I don't have the hardware.

Signed-off-by: Florian Mickler <florian@mickler.org>
Cc: Akihiro Tsukada <tskd2@yahoo.co.jp>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:57 -03:00
Florian Mickler ab22cbda66 [media] vp7045: get rid of on-stack dma buffers
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:55 -03:00
Florian Mickler 54f4e11ae3 [media] a800: get rid of on-stack dma buffers
usb_control_msg initiates (and waits for completion of) a dma transfer using
the supplied buffer. That buffer thus has to be seperately allocated on
the heap.

In lib/dma_debug.c the function check_for_stack even warns about it:
	WARNING: at lib/dma-debug.c:866 check_for_stack

Note: This change is tested to compile only, as I don't have the hardware.

Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:53 -03:00
Florian Mickler ca73877587 [media] dib0700: remove unused variable
This variable is never used.

Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:52 -03:00
Olivier Grenie ffa5899ce8 [media] DiB0700: get rid of on-stack dma buffers
This patch removes the on-stack buffers for USB DMA transfers.

This is an alternative version of the patch discussed by Florian here:
http://thread.gmane.org/gmane.linux.kernel/1115695/

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:51 -03:00
Florian Mickler b9f7b73c8c [media] lmedm04: correct indentation
This should not change anything except whitespace.

Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:49 -03:00
Joonyoung Shim 474fdc0822 [media] radio-si470x: convert to use request_threaded_irq()
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:47 -03:00
Joonyoung Shim 949cf31cb0 [media] radio-si470x: convert to dev_pm_ops
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:45 -03:00
Joonyoung Shim 0830be3fe1 [media] radio-si470x: support seek and tune interrupt enable
Currently we use busy waiting to seek and tune, it can replace to
interrupt way. SI470X I2C driver supports interrupt way to week and tune
via this patch.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:43 -03:00
Jarod Wilson 68a49a4a3d [media] ttusb-budget: driver has a debug param, use it
Remove DEBUG define, key debug spew off of the module's debug param that
already exists.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:38 -03:00
Jarod Wilson 2faa0ca82c [media] mceusb: Formosa e017 device has no tx
Per hardware provided to me, the Formosa Industrial Computing eHome
Infrared Receiver, 0x147a:0xe017, has no tx capability, it is rx only.

Thanks go to Paul Rae for the hardware.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:37 -03:00
Jarod Wilson 39381d4fcd [media] rc/nuvoton-cir: enable CIR on w83667hg chip variant
Thanks to some excellent investigative work by Douglas Clowes, it was
uncovered that the older w83667hg Nuvoton chip functions with this
driver after actually enabling the CIR function via its multi-function
chip config register. The CIR and CIR wide-band sensor enable bits are
just in a different place on this hardware, so we only poke register
0x27 on 677 hardware now, and we poke register 0x2c on the 667 now.

Reported-by: Douglas Clowes <dclowes1@optusnet.com.au>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:35 -03:00
Jarod Wilson 362d3a3a95 [media] rc/nuvoton-cir: only warn about unknown chips
There are additional chip IDs that report a PNP ID of NTN0530, which we
were refusing to load on. Instead, lets just warn if we encounter an
unknown chip, as there's a chance it will work just fine.

Also, expand the list of known hardware to include both an earlier and a
later generation chip that this driver should function with. Douglas has
an older w83667hg variant, that with a touch more work, will be
supported by this driver, and Lutz has a newer w83677hg variant that
works without any further modifications to the driver.

Reported-by: Douglas Clowes <dclowes1@optusnet.com.au>
Reported-by: Lutz Sammer <johns98@gmx.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:33 -03:00
Jarod Wilson 56c0893c4f [media] rc: further key name standardization
Use the newly introduced KEY_IMAGES where appropriate, and standardize
on KEY_MEDIA for media center/application launcher button (such as the
Windows logo key on the Windows Media Center Ed. remotes).

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:32 -03:00
Jarod Wilson d8ee99e799 [media] mceusb: tivo transceiver should default to tivo keymap
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:31 -03:00
Jarod Wilson d0ff237133 [media] rc: add tivo/nero liquidtv keymap
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:29 -03:00
Antonio Ospite 6612155a1d [media] gspca - kinect: New subdriver for Microsoft Kinect
The Kinect sensor is a device used by Microsoft for its Kinect project,
which is a system for controller-less Human-Computer interaction
targeted for Xbox 360.

In the Kinect device, RGBD data is captured from two distinct sensors: a
regular RGB sensor and a monochrome sensor which, with the aid of a IR
structured light, captures what is finally exposed as a depth map; so
what we have is basically a Structured-light 3D scanner.

The Kinect gspca subdriver just supports the video stream for now,
exposing the output from the RGB sensor or the unprocessed output from
the monochrome sensor; it does not deal with the processed depth stream
yet, but it allows using the sensor as a Webcam or as an IR camera (an
external source of IR light might be needed for this use).

The low level implementation is based on code from the OpenKinect
project (http://openkinect.org).

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:27 -03:00
Jean-François Moine da75191b43 [media] gspca - zc3xx: Adjust the mc501cb exchanges
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:24 -03:00
Patrice Chotard 5396e62fa1 [media] gspca - jeilinj: add SPORTSCAM specific controls
Signed-off-by: Patrice CHOTARD <patricechotard@free.fr>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:22 -03:00
Patrice Chotard 713b466f0f [media] gspca - jeilinj: Add SPORTSCAM_DV15 camera support
Signed-off-by: Patrice CHOTARD <patricechotard@free.fr>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:21 -03:00
Patrice Chotard 6f8efcfb3d [media] gspca - jeilinj: add 640*480 resolution support
Signed-off-by: Patrice CHOTARD <patricechotard@free.fr>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:20 -03:00
Patrice Chotard 8715b16ead [media] gspca - jeilinj: use gspca_dev->usb_err to forward error to upper layer
Signed-off-by: Patrice CHOTARD <patricechotard@free.fr>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:18 -03:00
Patrice Chotard c3d8692758 [media] gspca - jeilinj: suppress workqueue
Signed-off-by: Patrice CHOTARD <patricechotard@free.fr>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:17 -03:00
Michael Krufky ec2a095435 [media] tveeprom: update hauppauge tuner list thru 174
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:15 -03:00
Michael Krufky 47ac84d5b1 [media] tveeprom: update hauppauge tuner list thru 169
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:14 -03:00
Antti Palosaari 70fc26fbcd [media] anysee: add more info about known board configs
Add some comments about known GPIO settings of supported board
versions.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:12 -03:00
Antti Palosaari 882b82caf2 [media] anysee: add support for two byte I2C address
After that Anysee I2C adapter is capable of one and two byte long
I2C addresses in case of read from I2C bus.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:11 -03:00
Antti Palosaari e82eea79a3 [media] anysee: enhance demod and tuner attach
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:10 -03:00
Antti Palosaari 1fd80701b5 [media] anysee: fix E30 Combo Plus TDA18212 DVB-T
Use correct I2C address for ZL10353 DVB-T demod.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:09 -03:00
Antti Palosaari 59fb41409d [media] anysee: fix E30 Combo Plus TDA18212 GPIO
Looks like it is IF route switch on IOE[0]. Set it correctly
to route signal from tuner to demod. Now it works for DVB-C too.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:07 -03:00
Antti Palosaari a43be980b3 [media] anysee: add support for Anysee E7 TC
It is ZL10353, TDA10023 and TDA18212.
Tuner is inside of Samsung DNOD44CDH086A tuner module.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:05 -03:00
Antti Palosaari 72ffd2b822 [media] anysee: add support for TDA18212 based E30 Combo Plus
New models have new NXP TDA18212 silicon tuner.
Not tested yet due to lack of HW...

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:04 -03:00
Antti Palosaari 41f81f686a [media] anysee: reimplement demod and tuner attach
Use board ID as base value when selecting correct hardware configuration.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:03 -03:00
Antti Palosaari 592d9e21f5 [media] anysee: change some messages
Print firmware version as two digit long (change from 3 to 2).
Windows app have changed that too. First byte was hard coded as 0.

Change email list address to report non-working device to current one.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:01 -03:00
Antti Palosaari b3e6a5af21 [media] anysee: fix multibyte I2C read
It can read more than one byte from I2C bus. Allow that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:27:00 -03:00
Antti Palosaari 7ea03d211c [media] anysee: I2C address fix
Switch from 8 bit notation to real 7 bit.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:26:59 -03:00
Antti Palosaari 26eb7045f1 [media] NXP TDA18212HN silicon tuner driver
New silicon tuner driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:26:57 -03:00
Andy Walls 437b77552f [media] cx18: Bump driver version, since a new class of HVR-1600 is properly supported
Make a user visible driver version change, for the inevitable user support
questions about why newer model HVR-1600's do not work with (older
versions of) the cx18 driver.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:26:56 -03:00
Andy Walls 2bfe2fa43e [media] cx18: Make RF analog TV work for newer HVR-1600 models with silicon tuners
A previous changes which added the newer model HVR-1600's and DTV support for
them, neglected to add RF analog TV for them.  Fix RF analog TV for the newer
HVR-1600's which have a worldwide analog tuner assembly with a TDA18271 tuner
and TDA8295 demodulator.

Thanks go to Jeff Campbell and Mike Bradley for reproting the problem, and
also to Mike Bradley for doing a lot of the legwork to figure out the tuner
reset GPIO line, the demodulator I2C address, and that the GPIOs have to be
reinitialized after a cardtype switch.

Reported-by: Jeff Campbell <jac1dlists@gmail.com>
Tested-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:26:54 -03:00
Mauro Carvalho Chehab 834751d436 [media] drxd: use mutex instead of semaphore
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:26:53 -03:00
Mauro Carvalho Chehab b15ca33414 [media] Remove the now obsolete drx397xD
This was replaced by Micronas drxd driver

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:26:43 -03:00
Mauro Carvalho Chehab 9999daf446 [media] drxd: CodingStyle cleanups
There are still lots of 80-columns warnings and a few errors
at some tables, but changing them would require more work and
with probably not much gain.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:27 -03:00
Mauro Carvalho Chehab 58d5eaec9f [media] drxd: Don't use a macro for CHK_ERROR with a break inside
The macro is defined as:
	#define CHK_ERROR(s) if( (status = s)<0 ) break

This sucks, as makes harder to debug if something got wrong and
there are more than one level of loops. Also, violates CodingStyle.

Fixed by this simple perl script:

	while (<>) { $f.=$_; };

	$f=~ s,\n\#define CHK_ERROR[^\n]+\n,\n,;

	$f=~ s=(CHK_ERROR\(.*\,)\n\s+=\1 =g;
	$f=~ s=(CHK_ERROR\(.*\,)\n\s+=\1 =g;
	$f=~ s=(CHK_ERROR\(.*\,)\n\s+=\1 =g;
	$f=~ s=(CHK_ERROR\(.*)\s+(\,)\n\s+=\1\2 =g;
	$f=~ s=(CHK_ERROR\(.*)\s+(\,)\n\s+=\1\2 =g;
	$f=~ s=(CHK_ERROR\(.*)\s+(\,)\n\s+=\1\2 =g;

	$f=~ s,\n(\t+)CHK_ERROR\((.*)\)\;,\n\1status = \2;\n\1if (status < 0)\n\1\tbreak;,g;

	print $f;

Plus a few manual adjustments

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:26 -03:00
Mauro Carvalho Chehab 7fc7356f4e [media] drxd: Fix some CodingStyle issues
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:25 -03:00
Mauro Carvalho Chehab bccd2d8a39 [media] drxd: don't re-define u8/u16/u32 types
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:25 -03:00
Mauro Carvalho Chehab 935c630c2c [media] drxd_map_firm.h: Remove unused lines
This file is big. It has 12000+ lines! Most of the defined stuff aren't
used anyware inside the driver, so we can just remove most of the lines
and still keep everything that have any interest for the driver.

If anyone ever need the other devices, it will be stored at git logs, so
it is easy to recover.

The diff result is impressive:
 1 files changed, 1013 insertions(+), 12694 deletions(-)
 rewrite drivers/media/dvb/frontends/drxd_map_firm.h (90%)

As a sideback effect, drxd driver will likely compile faster, and
checkpatch.pl can run on this file without taking (literally) hours.

The code cleanup was done using this small script:
	$ for i in `perl -ne 'print "$1\n" if (m/define\s+([^\s+]+)/)' drxd_map_firm.h`; do if [ "`grep $i drivers/media/dvb/frontends/drxd*.[ch]`" != "" ] ; then echo $i; fi; done|sort|uniq >used_symbols
	$ grep -f used_symbols drxd_map_firm.h >defines

And then deleting the old #define lines, replacing by "defines" file content.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:25 -03:00
Mauro Carvalho Chehab be9297d130 [media] drxd_map_firm.h: make checkpatch.pl happier
s/(define\s+[^\s]+)\s........../\1/

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:24 -03:00
Devin Heitmueller 6cacdd46e2 [media] drxd: Run lindent across sources
Take a first cleanup pass over the sources to bring them closer to the
Linux coding style.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:24 -03:00
Devin Heitmueller 9b316d6b42 [media] em28xx: add remote control support for PCTV 330e
Add support for the PCTV 330e remote control

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:23 -03:00
Devin Heitmueller 5c4da36401 [media] em28xx: remove "not validated" flag for PCTV 330e
Remove the flag indicating the 330e board is not validated, based on the half
dozen users who have reported today that everything is working.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:22 -03:00
Devin Heitmueller 8f19f27e3e [media] drxd: move firmware to binary blob
Abstract out the firmware for the drx-d so that it can be loaded by the
request_firmware() interface.

The firmware licensing permits free redistribution, and can be found here:

http://kernellabs.com/firmware/drxd

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:21 -03:00
Devin Heitmueller ad9b4bb265 [media] em28xx: add digital support for PCTV 330e
Add the calls necessary to use the new drx-d driver for the PCTV 330e

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:21 -03:00
Devin Heitmueller 09bc1942c0 [media] em28xx: include model number for PCTV 330e
Given how PCTV has multiple products with the same model name, include the
model number in the description and #define to make it a little more clear.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:21 -03:00
Devin Heitmueller 7030f52bbe [media] em28xx: fix GPIO problem with HVR-900R2 getting out of sync with drx-d
The em28xx bridge strobes the reset pin on the drx-d on every ts_ctrl call.
This results in the state of the chip getting out of the sync with the
state of the driver (and hence all tuning requests after the first one fail).

Make sure the drx-d is not being held in reset, but don't actually perform a
hardware reset on the chip.

The GPIO block has been split out from the other HVR-9x0 variants to reduce
the risk of regression, although in theory they would not have any issues
since none of those cases have the frontend driver managing any internal
state.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:20 -03:00
Devin Heitmueller 6b142b3c81 [media] drxd: provide ability to disable the i2c gate control function
If the tuner is not actually behind an i2c gate, using the i2c gate control
function can wedge the i2c bus.  Provide the ability to control on a per-board
basis whether it should be used.

Problem was noticed on the HVR-900 R2, where it resulted in the first tuning
attempt succeeding, and then all subsequent attempts to access the xc3028
being treated as failures (including the call to sleep the tuner).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:19 -03:00
Mauro Carvalho Chehab 3e56590678 [media] em28xx: auto-select drx-k if CUSTOMISE is not set
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:19 -03:00
Devin Heitmueller 75e2b8694f [media] em28xx: enable support for the drx-d on the HVR-900 R2
Add the required board initialization required for the drx-d to work with
the 900R2.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:19 -03:00
Devin Heitmueller ba96796544 [media] drxd: provide ability to control rs byte
Provide the ability for the board configuration to specify whether to insert
the RS byte into the TS interconnect to the bridge, while not required for
the ngene in fact is required for the em28xx.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:18 -03:00
Devin Heitmueller 949a12e3a8 [media] drxd: add driver to Makefile and Kconfig
Add the drxd to the Makefile and Kconfig

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:17 -03:00
Ralph Metzler 126f1e6188 drx: add initial drx-d driver
These are the original drx-d sources, extracted from Ralph Metzler's GPL'd
ngene driver.  No modifications/cleanup have yet been made.  In fact, no
measures have been taken to see if the code even compiles.

Signed-off-by Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:16 -03:00
Bjørn Mork 0618ece01f [media] mantis: trivial module parameter documentation fix
The default for "verbose" is 0.  Update description to match.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:16 -03:00
Bjørn Mork abd34d8d6b [media] use pci_dev->revision
pci_setup_device() has saved the PCI revision in the pci_dev
struct since Linux 2.6.23.  Use it.

Cc: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:16 -03:00
Mauro Carvalho Chehab e0df5417ac [media] xc5000: Improve it to work better with 6MHz-spaced channels
Brazil uses 6MHz-spaced channels. So, the nyquist filter for
DVB-C should be different, otherwise, inter-channel interference
may badly affect the device, and signal may not be properly decoded.

On my tests here, without this patch, sometimes channels are seen,
but, most of the time, PID filter returns with timeout.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:14 -03:00
Malcolm Priestley 30bd3b56db [media] DM04/QQBOX Fix issue with firmware release and cold reset
Fix issue where firmware does not release on cold reset.
Also, default firmware never cold resets in multi tuner
environment.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 07:26:14 -03:00
Linus Torvalds 2e9521fd65 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] V4L: soc-camera: regression fix: calculate .sizeimage in soc_camera.c
  [media] v4l2-subdev: fix broken subdev control enumeration
  [media] Fix cx88 remote control input
  [media] v4l: Release module if subdev registration fails
2011-05-18 03:16:38 -07:00
Tomi Valkeinen a0b38cc4d3 OMAP: DSS2: Move display.h to include/video/
arch/arm/plat-omap/include/plat/display.h is an include for the OMAP DSS
driver. A more logical place for it is in include/video.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:05:07 +03:00
Clemens Ladisch 13882a82ee firewire: optimize iso queueing by setting wake only after the last packet
When queueing iso packets, the run time is dominated by the two
MMIO accesses that set the DMA context's wake bit.  Because most
drivers submit packets in batches, we can save much time by
removing all but the last wakeup.

The internal kernel API is changed to require a call to
fw_iso_context_queue_flush() after a batch of queued packets.
The user space API does not change, so one call to
FW_CDEV_IOC_QUEUE_ISO must specify multiple packets to take
advantage of this optimization.

In my measurements, this patch reduces the time needed to queue
fifty skip packets from userspace to one sixth on a 2.5 GHz CPU,
or to one third at 800 MHz.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2011-05-10 22:53:45 +02:00
Stefan Richter f30e6d3e41 firewire: octlet AT payloads can be stack-allocated
We do not need slab allocations anymore in order to satisfy
streaming DMA mapping constraints, thanks to commit da28947e7e
"firewire: ohci: avoid separate DMA mapping for small AT payloads".

(Besides, the slab-allocated buffers that firewire-core, firewire-sbp2,
and firedtv used to provide for 8-byte write and lock requests were
still not fully portable since they crossed cacheline boundaries or
shared a cacheline with unrelated CPU-accessed data.  snd-firewire-lib
got this aspect right by using an extra kmalloc/ kfree just for the
8-byte transaction buffer.)

This change replaces kmalloc'ed lock transaction scratch buffers in
firewire-core, firedtv, and snd-firewire-lib by local stack allocations.
Perhaps the most notable result of the change is simpler locking because
there is no need to serialize usages of preallocated per-device buffers
anymore.  Also, allocations and deallocations are simpler.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
2011-05-10 22:53:44 +02:00
Justin P. Mattock 70f23fd66b treewide: fix a few typos in comments
- kenrel -> kernel
- whetehr -> whether
- ttt -> tt
- sss -> ss

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-10 10:16:21 +02:00
Linus Torvalds 1c08232cfe Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] ngene: Fix CI data transfer regression Fix CI data transfer regression introduced by previous cleanup.
  [media] v4l: make sure drivers supply a zeroed struct v4l2_subdev
  [media] Missing frontend config for LME DM04/QQBOX
  [media] rc_core: avoid kernel oops when rmmod saa7134
  [media] imon: add conditional locking in change_protocol
  [media] rc: show RC_TYPE_OTHER in sysfs
  [media] ite-cir: modular build on ppc requires delay.h include
  [media] mceusb: add Dell transceiver ID
2011-05-04 14:22:04 -07:00
Sergio Aguirre dca6b6d18f [media] V4L: soc-camera: regression fix: calculate .sizeimage in soc_camera.c
A recent patch has given individual soc-camera host drivers a possibility
to calculate .sizeimage and .bytesperline pixel format fields internally,
however, some drivers relied on the core calculating these values for
them, following a default algorithm. This patch restores the default
calculation for such drivers.

Based on initial patch by Guennadi Liakhovetski, found here:

http://www.spinics.net/lists/linux-media/msg31282.html

Except that this covers try_fmt aswell.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-04 16:47:56 -03:00
Hans Verkuil 0b84834a5a [media] v4l2-subdev: fix broken subdev control enumeration
The v4l2_subdev_* functions are meant for older V4L2 drivers that do not use
the control framework yet. These functions should not be used by subdev_do_ioctl.

Most of those backwards compatibility functions are just stubs, but commit
87a0c94ce6 actually changed the behavior of
v4l2_subdev_queryctrl, so calling that one from subdev_do_ioctl broke the
control enumeration in subdev nodes.

The fix is simply not to use those compatibility functions in v4l2-subdev.c.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-04 16:42:55 -03:00
Lawrence Rust 2a164d02dd [media] Fix cx88 remote control input
In the IR interrupt handler of cx88-input.c there's a 32-bit multiply
overflow which causes IR pulse durations to be incorrectly calculated.

This is a regression caused by commit 2997137be8.

Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-04 16:30:20 -03:00
Laurent Pinchart b7534f002d [media] v4l: Release module if subdev registration fails
If v4l2_device_register_subdev() fails, the reference to the subdev
module taken by the function isn't released. Fix this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@kernel.org
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-04 16:22:39 -03:00
Oliver Endriss b730011061 [media] ngene: Fix CI data transfer regression
Fix CI data transfer regression introduced by previous cleanup.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-29 12:35:10 -03:00
Herton Ronaldo Krzesinski 80845a3316 [media] v4l: make sure drivers supply a zeroed struct v4l2_subdev
Some v4l drivers currently don't initialize their struct v4l2_subdev
with zeros, and this is a problem since some of the v4l2 code expects
this. One example is the addition of internal_ops in commit 45f6f84,
after that we are at risk of random oopses with these drivers when code
in v4l2_device_register_subdev tries to dereference sd->internal_ops->*,
as can be shown by the report at http://bugs.launchpad.net/bugs/745213
and analysis of its crash at https://lkml.org/lkml/2011/4/1/168

Use kzalloc within problematic drivers to ensure we have a zeroed struct
v4l2_subdev.

BugLink: http://bugs.launchpad.net/bugs/745213
Cc: <stable@kernel.org>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-29 12:33:28 -03:00
Malcolm Priestley 2b5cb549f8 [media] Missing frontend config for LME DM04/QQBOX
Forgot to add the DVB_STV0299/DVB_PLL to config

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-29 11:46:12 -03:00
Hussam Al-Tayeb 88fda5619e [media] rc_core: avoid kernel oops when rmmod saa7134
The following is a patch to avoid a kernel oops when running rmmod
saa7134 on kernel 2.6.27.1. The change is as suggested by mchehab on
irc.freenode.org

Signed-off-by: Hussam Al-Tayeb <ht990332@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-29 11:45:52 -03:00
Jarod Wilson 23ef710e1a [media] imon: add conditional locking in change_protocol
The imon_ir_change_protocol function gets called two different ways, one
way is from rc_register_device, for initial protocol selection/setup,
and the other is via a userspace-initiated protocol change request,
either by direct sysfs prodding or by something like ir-keytable.

In the rc_register_device case, the imon context lock is already held,
but when initiated from userspace, it is not, so we must acquire it,
prior to calling send_packet, which requires that the lock is held.

Without this change, there's an easily reproduceable deadlock when
another function calls send_packet (such as either of the display write
fops) after a userspace-initiated change_protocol.

With a lock-debugging-enabled kernel, I was getting this:

[   15.014153] =====================================
[   15.015048] [ BUG: bad unlock balance detected! ]
[   15.015048] -------------------------------------
[   15.015048] ir-keytable/773 is trying to release lock (&ictx->lock) at:
[   15.015048] [<ffffffff814c6297>] mutex_unlock+0xe/0x10
[   15.015048] but there are no more locks to release!
[   15.015048]
[   15.015048] other info that might help us debug this:
[   15.015048] 2 locks held by ir-keytable/773:
[   15.015048]  #0:  (&buffer->mutex){+.+.+.}, at: [<ffffffff8119d400>] sysfs_write_file+0x3c/0x144
[   15.015048]  #1:  (s_active#87){.+.+.+}, at: [<ffffffff8119d4ab>] sysfs_write_file+0xe7/0x144
[   15.015048]
[   15.015048] stack backtrace:
[   15.015048] Pid: 773, comm: ir-keytable Not tainted 2.6.38.4-20.fc15.x86_64.debug #1
[   15.015048] Call Trace:
[   15.015048]  [<ffffffff81089715>] ? print_unlock_inbalance_bug+0xca/0xd5
[   15.015048]  [<ffffffff8108b35c>] ? lock_release_non_nested+0xc1/0x263
[   15.015048]  [<ffffffff814c6297>] ? mutex_unlock+0xe/0x10
[   15.015048]  [<ffffffff814c6297>] ? mutex_unlock+0xe/0x10
[   15.015048]  [<ffffffff8108b67b>] ? lock_release+0x17d/0x1a4
[   15.015048]  [<ffffffff814c6229>] ? __mutex_unlock_slowpath+0xc5/0x125
[   15.015048]  [<ffffffff814c6297>] ? mutex_unlock+0xe/0x10
[   15.015048]  [<ffffffffa02964b6>] ? send_packet+0x1c9/0x264 [imon]
[   15.015048]  [<ffffffff8108b376>] ? lock_release_non_nested+0xdb/0x263
[   15.015048]  [<ffffffffa0296731>] ? imon_ir_change_protocol+0x126/0x15e [imon]
[   15.015048]  [<ffffffffa024a334>] ? store_protocols+0x1c3/0x286 [rc_core]
[   15.015048]  [<ffffffff81326e4e>] ? dev_attr_store+0x20/0x22
[   15.015048]  [<ffffffff8119d4cc>] ? sysfs_write_file+0x108/0x144
...

The original report that led to the investigation was the following:

[ 1679.457305] INFO: task LCDd:8460 blocked for more than 120 seconds.
[ 1679.457307] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 1679.457309] LCDd            D ffff88010fcd89c8     0  8460      1 0x00000000
[ 1679.457312]  ffff8800d5a03b48 0000000000000082 0000000000000000 ffff8800d5a03fd8
[ 1679.457314]  00000000012dcd30 fffffffffffffffd ffff8800d5a03fd8 ffff88010fcd86f0
[ 1679.457316]  ffff8800d5a03fd8 ffff8800d5a03fd8 ffff88010fcd89d0 ffff8800d5a03fd8
[ 1679.457319] Call Trace:
[ 1679.457324]  [<ffffffff810ff1a5>] ? zone_statistics+0x75/0x90
[ 1679.457327]  [<ffffffff810ea907>] ? get_page_from_freelist+0x3c7/0x820
[ 1679.457330]  [<ffffffff813b0a49>] __mutex_lock_slowpath+0x139/0x320
[ 1679.457335]  [<ffffffff813b0c41>] mutex_lock+0x11/0x30
[ 1679.457338]  [<ffffffffa0d54216>] display_open+0x66/0x130 [imon]
[ 1679.457345]  [<ffffffffa01d06c0>] usb_open+0x180/0x310 [usbcore]
[ 1679.457349]  [<ffffffff81143b3b>] chrdev_open+0x1bb/0x2d0
[ 1679.457350]  [<ffffffff8113d93d>] __dentry_open+0x10d/0x370
[ 1679.457352]  [<ffffffff81143980>] ? chrdev_open+0x0/0x2d0
...

Bump the driver version here so its easier to tell if people have this
locking fix or not, and also make locking during probe easier to follow.

CC: stable@kernel.org
Reported-by: Benjamin Hodgetts <ben@xnode.org>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-29 09:27:48 -03:00
Jarod Wilson b30039333a [media] rc: show RC_TYPE_OTHER in sysfs
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-29 09:26:22 -03:00
Jarod Wilson d7516c7cf3 [media] ite-cir: modular build on ppc requires delay.h include
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-29 09:26:05 -03:00
Jarod Wilson e296e1276c [media] mceusb: add Dell transceiver ID
Add device ID for a Dell-branded, Philips device ID transceiver reported
by an OpenELEC user on their forums.

http://openelec.tv/forum/27-hardware-support/5622-adding-support-for-an-ir-receiver--dell-branded--#5622

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-29 09:25:36 -03:00
Linus Torvalds 0fd97ab489 Merge branch 'spell-fix' of git://git.profusion.mobi/users/lucas/linux-2.6
* 'spell-fix' of git://git.profusion.mobi/users/lucas/linux-2.6:
  Revert wrong fixes for common misspellings
2011-04-27 15:18:37 -07:00
Linus Torvalds 7fcaa9aaea Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (42 commits)
  [media] media: vb2: correct queue initialization order
  [media] media: vb2: fix incorrect v4l2_buffer->flags handling
  [media] s5p-fimc: Add support for the buffer timestamps and sequence
  [media] s5p-fimc: Fix bytesperline and plane payload setup
  [media] s5p-fimc: Do not allow changing format after REQBUFS
  [media] s5p-fimc: Fix FIMC3 pixel limits on Exynos4
  [media] tda18271: update tda18271c2_rf_cal as per NXP's rev.04 datasheet
  [media] tda18271: update tda18271_rf_band as per NXP's rev.04 datasheet
  [media] tda18271: fix bad calculation of main post divider byte
  [media] tda18271: prog_cal and prog_tab variables should be s32, not u8
  [media] tda18271: fix calculation bug in tda18271_rf_tracking_filters_init
  [media] omap3isp: queue: Don't corrupt buf->npages when get_user_pages() fails
  [media] v4l: Don't register media entities for subdev device nodes
  [media] omap3isp: Don't increment node entity use count when poweron fails
  [media] omap3isp: lane shifter support
  [media] omap3isp: ccdc: support Y10/12, 8-bit bayer fmts
  [media] media: add missing 8-bit bayer formats and Y12
  [media] v4l: add V4L2_PIX_FMT_Y12 format
  cx23885: Fix stv0367 Kconfig dependency
  [media] omap3isp: Use isp xclk defines
  ...

Fix up trivial conflict (spelink errurs) in drivers/media/video/omap3isp/isp.c
2011-04-27 15:17:52 -07:00
Lucas De Marchi e9c549998d Revert wrong fixes for common misspellings
These changes were incorrectly fixed by codespell. They were now
manually corrected.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-04-26 23:31:11 -07:00
Joe Perches 85ee7a1d39 treewide: cleanup continuations and remove logging message whitespace
Using C line continuation inside format strings is error prone.
Clean up the unintended whitespace introduced by misuse of \.
Neaten correctly used line continations as well for consistency.

drivers/scsi/arcmsr/arcmsr_hba.c has these errors as well,
but arcmsr needs a lot more work and the driver should likely be
moved to staging instead.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-26 10:24:37 +02:00
Marek Szyprowski 13b140953a [media] media: vb2: correct queue initialization order
q->memory entry is initialized to late, so if allocation of memory buffers
fails, the buffers might not be freed correctly (q->memory is tested in
__vb2_free_mem, which can be called before setting q->memory).

Reported-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 16:07:34 -03:00
Marek Szyprowski ea42c8ecb2 [media] media: vb2: fix incorrect v4l2_buffer->flags handling
Videobuf2 core assumes that driver doesn't set any buffer flags.
This is correct for buffer state flags that videobuf2 manages,
but the other flags like V4L2_BUF_FLAG_{KEY,P,B}FRAME,
V4L2_BUF_FLAG_TIMECODE and V4L2_BUF_FLAG_INPUT should be passed from or to
the driver.

Reported-by: Jonghun Han <jonghun.han@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 16:07:15 -03:00
Sylwester Nawrocki 89582654ee [media] s5p-fimc: Add support for the buffer timestamps and sequence
Add support for buffer timestamps and the sequence number in
the video capture driver.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 16:02:00 -03:00
Sylwester Nawrocki 045030fa16 [media] s5p-fimc: Fix bytesperline and plane payload setup
Make sure the sizeimage for 3-planar color formats is
width * height * 3/2 and the bytesperline is same for each
plane in case of a multi-planar format.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 16:01:53 -03:00
Sylwester Nawrocki c4a627333f [media] s5p-fimc: Do not allow changing format after REQBUFS
Protecting the color format with vb2_is_streaming() is not sufficient
as this prevents changing the format only after VIDIOC_STREAMON.
To prevent the color format reconfiguration as soon as buffers
are allocated use vb2_is_busy() instead.
Also make the videobuf queue ops structure static.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 16:01:39 -03:00
Sylwester Nawrocki 25b9875fb4 [media] s5p-fimc: Fix FIMC3 pixel limits on Exynos4
Correct pixel limits for the fourth FIMC entity on Exynos4 SoCs.
FIMC3 only supports the writeback input from the LCD mixer.
Also rename s5pv310 variant to exynos4 which is needed after
renaming s5pv310 series to Exynos4.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 16:01:26 -03:00
Linus Torvalds 71460af58f Revert "[media] V4L: videobuf, don't use dma addr as physical"
This reverts commit 35d9f510b6.

Quoth Jiri Slaby:
 "It fixes mmap when IOMMU is used on x86 only, but breaks architectures
  like ARM or PPC where virt_to_phys(dma_alloc_coherent) doesn't work.
  We need there dma_mmap_coherent or similar (the trickery what
  snd_pcm_default_mmap does but in some saner way).  But this cannot be
  done at this phase."

Requested-by: Jiri Slaby <jslaby@suse.cz>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-04-19 10:54:44 -07:00
Michael Krufky 5b9a81d14f [media] tda18271: update tda18271c2_rf_cal as per NXP's rev.04 datasheet
Cc: Stefan Sibiga <stefansibiga@yahoo.ca>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 11:33:24 -03:00
Michael Krufky 786e86ae5e [media] tda18271: update tda18271_rf_band as per NXP's rev.04 datasheet
Cc: Stefan Sibiga <stefansibiga@yahoo.ca>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 11:33:04 -03:00
Michael Krufky 3f688e8c62 [media] tda18271: fix bad calculation of main post divider byte
R_MPD bit 3 does not depend on analog vs. digital. Just use
(0x7f & pd) directly from the values in the main pll table.

Thanks to Stefan Sibiga for pointing this out.

Cc: Stefan Sibiga <stefansibiga@yahoo.ca>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 11:32:44 -03:00
Michael Krufky 381ad0ea14 [media] tda18271: prog_cal and prog_tab variables should be s32, not u8
Fix type of prog_cal and prog_tab variables to avoid any possible
calculation errors.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 11:31:52 -03:00
Michael Krufky f78028b68f [media] tda18271: fix calculation bug in tda18271_rf_tracking_filters_init
Misplaced parenthesis cause a calculation bug in
tda18271_rf_tracking_filters_init

Thanks to Stefan Sibiga for pointing this out.

Cc: Stefan Sibiga <stefansibiga@yahoo.ca>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 11:30:33 -03:00
Laurent Pinchart 2578dfb7f7 [media] omap3isp: queue: Don't corrupt buf->npages when get_user_pages() fails
get_user_pages() can return a negative error code when it fails. Set
buf->npages to 0 in that case, to prevent isp_video_buffer_cleanup()
from releasing invalid pages.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 11:29:56 -03:00
Laurent Pinchart c4f0b78ad5 [media] v4l: Don't register media entities for subdev device nodes
Subdevs already have their own entity, don't register as second one when
registering the subdev device node.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 11:29:19 -03:00
Laurent Pinchart e2241531a5 [media] omap3isp: Don't increment node entity use count when poweron fails
When open a device node, all entities part of the same pipeline are
powered on. If one of the entities fails to be powered on, the open
operations fails. In that case the device node entity use count must not
be incremented.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 11:28:42 -03:00
Michael Jones c09af044db [media] omap3isp: lane shifter support
To use the lane shifter, set different pixel formats at each end of
the link at the CCDC input.

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 11:28:08 -03:00
Michael Jones 5782f97b55 [media] omap3isp: ccdc: support Y10/12, 8-bit bayer fmts
Add support for 8-bit bayer and 10- and 12-bit grey formats at the CCDC
input. Y12 is truncated to Y10 at the CCDC output.

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-19 11:26:16 -03:00
Michal Marek 7cf4446391 media/cx231xx: Drop __TIME__ usage
The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: linux-media@vger.kernel.org
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-19 00:23:21 +02:00
Michal Marek 372c05c495 media/radio-maxiradio: Drop __TIME__ usage
The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: linux-media@vger.kernel.org
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-19 00:23:21 +02:00
Mauro Carvalho Chehab 5a3ddcde35 cx23885: Fix stv0367 Kconfig dependency
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-17 08:09:39 -03:00
Stanimir Varbanov 7c2c8f42a3 [media] omap3isp: Use isp xclk defines
Use isp defines for isp xclk selection in isp_set_xclk().

Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-17 07:44:18 -03:00
Laurent Pinchart 994d5375a2 [media] omap3isp: isp: Reset the ISP when the pipeline can't be stopped
When a failure to stop a module in the pipeline is detected, the only
way to recover is to reset the ISP. However, as other users can be using
a different pipeline with other modules, the ISP can't be reset
synchronously with the error detection.

Mark the ISP as needing a reset when a failure to stop a pipeline is
detected, and reset the ISP when the last user releases the last
reference to the ISP.

Modify the omap3isp_pipeline_set_stream() function to record the new ISP
pipeline state only when no error occurs, except when stopping the
pipeline in which case the pipeline is still marked as stopped.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-17 07:44:02 -03:00
David Cohen b5feda91c1 [media] omap3isp: stat: update struct ispstat_generic_config's comments
struct ispstat_generic_config's comments refers to isph3a_aewb_config,
isph3a_af_config and isphist_config. But those structs have had their
names prefixed with 'omap3'. So, let's update the comments.

Signed-off-by: David Cohen <david.cohen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-17 07:43:46 -03:00
Laurent Pinchart 7a6f0b2270 [media] media: Properly handle link flags in link setup, link notify callback
The link flags were not properly handled in __media_entity_setup_link
which could lead to link_notify callback to be called when the flags are
not modified. Fix this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-17 07:43:32 -03:00
Michael Jones 2d4e9d1db2 [media] omap3isp: Fix trivial typos
It doesn't get more trivial than these.

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-17 07:42:57 -03:00
Sakari Ailus 8dc1e75e9d [media] omap3isp: resizer: Improved resizer rsz factor formula
Round properly the rsz factor so that we get highest rsz so that the input
width (or height) is highest possible smaller or equal to what the user
asks.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-17 07:41:19 -03:00
Laurent Pinchart f792e4f6ac [media] omap3isp: resizer: Use 4-tap mode equations when the ratio is <= 512
As the number of phases/taps, used to select the correct equations to
compute the ratio, depends on the ratio, start with the 7-tap mode
equations to compute an approximation of the ratio, and switch to the
4-tap mode equations if the approximation is lower than or equal to 512.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-17 07:38:10 -03:00
Laurent Pinchart 8eca7a004e [media] omap3isp: resizer: Center the crop rectangle
When the crop rectangle needs to be modified to match hardware
requirements, center the resulting rectangle on the requested rectangle
instead of removing pixels from the right and bottom sides only.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-13 10:33:58 -03:00
Uwe Kleine-König 122af36601 [media] V4L: mx3_camera: select VIDEOBUF2_DMA_CONTIG instead of VIDEOBUF_DMA_CONTIG
Since commit

	379fa5d ([media] V4L: mx3_camera: convert to videobuf2)

mx3_camera uses videobuf2, but that commit didn't upgrade the select
resulting in the following build failure:

	drivers/built-in.o: In function `mx3_camera_init_videobuf':
	clkdev.c:(.text+0x86580): undefined reference to `vb2_dma_contig_memops'
	drivers/built-in.o: In function `mx3_camera_probe':
	clkdev.c:(.devinit.text+0x3548): undefined reference to `vb2_dma_contig_init_ctx'
	clkdev.c:(.devinit.text+0x3578): undefined reference to `vb2_dma_contig_cleanup_ctx'
	drivers/built-in.o: In function `mx3_camera_remove':
	clkdev.c:(.devexit.text+0x674): undefined reference to `vb2_dma_contig_cleanup_ctx'
	make[2]: *** [.tmp_vmlinux1] Error 1
	make[1]: *** [sub-make] Error 2
	make: *** [all] Error 2

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-13 09:56:54 -03:00
Guennadi Liakhovetski cb743930eb [media] sh_mobile_csi2: fix module reloading
If the camera host driver (sh_mobile_ceu_camera.c) is unloaded and then
reloaded, probe will fail, because camera client .set_bus_param() and
.query_bus_param() methods have been set to NULL. Fix this by caching
the original pointers and restoring them on driver-unbind.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-13 09:55:38 -03:00
Guennadi Liakhovetski c8dd707805 [media] soc-camera: don't dereference I2C client after it has been removed
i2c_unregister_device() frees the I2C client, so, dereferencing it
afterwards is a bug, that leads to Oopses.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-13 09:55:06 -03:00
Guennadi Liakhovetski 3e31f2b945 [media] imx074: return a meaningful error code instead of -1
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-13 09:54:35 -03:00
Guennadi Liakhovetski 24105ebc05 [media] soc-camera: fix a recent multi-camera breakage on sh-mobile
With the introduction of CSI2 support on sh-mobile, the host driver
switched to using v4l2_device_call_until_err() with grp_id == 0 to
call subdev operations on the sensor and the CSI2 subdev. However,
this has broken multi-client set ups like the one on migor, because
that way all operations get called on both clients. To fix this add
a grp_id and set it to the client private context.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-13 09:54:16 -03:00
Guennadi Liakhovetski 99a41771bf [media] videobuf2: fix an error message
buf->size is not yet initialised in videobuf2-dma-contig at the time of
the error message, use "size."

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-13 09:52:36 -03:00
Guennadi Liakhovetski 62a79436a5 [media] videobuf2: fix core to correctly identify allocation failures
The videobuf2-dma-contig allocator returns an ERR_PTR() on failure, not
a NULL like all other allocators. Fix videobuf2-core to also correctly
recognise those failures.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-13 09:52:16 -03:00
Andy Walls 0f890ab1b5 [media] cx18: Fix list BUG for IDX stream, triggerable in cx18_probe() error clean up,
If allocating stream buffers for one of the primary streams (e.g. YUV)
failed during card probe, the error path clean up would try to manipulate
the yet unitialized IDX stream structures.  This caused a BUG due to
unitialized list heads.

Detect that case and ignore the uninitialized IDX stream.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-13 09:41:02 -03:00
Linus Torvalds 42933bac11 Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
  Fix common misspellings
2011-04-07 11:14:49 -07:00
Patrick Boettcher 974ceab8fd [media] Fix dependencies for Technisat USB2.0 DVB-S/S2
Device is based on STV0903 demod and STV6110x tuner

Signed-off-by: Oleg Roitburd <oroitburd@gmail.com>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-04 15:58:22 -03:00
Patrick Boettcher 71682520b3 [media] dib0700: fix possible NULL pointer dereference
Seems like 'adap->fe' test for NULL was meant to be before we dereference
that pointer.

Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-04 15:58:20 -03:00
Patrick Boettcher b934c20de1 [media] FLEXCOP-PCI: fix __xlate_proc_name-warning for flexcop-pci
This patch fixes the warning about bad names for sys-fs and other kernel-things. The flexcop-pci driver was using '/'-characters in it, which is not good.
This has been fixed in several attempts by several people, but obviously never made it into the kernel.

Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Cc: Steffen Barszus <steffenbpunkt@googlemail.com>
Cc: Boris Cuber <me@boris64.net>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-04 15:58:19 -03:00
Patrick Boettcher 7f4d527f0b [media] DIB0700: fix typo in dib0700_devices.c
Fix typo introduced in b4d6046e84.

Spotted by Dr. David Alan Gilbert. Thanks for that.

Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Cc: Dr. David Alan Gilbert <linux@treblig.org>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-04-04 15:58:15 -03:00
Linus Torvalds d7c764c4c7 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, UV: Fix kdump reboot
  x86, amd-nb: Rename CPU PCI id define for F4
  sound: Add delay.h to sound/soc/codecs/sn95031.c
  x86, mtrr, pat: Fix one cpu getting out of sync during resume
  x86, microcode: Unregister syscore_ops after microcode unloaded
  x86: Stop including <linux/delay.h> in two asm header files
2011-04-04 08:37:45 -07:00
Linus Torvalds 3e858759f7 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] radio: wl128x: Update registration process with ST
  [media] staging: altera-jtag needs delay.h
2011-04-04 08:33:53 -07:00
Manjunatha Halli 6705a9cc52 [media] radio: wl128x: Update registration process with ST
As underlying ST driver registration API's have changed with
latest 2.6.38-rc8 kernel this patch will update the FM driver
accordingly.

Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-31 18:49:46 -03:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Jean Delvare ca444564a9 x86: Stop including <linux/delay.h> in two asm header files
Stop including <linux/delay.h> in x86 header files which don't
need it. This will let the compiler complain when this header is
not included by source files when it should, so that
contributors can fix the problem before building on other
architectures starts to fail.

Credits go to Geert for the idea.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: James E.J. Bottomley <James.Bottomley@suse.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
LKML-Reference: <20110325152014.297890ec@endymion.delvare>
[ this also fixes an upstream build bug in drivers/media/rc/ite-cir.c ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-03-29 09:37:42 +02:00
Takashi Iwai cdccfc8dc0 Merge branch 'fix/misc' into topic/misc 2011-03-28 13:03:58 +02:00
Stephen Rothwell 30f5b28e7f [media] rc: update for bitop name changes
Fix the following compile failure:

  drivers/media/rc/ite-cir.c: In function 'ite_decode_bytes':
  drivers/media/rc/ite-cir.c:190: error: implicit declaration of function 'generic_find_next_le_bit'
  drivers/media/rc/ite-cir.c:199: error: implicit declaration of function 'generic_find_next_zero_le_bit'

Caused by commit 620a32bba4 ("[media] rc: New rc-based ite-cir driver
for several ITE CIRs") interacting with commit c4945b9ed4
("asm-generic: rename generic little-endian bitops functions").

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-24 18:58:55 -07:00
Linus Torvalds 76d21c5635 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (442 commits)
  [media] videobuf2-dma-contig: make cookie() return a pointer to dma_addr_t
  [media] sh_mobile_ceu_camera: Do not call vb2's mem_ops directly
  [media] V4L: soc-camera: explicitly require V4L2_BUF_TYPE_VIDEO_CAPTURE
  [media] v4l: soc-camera: Store negotiated buffer settings
  [media] rc: interim support for 32-bit NEC-ish scancodes
  [media] mceusb: topseed 0x0011 needs gen3 init for tx to work
  [media] lirc_zilog: error out if buffer read bytes != chunk size
  [media] lirc: silence some compile warnings
  [media] hdpvr: use same polling interval as other OS
  [media] ir-kbd-i2c: pass device code w/key in hauppauge case
  [media] rc/keymaps: Remove the obsolete rc-rc5-tv keymap
  [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map
  [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge
  [media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping
  [media] rc-rc5-hauppauge-new: Add support for the old Black RC
  [media] rc-rc5-hauppauge-new: Add the old control to the table
  [media] rc-winfast: Fix the keycode tables
  [media] a800: Fix a few wrong IR key assignments
  [media] opera1: Use multimedia keys instead of an app-specific mapping
  [media] dw2102: Use multimedia keys instead of an app-specific mapping
  ...

Fix up trivial conflicts (remove/modify and some real conflicts) in:
	arch/arm/mach-omap2/devices.c
	drivers/staging/Kconfig
	drivers/staging/Makefile
	drivers/staging/dabusb/dabusb.c
	drivers/staging/dabusb/dabusb.h
	drivers/staging/easycap/easycap_ioctl.c
	drivers/staging/usbvideo/usbvideo.c
	drivers/staging/usbvideo/vicam.c
2011-03-24 09:50:13 -07:00
Andres Salomon 15de7a41d3 mfd: mfd_cell is now implicitly available to wl1273 drivers
The cell's platform_data is now accessed with a helper function;
change clients to use that, and remove the now-unused data_size.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23 10:41:53 +01:00
Andres Salomon e46dccff34 mfd: mfd_cell is now implicitly available to timberdale drivers
The cell's platform_data is now accessed with a helper function;
change clients to use that, and remove the now-unused data_size.

Note that the mfd's platform_data is marked __devinitdata.  This
is still correct in all cases except for the timbgpio driver, whose
remove hook has been changed to no longer reference the pdata.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23 10:41:52 +01:00
Ondrej Zary b21a8ee670 [media] remove radio-maestro
Remove broken radio-maestro driver as the radio functionality is now
integrated in the es1968 driver.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-23 08:00:32 +01:00
Pawel Osciak 472af2b05b [media] videobuf2-dma-contig: make cookie() return a pointer to dma_addr_t
dma_addr_t may not fit into void* on some architectures. To be safe, make
vb2_dma_contig_cookie() return a pointer to dma_addr_t and dereference it
in vb2_dma_contig_plane_paddr() back to dma_addr_t.

Signed-off-by: Pawel Osciak <pawel@osciak.com>
Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:41:58 -03:00
Pawel Osciak d6db5bfe7f [media] sh_mobile_ceu_camera: Do not call vb2's mem_ops directly
Use vb2_dma_contig_plane_paddr to retrieve a physical address for a plane
instead of calling an internal mem_ops callback.

Signed-off-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:41:57 -03:00
Guennadi Liakhovetski d366d4a08a [media] V4L: soc-camera: explicitly require V4L2_BUF_TYPE_VIDEO_CAPTURE
The soc-camera core accesses the "pix" member of the struct v4l2_format::fmt
union, which is only valid for V4L2_BUF_TYPE_VIDEO_CAPTURE streams. This
patch adds explicit checks for this to {g,s,try}_fmt methods.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:41:56 -03:00
Sergio Aguirre 0e4c180d3e [media] v4l: soc-camera: Store negotiated buffer settings
This fixes the problem in which a host driver
sets a personalized sizeimage or bytesperline field,
and gets ignored when doing G_FMT.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:41:55 -03:00
Jarod Wilson 4be22b6a7f [media] rc: interim support for 32-bit NEC-ish scancodes
The Apple and TiVo remotes I've got use an NEC-ish protocol, but rather
than a command/not_command pair, they have what appear to be vendor ID
bytes. This change makes the NEC decoder warn if the command/not_command
checksum fails, but then passes along a full 32-bit scancode for keymap
lookup. This change should make no difference for existing keymaps,
since they simply won't have 32-bit scancodes, but allows for a 32-bit
keymap. At the moment, that'll have to be uploaded by the user, but I've
got Apple and TiVo remote keymaps forthcoming.

In the long run (2.6.40, hopefully), we should probably just always use
all 32 bits for all NEC keymaps, but this should get us by for 2.6.39.

(Note that a few of the TiVo keys actuallly *do* pass the command
checksum, so for now, the keymap for this remote will have to be a mix
of 24-bit and 32-bit scancodes, but so be it).

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:24:23 -03:00
Jarod Wilson 7d9a46f9d5 [media] mceusb: topseed 0x0011 needs gen3 init for tx to work
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:24:22 -03:00
Jarod Wilson dc8e2aa3b5 [media] hdpvr: use same polling interval as other OS
The hdpvr's IR part, in short, sucks. As observed with a usb traffic
sniffer, the Windows software for it uses a polling interval of 405ms.
Its still not behaving as well as I'd like even with this change, but
this inches us closer and closer to that point...

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:24:19 -03:00
Jarod Wilson 6e5b960176 [media] ir-kbd-i2c: pass device code w/key in hauppauge case
The new hauppauge key tables use both device code button code.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:24:18 -03:00
Mauro Carvalho Chehab 206241069e [media] rc/keymaps: Remove the obsolete rc-rc5-tv keymap
This keymap were used for the Hauppauge Black remote controller
only. It also contains some keycodes not found there. As the
Hauppauge Black is now part of the hauppauge keymap, just remove
it.

Also, remove the modprobe hacks to select between the Gray
and the Black versions of the remote controller as:
 - Both are supported by default by the keymap;
 - If the user just wants one keyboard supported,
   it is just a matter of changing the keymap via
   the userspace tool (ir-keytable), removing
   the keys that he doesn't desire. As ir-keytable
   auto-loads the keys via udev, this is better than
   obscure modprobe parameters.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:17 -03:00
Mauro Carvalho Chehab af86ce79f0 [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map
The rc-hauppauge-new map is a messy thing, as it bundles 3

different remote controllers as if they were just one,
discarding the address byte. Also, some key maps are wrong.

With the conversion to the new rc-core, it is likely that
most of the devices won't be working properly, as the i2c
driver and the raw decoders are now providing 16 bits for
the remote, instead of just 8.

 delete mode 100644 drivers/media/rc/keymaps/rc-hauppauge-new.c

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:16 -03:00
Mauro Carvalho Chehab 15195d3a83 [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge
There are two "hauppauge-new" keymaps, one with protocol
unknown, and the other with the protocol marked accordingly.
However, both tables are miss-named.

Also, the old rc-hauppauge-new is broken, as it mixes
three different controllers as if they were just one.

This patch solves half of the problem by renaming the
correct keycode table as just rc-hauppauge. This table
contains the codes for the four different types of
remote controllers found on Hauppauge cards, properly
mapped with their different addresses.

 create mode 100644 drivers/media/rc/keymaps/rc-hauppauge.c
 delete mode 100644 drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
[Jarod: fix up RC_MAP_HAUPPAUGE defines]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:14 -03:00
Mauro Carvalho Chehab 0548757419 [media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping
The keys for the old black were messed with the ones for the
hauppauge grey. Fix it.

Also, fixes some keycodes and order the keys according with
the way they appear inside the remote controller.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:13 -03:00
Mauro Carvalho Chehab 9890a9edc8 [media] rc-rc5-hauppauge-new: Add support for the old Black RC
Hans borrowed me an old Black Hauppauge RC. Thanks to that, we
can fix the RC5 table for Hauppauge.

Thanks-to: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:12 -03:00
Mauro Carvalho Chehab 0684f5b0fc [media] rc-rc5-hauppauge-new: Add the old control to the table
Adds the old grey remote controller to Hauppauge table.

Hans borrowed me an old gray Hauppauge RC. Thanks to that, we
can fix the RC5 table for Hauppauge.

Thanks-to: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:11 -03:00
Mauro Carvalho Chehab 7f961c6989 [media] rc-winfast: Fix the keycode tables
One of the remotes has a picture available at:
	http://lirc.sourceforge.net/remotes/leadtek/Y04G0004.jpg

As there's one variant with a set direction keys plus vol/chann
keys, and the same table is used for both models, change it to
represent all keys, avoiding the usage of weird function keys.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:10 -03:00
Mauro Carvalho Chehab 898a83e924 [media] a800: Fix a few wrong IR key assignments
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:09 -03:00
Mauro Carvalho Chehab 76fd93b623 [media] opera1: Use multimedia keys instead of an app-specific mapping
This driver uses an app-specific keymap for one of the tables. This
is wrong. Instead, use the standard keycodes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:08 -03:00
Mauro Carvalho Chehab 991bd3c25e [media] dw2102: Use multimedia keys instead of an app-specific mapping
This driver uses an app-specific keymap for one of the tables. This
is wrong. Instead, use the standard keycodes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:07 -03:00