GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git
12 years ago[media] radio-maxiradio: use the tea575x framework
Hans Verkuil [Sun, 5 Feb 2012 12:53:17 +0000 (09:53 -0300)]
[media] radio-maxiradio: use the tea575x framework

This card is based on the tea575x receiver. Use the tea575x-tuner framework
instead of reinventing the wheel.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tea575x: fix HW seek
Hans Verkuil [Mon, 27 Feb 2012 08:31:58 +0000 (05:31 -0300)]
[media] tea575x: fix HW seek

Fix HW seek in TEA575x to work properly:
- a delay must be present after search start and before first register read
  or the seek does weird things
- when the search stops, the new frequency is not available immediately, we
  must wait until it appears in the register (fortunately, we can clear the
  frequency bits when starting the search as it starts at the frequency
  currently set, not from the value written)
- sometimes, seek remains on the current frequency (or moves only a little),
  so repeat it until it moves by at least 50 kHz

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tea575x-tuner: update to latest V4L2 framework requirements
Hans Verkuil [Mon, 27 Feb 2012 08:30:13 +0000 (05:30 -0300)]
[media] tea575x-tuner: update to latest V4L2 framework requirements

The tea575x-tuner module has been updated to use the latest V4L2 framework
functionality. This also required changes in the drivers that rely on it.

The tea575x changes are:

- The drivers must provide a v4l2_device struct to the tea module.
- The radio_nr module parameter must be part of the actual radio driver,
  and not of the tea module.
- Changed the frequency range to the normal 76-108 MHz range instead of
  50-150.
- Add hardware frequency seek support.
- Fix broken rxsubchans/audmode handling.
- The application can now select between stereo and mono.
- Support polling for control events.
- Add V4L2 priority handling.

And radio-sf16fmr2.c now uses the isa bus kernel framework.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Thanks-to: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Add missing slab.h to fix linux-next compile errors
Hans Verkuil [Wed, 29 Feb 2012 08:50:27 +0000 (05:50 -0300)]
[media] Add missing slab.h to fix linux-next compile errors

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] stb0899: fixed reading of IF_AGC_GAIN register
Andreas Regel [Tue, 28 Feb 2012 17:40:44 +0000 (14:40 -0300)]
[media] stb0899: fixed reading of IF_AGC_GAIN register

When reading IF_AGC_GAIN register a wrong value for the base address
register was used (STB0899_DEMOD instead of STB0899_S2DEMOD). That
lead to a wrong signal strength value on DVB-S2 transponders.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Acked-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] stb0899: set FE_HAS_SIGNAL flag in read_status
Andreas Regel [Tue, 28 Feb 2012 17:40:40 +0000 (14:40 -0300)]
[media] stb0899: set FE_HAS_SIGNAL flag in read_status

In stb0899_read_status the FE_HAS_SIGNAL flag was not set in case of a
successful carrier lock. This change fixes that.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Acked-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda10071: fix the delivery system
Antti Palosaari [Mon, 12 Mar 2012 21:21:20 +0000 (18:21 -0300)]
[media] tda10071: fix the delivery system

Commit b2a29b578d9c21b2e5c88020f830d3c42115c51d sets accidentally
supported delivery systems as DVB-T/T2 whilst it should be
DVB-S/S2. Due to that frontend cannot be used at all.

Reported-by: Jiří Zelenka <klacek@bubakov.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] [trivial] DiB0090: remove redundant '; ' from dib0090_fw_identify()
Jesper Juhl [Sun, 26 Feb 2012 21:57:13 +0000 (18:57 -0300)]
[media] [trivial] DiB0090: remove redundant '; ' from dib0090_fw_identify()

One semi-colon is enough.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx25821: Add a card definition for "No brand" cards that have: subvendor...
Sander Eikelenboom [Fri, 24 Feb 2012 17:49:42 +0000 (14:49 -0300)]
[media] cx25821: Add a card definition for "No brand" cards that have: subvendor = 0x0000 subdevice = 0x0000

Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Fix small DocBook typo
Hans Verkuil [Fri, 24 Feb 2012 11:15:39 +0000 (08:15 -0300)]
[media] Fix small DocBook typo

Here is a small patch which fixes a DocBook mistake in the decoder_cmd
documentation.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: tvp5150: support g_mbus_fmt callback
Javier Martin [Tue, 31 Jan 2012 08:23:47 +0000 (05:23 -0300)]
[media] media: tvp5150: support g_mbus_fmt callback

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: tvp5150: Add cropping support
Javier Martin [Tue, 31 Jan 2012 08:23:46 +0000 (05:23 -0300)]
[media] media: tvp5150: Add cropping support

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: easycap: Fix incorrect comment
Ezequiel García [Wed, 22 Feb 2012 21:46:15 +0000 (18:46 -0300)]
[media] staging: easycap: Fix incorrect comment

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: easycap: Clean comment style in easycap_usb_probe()
Ezequiel García [Wed, 22 Feb 2012 21:46:14 +0000 (18:46 -0300)]
[media] staging: easycap: Clean comment style in easycap_usb_probe()

Some of these comments may still need to be reviewed.
This patch only cleans the comment style.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rtl28xxu: add another Freecom usb id
Paolo Pantò [Tue, 21 Feb 2012 15:26:29 +0000 (12:26 -0300)]
[media] rtl28xxu: add another Freecom usb id

Besides sticks with the usb id 14AA:0160, there exists also some
with 14AA:0161 - this is the output in /var/log/messages:

usb 1-1: new high-speed USB device number 2 using ehci_hcd
usb 1-1: New USB device found, idVendor=14aa, idProduct=0161
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: Freecom DVB-T
usb 1-1: Manufacturer: Freecom DVB-T
usb 1-1: SerialNumber: 00000000000036742

The patch is based on the code at
http://git.linuxtv.org/anttip/media_tree.git/shortlog/refs/heads/realtek

Signed-off-by: Paolo Pantò <munix9@googlemail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Driver: video: Use the macro DMA_BIT_MASK()
Santosh Nayak [Tue, 21 Feb 2012 09:13:31 +0000 (06:13 -0300)]
[media] Driver: video: Use the macro DMA_BIT_MASK()

Use the macro DMA_BIT_MASK instead of the constant  0xffffffff.

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: ir-sony-decoder: 15bit function decode fix
James Hogan [Mon, 20 Feb 2012 09:13:54 +0000 (06:13 -0300)]
[media] media: ir-sony-decoder: 15bit function decode fix

The raw Sony IR decoder decodes 15bit messages slightly incorrectly.
To decode the function number, it shifts the bits right by 7 so that the
function is in bits 7:1, masks with 0xFD (0b11111101), and does an 8 bit
reverse so it ends up in bits 6:0. The mask should be 0xFE to correspond
with bits 7:1 (0b11111110).

The old mask had the effect of dropping the MSB of the function number
from bit 6, and leaving the LSB of the device number in bit 7.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rc: Add support for GPIO based IR Receiver driver
Ravi Kumar V [Tue, 28 Feb 2012 04:51:40 +0000 (01:51 -0300)]
[media] rc: Add support for GPIO based IR Receiver driver

Adds GPIO based IR Receiver driver. It decodes signals using decoders
available in rc framework.

Signed-off-by: Ravi Kumar V <kumarrav@codeaurora.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] [trivial] davinci: Fix typo in dm355_ccdvc.c
Masanari Iida [Sat, 18 Feb 2012 16:27:32 +0000 (13:27 -0300)]
[media] [trivial] davinci: Fix typo in dm355_ccdvc.c

Correct spelling "thresold" to "threshold" in
drivers/media/video/davinci/dm355_ccdc.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx18-driver: fix handling of 'radio' module parameter
Danny Kukawka [Wed, 22 Feb 2012 12:24:55 +0000 (09:24 -0300)]
[media] cx18-driver: fix handling of 'radio' module parameter

Reverse cx18-driver part of commit
90ab5ee94171b3e28de6bb42ee30b527014e0be7 and change
module_param_array() type from bool to int to fix
compiler warning:

In function ‘__check_radio’:
113:1: warning: return from incompatible pointer type [enabled by default]
At top level:
113:1: warning: initialization from incompatible pointer type [enabled by default]
113:1: warning: (near initialization for ‘__param_arr_radio.num’) [enabled by default]

v2: corrected version, don't change to module_param_named(), change
    all to int/uint

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: Fix build warning
Larry Finger [Sun, 4 Mar 2012 17:25:23 +0000 (14:25 -0300)]
[media] ivtv: Fix build warning

In driver ivtv, there is a mismatch between the type of the radio module
parameter and the storage variable, which leads to the following
warning:

  CC [M]  drivers/media/video/ivtv/ivtv-driver.o
drivers/media/video/ivtv/ivtv-driver.c: In function ‘__check_radio’:
drivers/media/video/ivtv/ivtv-driver.c:142: warning: return from incompatible pointer type
drivers/media/video/ivtv/ivtv-driver.c: At top level:
drivers/media/video/ivtv/ivtv-driver.c:142: warning: initialization from incompatible pointer type

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: simplify how the decoder controls are set up
Hans Verkuil [Fri, 2 Mar 2012 16:02:11 +0000 (13:02 -0300)]
[media] ivtv: simplify how the decoder controls are set up

The code was unnecessarily complex, introducing a hdl_out handler that was
not needed. Instead just add the controls to the cxhdl.hdl handler directly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ctrls: v4l2_ctrl_add_handler should add all refs
Hans Verkuil [Fri, 2 Mar 2012 15:41:25 +0000 (12:41 -0300)]
[media] v4l2-ctrls: v4l2_ctrl_add_handler should add all refs

Currently v4l2_ctrl_add_handler adds only the controls that are owned
by the handler. This is wrong. Instead all controls, whether owned or
not, should be added.

This is also implied by the v4l2-controls.txt documentation and it is
clearly the right thing to do. The only reason this was never noticed
before is because we never did this. Only recent changes in ivtv made
this error visible because there a third handler layer was added (handler
A inherits from handler B which inherits from C, D and E). Without this
change handler A only sees the controls owned by handler B and the controls
from C, D and E are missing.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Documentation: Update some card lists
Mauro Carvalho Chehab [Thu, 8 Mar 2012 14:01:36 +0000 (11:01 -0300)]
[media] Documentation: Update some card lists

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Add support for KWorld PC150-U ATSC hybrid tuner card
Kyle Strickland [Sat, 18 Feb 2012 05:24:53 +0000 (02:24 -0300)]
[media] Add support for KWorld PC150-U ATSC hybrid tuner card

[mchehab@redhat.com: CodingStyle fixes]
Signed-off-by: Kyle Strickland <kyle@kyle.strickland.name>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: gspca: append $(srctree) to -I parameters
Andy Shevchenko [Fri, 17 Feb 2012 07:57:09 +0000 (04:57 -0300)]
[media] media: gspca: append $(srctree) to -I parameters

Without this we have got the warnings like following if build with "make W=1
O=/var/tmp":
  cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: ivtv: append $(srctree) to -I parameters
Andy Shevchenko [Fri, 17 Feb 2012 07:57:11 +0000 (04:57 -0300)]
[media] media: ivtv: append $(srctree) to -I parameters

Without this we have got the warnings like following if build with "make W=1
O=/var/tmp":
  cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: saa7164: append $(srctree) to -I parameters
Andy Shevchenko [Fri, 17 Feb 2012 07:57:12 +0000 (04:57 -0300)]
[media] media: saa7164: append $(srctree) to -I parameters

Without this we have got the warnings like following if build with "make W=1
O=/var/tmp":
  cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: saa7134: append $(srctree) to -I parameters
Andy Shevchenko [Fri, 17 Feb 2012 07:57:13 +0000 (04:57 -0300)]
[media] media: saa7134: append $(srctree) to -I parameters

Without this we have got the warnings like following if build with "make W=1
O=/var/tmp":
  cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: dvb: append $(srctree) to -I parameters
Andy Shevchenko [Fri, 17 Feb 2012 07:57:10 +0000 (04:57 -0300)]
[media] media: dvb: append $(srctree) to -I parameters

Without this we have got the warnings like following if build with "make W=1
O=/var/tmp":
  cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: tuners: append $(srctree) to -I parameters
Andy Shevchenko [Fri, 17 Feb 2012 07:57:08 +0000 (04:57 -0300)]
[media] media: tuners: append $(srctree) to -I parameters

Without this we have got the warnings like following if build with "make W=1
O=/var/tmp":
  cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: video: append $(srctree) to -I parameters
Andy Shevchenko [Fri, 17 Feb 2012 07:57:07 +0000 (04:57 -0300)]
[media] media: video: append $(srctree) to -I parameters

Without this we have got the warnings like following if build with "make W=1
O=/var/tmp":
   CHECK   drivers/media/video/videobuf-vmalloc.c
   CC [M]  drivers/media/video/videobuf-vmalloc.o
 +cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]
 +cc1: warning: drivers/media/dvb/frontends: No such file or directory [enabled by default]
 +cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]
 +cc1: warning: drivers/media/dvb/frontends: No such file or directory [enabled by default]
   LD      drivers/media/built-in.o

Some details could be found in [1] as well.

[1] http://comments.gmane.org/gmane.linux.kbuild.devel/7733

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s2255drv: fix some endian bugs
Dan Carpenter [Fri, 17 Feb 2012 05:44:10 +0000 (02:44 -0300)]
[media] s2255drv: fix some endian bugs

I don't have this hardware and I don't know the subsystem very well.  So
please review this patch carefully.  The original code definitely looks
buggy though.

Sparse complains about some endian bugs where little endian bugs are
treated as cpu endian.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s2255drv: cleanup vidioc_enum_fmt_cap()
Dan Carpenter [Fri, 17 Feb 2012 05:43:27 +0000 (02:43 -0300)]
[media] s2255drv: cleanup vidioc_enum_fmt_cap()

"f" wasn't checked consistently, so static checkers complain.  This
function is always called with a valid "f" pointer, so I have removed
the check.

Also the indenting was messed up.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt9p031.c included media/v4l2-subdev.h twice
Danny Kukawka [Wed, 15 Feb 2012 18:20:55 +0000 (15:20 -0300)]
[media] mt9p031.c included media/v4l2-subdev.h twice

drivers/media/video/mt9p031.c included 'media/v4l2-subdev.h' twice,
remove the duplicate.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] adp1653: included linux/module.h twice
Danny Kukawka [Wed, 15 Feb 2012 18:20:44 +0000 (15:20 -0300)]
[media] adp1653: included linux/module.h twice

drivers/media/video/adp1653.c included 'linux/module.h' twice,
remove the duplicate.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rc/ir-raw: use kfifo_rec_ptr_1 instead of kfifo
James Hogan [Wed, 15 Feb 2012 14:24:21 +0000 (11:24 -0300)]
[media] rc/ir-raw: use kfifo_rec_ptr_1 instead of kfifo

Raw IR events are passed to the raw event thread through a kfifo. The
size of the event struct is 12 bytes, and space for 512 events is
reserved in the kfifo (6144 bytes), however this is rounded down to 4096
bytes (the next power of 2) by __kfifo_alloc().

4096 bytes is not divisible by 12 therefore if the fifo fills up a third
of a record will be written in the end of the kfifo by
ir_raw_event_store() because the recsize of the fifo is 0 (it doesn't
have records). When this is read by ir_raw_event_thread() a corrupted or
partial record will be read, and in the case of a partial record the
BUG_ON(retval != sizeof(ev)) gets hit too.

According to samples/kfifo/record-example.c struct kfifo_rec_ptr_1 can
handle records of a length between 0 and 255 bytes, so change struct
ir_raw_event_ctrl to use that instead of struct kfifo.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: i.MX27 camera: Add resizing support
Javier Martin [Tue, 28 Feb 2012 15:26:43 +0000 (12:26 -0300)]
[media] media: i.MX27 camera: Add resizing support

If the attached video sensor cannot provide the
requested image size, try to use resizing engine
included in the eMMa-PrP IP.

This patch supports both averaging and bilinear
algorithms.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: video: mx2_camera.c: Remove unneeded dev_dbg
Fabio Estevam [Wed, 15 Feb 2012 13:33:21 +0000 (10:33 -0300)]
[media] media: video: mx2_camera.c: Remove unneeded dev_dbg

csi clock frequency is already shown by:

dev_info(&pdev->dev, "MX2 Camera (CSI) driver probed, clock frequency: %ld\n",
clk_get_rate(pcdev->clk_csi));

,so no need to have the dev_dbg call to present the same information.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: video: mx2_camera.c: Provide error message if clk_get fails
Fabio Estevam [Wed, 15 Feb 2012 13:33:20 +0000 (10:33 -0300)]
[media] media: video: mx2_camera.c: Provide error message if clk_get fails

Provide error message if clk_get fails.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: i.MX27 camera: more efficient discard buffer handling
Javier Martin [Wed, 22 Feb 2012 10:59:34 +0000 (07:59 -0300)]
[media] media: i.MX27 camera: more efficient discard buffer handling

Some elements of 'mx2_buffer' are grouped together in another
auxiliary structure. This way we don't need to have unused
'vb2_buffer' structures for both discard buffers.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: i.MX27 camera: fix compilation warning
Javier Martin [Mon, 13 Feb 2012 14:40:01 +0000 (11:40 -0300)]
[media] media: i.MX27 camera: fix compilation warning

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: i.MX27 camera: return IRQ_NONE if no IRQ status bit is set
Javier Martin [Mon, 13 Feb 2012 13:51:53 +0000 (10:51 -0300)]
[media] media: i.MX27 camera: return IRQ_NONE if no IRQ status bit is set

If active_bufs() list is empty and no IRQ status bit is set
we are probably dealing with a share IRQ. Return IRQ_NONE in
this case.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: i.MX27 camera: Use spin_lock() inside the IRQ handler
Javier Martin [Mon, 13 Feb 2012 13:51:52 +0000 (10:51 -0300)]
[media] media: i.MX27 camera: Use spin_lock() inside the IRQ handler

We don't need to use spin_lock_irqsave() since there are not
any other IRQs that can race with this ISR.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: i.MX27 camera: Use list_first_entry() whenever possible
Javier Martin [Wed, 22 Feb 2012 10:59:33 +0000 (07:59 -0300)]
[media] media: i.MX27 camera: Use list_first_entry() whenever possible

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
[g.liakhovetski@gmx.de: fix one list_first_entry() instance]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media i.MX27 camera: handle overflows properly
Javier Martin [Wed, 22 Feb 2012 10:34:36 +0000 (07:34 -0300)]
[media] media i.MX27 camera: handle overflows properly

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media i.MX27 camera: improve discard buffer handling
Javier Martin [Tue, 7 Feb 2012 10:14:42 +0000 (07:14 -0300)]
[media] media i.MX27 camera: improve discard buffer handling

The way discard buffer was previously handled lead
to possible races that made a buffer that was not
yet ready to be overwritten by new video data. This
is easily detected at 25fps just adding "#define DEBUG"
to enable the "memset" check and seeing how the image
is corrupted.

A new "discard" queue and two discard buffers have
been added to make them flow trough the pipeline
of queues and thus provide suitable event ordering.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media i.MX27 camera: add start_stream and stop_stream callbacks
Javier Martin [Mon, 30 Jan 2012 12:14:11 +0000 (09:14 -0300)]
[media] media i.MX27 camera: add start_stream and stop_stream callbacks

Add "start_stream" and "stop_stream" callback in order to enable
and disable the eMMa-PrP properly and save CPU usage avoiding
IRQs when the device is not streaming. This also makes the driver
return 0 as the sequence number of the first frame.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
[g.liakhovetski@gmx.de: remove the mx27_camera_emma() macro]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media i.MX27 camera: migrate driver to videobuf2
Javier Martin [Mon, 30 Jan 2012 12:14:10 +0000 (09:14 -0300)]
[media] media i.MX27 camera: migrate driver to videobuf2

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L: mx2_camera: remove unsupported i.MX27 DMA mode, make EMMA mandatory
Sascha Hauer [Mon, 20 Feb 2012 10:55:24 +0000 (07:55 -0300)]
[media] V4L: mx2_camera: remove unsupported i.MX27 DMA mode, make EMMA mandatory

The i.MX27 DMA support was introduced with the initial commit of this
driver and originally created by me. However, I never got this stable
due to the racy DMA engine and used the EMMA engine instead. As the DMA
support is most probably unused and broken in its current state, remove
it. EMMA becomes the only supported mode on i.MX27.

This also helps us get rid of another user of the legacy i.MX DMA
support and remove the dependency on ARCH_MX* macros as these are
scheduled for removal.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[g.liakhovetski@gmx.de: remove unused goto]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] lgdt330x: fix signedness error in i2c_read_demod_bytes()
Xi Wang [Tue, 14 Feb 2012 17:32:41 +0000 (14:32 -0300)]
[media] lgdt330x: fix signedness error in i2c_read_demod_bytes()

The error handling in lgdt3303_read_status() and lgdt330x_read_ucblocks()
doesn't work, because i2c_read_demod_bytes() returns a u8 and (err < 0)
is always false.

        err = i2c_read_demod_bytes(state, 0x58, buf, 1);
        if (err < 0)
                return err;

Change the return type of i2c_read_demod_bytes() to int.  Also change
the return value on error to -EIO to make (err < 0) work.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] [trivial]: Fix typo in radio-sf16fmr2.c
Masanari Iida [Tue, 14 Feb 2012 13:06:09 +0000 (10:06 -0300)]
[media] [trivial]: Fix typo in radio-sf16fmr2.c

Correct spelling "contrls" to "controls" in
drivers/media/radio/radio-sf16fmr2.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] as102: map URB DMA addresses in the driver
Gianluca Gennari [Tue, 14 Feb 2012 12:25:00 +0000 (09:25 -0300)]
[media] as102: map URB DMA addresses in the driver

On a set-top-box based on the Broadcom 7405 SoC (MIPS), the Abilis as102 driver
causes a kernel oops while trying to map the URB stream buffers DMA addresses:

CPU 0 Unable to handle kernel paging request at virtual address 007b9900,
epc == 80010cc4, ra == 8039d108

Call Trace:
[<80010cc4>] mips_dma_map_page+0x14/0x108
[<8039d108>] usb_hcd_map_urb_for_dma+0x338/0x4a8
[<8039d540>] usb_hcd_submit_urb+0x2c8/0x8cc
[<e13655d8>] as102_submit_urb_stream+0x64/0xc8 [dvb_as102]
[<e1365680>] as102_usb_start_stream+0x44/0x80 [dvb_as102]
[<e1363628>] as102_dvb_dmx_start_feed+0xb4/0x17c [dvb_as102]
[<803e20f4>] dmx_ts_feed_start_filtering+0x5c/0x134
[<803de454>] dvb_dmxdev_start_feed+0xd4/0x158
[<803dff28>] dvb_dmxdev_filter_start+0x2b8/0x448
[<803e07ac>] dvb_demux_do_ioctl+0x2a0/0x654
[<803ddc8c>] dvb_usercopy+0x124/0x204
[<800d5284>] do_vfs_ioctl+0xa0/0x6c0
[<800d58e8>] sys_ioctl+0x44/0xa8
[<8000ecfc>] stack_done+0x20/0x40

On other boxes based on older SoCs (7401) this doesn't happen, so it looks like
a bug in the kernel specific to MIPS SMP. This issue has been reproduced on
several kernel versions from 2.6.18 to 3.1.0.

Since the base DMA address and the offsets are known, it is possible to map
the DMA addresses of the URB buffers directly in the driver. This workaround
fixes the problem and has been tested on both MIPS and x86 CPUs with success.

By the way, with this fix the driver works perfectly fine on the set-top-box:
both UHF and VHF frequencies are tuned without problems, and zapping is quite
fast. SNR and signal strength reports seems to work fine, too.

The only remaining problem (on both the PC and the set-top-box) is that after
a soft reboot the device is not recognized again by the kernel. It requires
a power cycle (or a manual unplug/replug) to be recognized again. So probably
the device state is not reset properly at shut-down.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: pre-allocate DVB isoc transfer buffers
Gianluca Gennari [Mon, 13 Feb 2012 16:59:22 +0000 (13:59 -0300)]
[media] em28xx: pre-allocate DVB isoc transfer buffers

On MIPS/ARM set-top-boxes, as well as old x86 PCs, memory allocation failures
in the em28xx driver are common, due to memory fragmentation over time, that
makes impossible to allocate large chunks of coherent memory.
A typical system with 256/512 MB of RAM fails after just 1 day of uptime (see
the old thread for detailed reports and crashlogs).

In fact, the em28xx driver allocates memory for USB isoc transfers at runtime,
as opposite to the dvb-usb drivers that allocates the USB buffers when the
device is initialized, and frees them when the device is disconnected.

Moreover, in digital mode the USB isoc transfer buffers are freed, allocated
and cleared every time the user selects a new channel, wasting time and
resources.

This patch solves both problems by allocating DVB isoc transfer buffers in
em28xx_usb_probe(), and freeing them in em28xx_usb_disconnect().
In fact, the buffers size and number depend only on the max USB packet size
that is parsed from the USB descriptors in em28xx_usb_probe(), so it can
never change for a given device.

This approach makes no sense in analog mode (as the buffer size depends on
the alternate mode selected at runtime), the patch creates two separate sets
of buffers for digital and analog modes.

For digital-only devices, USB buffers are created when the device is probed
and freed when the device is disconnected.
For analog-only devices, nothing changes: isoc buffers are created at runtime.
For hybrid devices, two sets of buffers are maintained: the digital-mode
buffers are created when the device is probed, and freed when the device is
disconnected; analog-mode buffers are created/destroyed at runtime as before.
So, in analog mode, digital and analog buffers coexists at the same time: this
can be justified by the fact that digital mode is by far more commonly used
nowadays, so it makes sense to optimize the driver for this use case scenario.

The patch has been tested in the last few days on a x86 PC and a MIPS
set-top-box, with the PCTV 290e (digital only) and the Terratec Hybrid XS
(hybrid device). With the latter, I switched several times between analog and
digital mode (Kaffeine/TvTime) with no issue at all.
I unplugged/plugged the devices several times with no problem.
Also, after over 3 days of normal usage in the MPIS set-top-box, the PCTV 290e
was still up and running.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: go7007: fix mismatch in mutex lock-unlock in [read|write]_reg_fp
Alexey Khoroshilov [Mon, 13 Feb 2012 14:01:32 +0000 (11:01 -0300)]
[media] staging: go7007: fix mismatch in mutex lock-unlock in [read|write]_reg_fp

If go7007_usb_vendor_request() fails in write_reg_fp()
or in read_reg_fp(), the usb->i2c_lock mutex left locked.

The patch moves mutex_unlock(&usb->i2c_lock) before check
for go7007_usb_vendor_request() returned value.

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>
12 years ago[media] cx22702: Fix signal strength
Jean Delvare [Sun, 12 Feb 2012 18:03:03 +0000 (15:03 -0300)]
[media] cx22702: Fix signal strength

The signal strength value returned is not quite correct, it decreases
when I increase the gain of my antenna, and vice versa. It also
doesn't span over the whole 0x0000-0xffff range. Compute a value which
at least increases when signal strength increases, and spans the whole
allowed range.

In practice I get 67% with my antenna fully amplified and 51% with
no amplification. This is close enough to what I get on my other
DVB-T adapter with the same antenna.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] it913x-fe ver 1.15 read signal strenght using reg VAR_P_INBAND
Malcolm Priestley [Sun, 12 Feb 2012 12:03:06 +0000 (09:03 -0300)]
[media] it913x-fe ver 1.15 read signal strenght using reg VAR_P_INBAND

Read signal strength using VAR_P_INBAND and apply FEC preferred values.

Note this does not work on IT9137 devices even with dvb-usb-it9135-01.fw
firmware.

Config read_sl allows switch between read signal strength and signal
level.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] it913x ver 1.27 Allow PID 8192 to turn PID filter off
Malcolm Priestley [Sun, 12 Feb 2012 10:31:41 +0000 (07:31 -0300)]
[media] it913x ver 1.27 Allow PID 8192 to turn PID filter off

Allow PID 8192 to turn PID filter off in USB high speed.

The PID number is still written to the PID index and will only
turn on again if that index is set to 0.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] it913x ver 1.26 change to remove interruptible mutex locks
Malcolm Priestley [Sun, 12 Feb 2012 10:29:38 +0000 (07:29 -0300)]
[media] it913x ver 1.26 change to remove interruptible mutex locks

Some virtual I2C commands are missed along some PID filtering
commands resulting complete stall of driver.

Since dvb-usb cannot handle the -EAGAIN error and commands
generally should not be missed mutex_lock is used instead.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] convert drivers/media/* to use module_i2c_driver()
Axel Lin [Sun, 12 Feb 2012 09:56:32 +0000 (06:56 -0300)]
[media] convert drivers/media/* to use module_i2c_driver()

This patch converts the drivers in drivers/media/* to use the
module_i2_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Heungjun Kim <riverful.kim@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Andrew Chew <achew@nvidia.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: Johannes Obermaier <johannes.obermaier@gmail.com>
Cc: Steven Toth <stoth@kernellabs.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - zc3xx: Set the exposure at start of hv7131r
Jean-François Moine [Mon, 27 Feb 2012 11:49:49 +0000 (08:49 -0300)]
[media] gspca - zc3xx: Set the exposure at start of hv7131r

The exposure was not set when autogain was set.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - zc3xx: Fix bad sensor values when changing autogain
Jean-François Moine [Mon, 27 Feb 2012 11:37:37 +0000 (08:37 -0300)]
[media] gspca - zc3xx: Fix bad sensor values when changing autogain

The setexposure added in commit 590f21680616 works only for the sensor hv7131r,
but it is called for all sensors when changing the autogain.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - zc3xx: Cleanup source
Jean-François Moine [Mon, 27 Feb 2012 11:26:05 +0000 (08:26 -0300)]
[media] gspca - zc3xx: Cleanup source

- copyright change
- use the kbuild module name for messages
- remove useless comments

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - zc3xx: Remove the low level traces
Jean-François Moine [Mon, 27 Feb 2012 10:51:09 +0000 (07:51 -0300)]
[media] gspca - zc3xx: Remove the low level traces

The low level traces are better done by usbmon.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - zc3xx: Do automatic transfer control for hv7131r and pas202b
Jean-François Moine [Mon, 27 Feb 2012 10:48:32 +0000 (07:48 -0300)]
[media] gspca - zc3xx: Do automatic transfer control for hv7131r and pas202b

The bridge register 11 reports the current transfer status.
This value is used to know about a possible overflow and to adjust
the transfer parameters (registers 07 and 08).

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - zc3xx: Adjust the JPEG decompression tables
Jean-François Moine [Mon, 27 Feb 2012 10:26:30 +0000 (07:26 -0300)]
[media] gspca - zc3xx: Adjust the JPEG decompression tables

As the bridge register 08 defines the JPEG compression quality,
it must be changed on JPEG quality change and also, the decompression
tables must be adjusted when the register varies.

[mchehab@redhat.com: replace a // comment by a /* */ one]
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - sonixj: Add exposure, gain and auto exposure for po2030n
Jean-François Moine [Mon, 27 Feb 2012 09:57:04 +0000 (06:57 -0300)]
[media] gspca - sonixj: Add exposure, gain and auto exposure for po2030n

The auto gain uses the knee algorithm.
Adding the setexposure control function forced to:
- rename of the previous function setexposure
- add a specific auto setting function

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - sonixj: Remove the jpeg control
Jean-François Moine [Mon, 27 Feb 2012 09:11:43 +0000 (06:11 -0300)]
[media] gspca - sonixj: Remove the jpeg control

The get_jcomp control is rarely used and its main information,
the JPEG quality, may be found in the images.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - pac7302: Do autogain setting work
Jean-François Moine [Mon, 27 Feb 2012 08:40:47 +0000 (05:40 -0300)]
[media] gspca - pac7302: Do autogain setting work

The autogain was always active.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - pac7302: Use the new video control mechanism
Jean-François Moine [Mon, 27 Feb 2012 08:38:09 +0000 (05:38 -0300)]
[media] gspca - pac7302: Use the new video control mechanism

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - pac7302: Simplify the function pkt_scan
Jean-François Moine [Mon, 27 Feb 2012 08:21:57 +0000 (05:21 -0300)]
[media] gspca - pac7302: Simplify the function pkt_scan

The JPEG header is always the same, so, it does not need to be rebuild
each time a new frame is received.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - pac7302: Cleanup source
Jean-François Moine [Mon, 27 Feb 2012 08:15:12 +0000 (05:15 -0300)]
[media] gspca - pac7302: Cleanup source

- copyright change
- use the kbuild module name for messages
- change module author
- remove '__' from the variable types
- use u8 instead of 'unsigned char'
- simplify the error messages
- remove useless initialization
- remove useless traces

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - pac7302: Add new webcam 06f8:301b
Jean-François Moine [Mon, 27 Feb 2012 07:58:59 +0000 (04:58 -0300)]
[media] gspca - pac7302: Add new webcam 06f8:301b

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Make subdev name independent of the I2C slave address
Sylwester Nawrocki [Fri, 17 Feb 2012 18:58:53 +0000 (15:58 -0300)]
[media] m5mols: Make subdev name independent of the I2C slave address

Initialize the subdev name properly so it doesn't have an I2C
bus and slave address appended to it.

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>
12 years ago[media] noon010pc30: Make subdev name independent of the I2C slave address
Sylwester Nawrocki [Fri, 17 Feb 2012 18:59:27 +0000 (15:59 -0300)]
[media] noon010pc30: Make subdev name independent of the I2C slave address

Initialize the subdev name properly so it doesn't have an I2C
bus and slave address appended to it.

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>
12 years ago[media] s5k6aa: Make subdev name independent of the I2C slave address
Sylwester Nawrocki [Tue, 13 Dec 2011 14:06:12 +0000 (11:06 -0300)]
[media] s5k6aa: Make subdev name independent of the I2C slave address

Initialize the subdev name properly so it doesn't have an I2C
bus and slave address appended to it.

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>
12 years ago[media] s5p-jpeg: Adapt to new controls
Andrzej Pietrasiewicz [Mon, 20 Feb 2012 10:32:25 +0000 (07:32 -0300)]
[media] s5p-jpeg: Adapt to new controls

Adapt to new controls (subsampling).

For encoding, the destination format now needs to be set to V4L2_PIX_FMT_JPEG
and the subsampling (4:2:2 or 4:2:0) needs to be set using the respective
control (V4L2_CID_JPEG_CHROMA_SUBSAMPLING). Required buffer size for
destination image during encoding is no longer deduced from the format (which
generally implied overestimation), but needs to be given from userspace in
sizeimage.

Not strictly related to the added controls, this patch also fixes setting the
subsampling of the destination image for decoding, depending on the destination
format.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-g2d: Added locking for writing control values to registers
Kamil Debski [Thu, 16 Feb 2012 13:52:47 +0000 (10:52 -0300)]
[media] s5p-g2d: Added locking for writing control values to registers

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-g2d: Add HFLIP and VFLIP support
Sachin Kamat [Thu, 16 Feb 2012 13:52:16 +0000 (10:52 -0300)]
[media] s5p-g2d: Add HFLIP and VFLIP support

Add support for flipping the image horizontally and vertically.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-mfc: Added support for clk_prepare
Kamil Debski [Thu, 16 Feb 2012 13:51:56 +0000 (10:51 -0300)]
[media] s5p-mfc: Added support for clk_prepare

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-g2d: Added support for clk_prepare
Kamil Debski [Thu, 16 Feb 2012 13:51:28 +0000 (10:51 -0300)]
[media] s5p-g2d: Added support for clk_prepare

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: vb2: support userptr for PFN mappings
Javier Martin [Thu, 16 Feb 2012 15:19:08 +0000 (12:19 -0300)]
[media] media: vb2: support userptr for PFN mappings

Some video devices need to use contiguous memory which is
not backed by pages as it happens with vmalloc. This patch
provides USERPTR handling for those devices.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-csis: Convert to the device managed resources
Sylwester Nawrocki [Tue, 14 Feb 2012 16:23:46 +0000 (13:23 -0300)]
[media] s5p-csis: Convert to the device managed resources

The devm_* functions are used in the platform device probe() for data
that is freed on driver removal. The managed device layer takes care
of undoing actions taken in the probe callback() and freeing resources
on driver detach. This eliminates the need for manually releasing
resources and simplifies error handling.

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>
12 years ago[media] s5p-fimc: Replace the crop ioctls with VIDIOC_S/G_SELECTION
Sylwester Nawrocki [Sat, 4 Feb 2012 20:03:54 +0000 (17:03 -0300)]
[media] s5p-fimc: Replace the crop ioctls with VIDIOC_S/G_SELECTION

Add support for cropping and composition setup on the video capture
node through VIDIOC_S/G_SELECTION ioctls. S/G_CROP, CROPCAP ioctls
are still  supported for applications since the core will translate
them to *_selection handler calls.

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>
12 years ago[media] s5p-fimc: Add support for VIDIOC_PREPARE_BUF/CREATE_BUFS ioctls
Sylwester Nawrocki [Mon, 30 Jan 2012 17:56:59 +0000 (14:56 -0300)]
[media] s5p-fimc: Add support for VIDIOC_PREPARE_BUF/CREATE_BUFS ioctls

Add VIDIOC_PREPARE_BUF and VIDIOC_CREATE_BUFS ioctl handlers to enable
support for multi-size buffer queue.

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>
12 years ago[media] s5p-fimc: Convert to the device managed resources
Sylwester Nawrocki [Mon, 30 Jan 2012 14:37:59 +0000 (11:37 -0300)]
[media] s5p-fimc: Convert to the device managed resources

The devm_* functions are used in the platform device probe() for data
that is freed on driver removal. The managed device layer takes care
of undoing actions taken in the probe callback() and freeing resources
on driver detach. This eliminates the need for manually releasing
resources and simplifies error handling.

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>
12 years ago[media] s5p-csis: Add explicit dependency on REGULATOR
Sylwester Nawrocki [Mon, 30 Jan 2012 14:39:53 +0000 (11:39 -0300)]
[media] s5p-csis: Add explicit dependency on REGULATOR

The driver used the regulator API so it should depend on REGULATOR.

[mchehab@redhat.com: break depends on on two lines, instead of using a \]
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>
12 years ago[media] s5p-fimc: convert to clk_prepare()/clk_unprepare()
Sylwester Nawrocki [Mon, 30 Jan 2012 14:39:30 +0000 (11:39 -0300)]
[media] s5p-fimc: convert to clk_prepare()/clk_unprepare()

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>
12 years ago[media] rtl2830: __udivdi3 undefined
Gianluca Gennari [Sun, 4 Mar 2012 21:19:41 +0000 (18:19 -0300)]
[media] rtl2830: __udivdi3 undefined

Il 29/02/2012 22:30, Geert Uytterhoeven ha scritto:
> http://kisskb.ellerman.id.au/kisskb/buildresult/5759200/ ERROR:
> "__udivdi3" [drivers/media/dvb/frontends/rtl2830.ko] undefined!
>
The following patch fixed the warning on my 32 bit system.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Add driver documentation
Sylwester Nawrocki [Mon, 30 Jan 2012 14:38:21 +0000 (11:38 -0300)]
[media] s5p-fimc: Add driver documentation

Add short documentation providing the driver usage details.

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>
12 years ago[media] s5p-jpeg: Add JPEG controls support
Sylwester Nawrocki [Fri, 17 Feb 2012 14:39:36 +0000 (11:39 -0300)]
[media] s5p-jpeg: Add JPEG controls support

This patch replaces VIDIOC_S/G_JPEGCOMP ioctl handlers with
V4L2_CID_JPEG_QUALITY control. Additionally it enables JPEG subsampling
and the restart interval configuration through V4L2_CID_JPEG_SUBSAMPLING
and V4L2_CID_JPEG_RESTART_INTERVAL controls. For the decoder video node
only V4L2_CID_JPEG_SUBSAMPLING is available as a read-only control.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-jpeg: Use struct v4l2_fh
Sylwester Nawrocki [Fri, 17 Feb 2012 14:38:09 +0000 (11:38 -0300)]
[media] s5p-jpeg: Use struct v4l2_fh

This patch is a prerequisite for per file handle control handlers.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L: Add JPEG compression control class documentation
Sylwester Nawrocki [Fri, 20 Jan 2012 18:38:50 +0000 (15:38 -0300)]
[media] V4L: Add JPEG compression control class documentation

Add DocBook entries for the JPEG control class.

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>
12 years ago[media] V4L: Add JPEG compression control class
Sylwester Nawrocki [Fri, 20 Jan 2012 18:37:44 +0000 (15:37 -0300)]
[media] V4L: Add JPEG compression control class

The V4L2_CID_JPEG_CLASS control class is intended to expose various
adjustable parameters of JPEG encoders and decoders. Following controls
are defined:

 - V4L2_CID_JPEG_CHROMA_SUBSAMPLING,
 - V4L2_CID_JPEG_RESTART_INTERVAL,
 - V4L2_CID_JPEG_COMPRESSION_QUALITY,
 - V4L2_CID_JPEG_ACTIVE_MARKER.

This covers only a part of relevant standard specifications. More
controls should be added in future if required.

The purpose of V4L2_CID_JPEG_CLASS class is also to replace some
functionality covered by VIDIOC_S/G_JPEGCOMP ioctls, i.e. the JPEG
markers presence and compression quality control. The applications
and drivers should switch from the ioctl to control based API, as
described in the subsequent patches for the Media API DocBook.

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>
12 years ago[media] tveeprom: update hauppauge tuner list thru 181
Michael Krufky [Mon, 6 Feb 2012 23:59:12 +0000 (20:59 -0300)]
[media] tveeprom: update hauppauge tuner list thru 181

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rtl2830: prevent .read_status() when sleeping
Antti Palosaari [Sun, 22 Jan 2012 01:40:58 +0000 (22:40 -0300)]
[media] rtl2830: prevent .read_status() when sleeping

Hardware is not accessible when device is sleeping.
Preventing such IOCTLs when sleep should be job of DVB CORE...

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rtl28xxu: many small tweaks
Antti Palosaari [Sun, 22 Jan 2012 01:26:52 +0000 (22:26 -0300)]
[media] rtl28xxu: many small tweaks

* some style issues
* remove rtl2832u device IDs
* move USB IDs to correct place

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rtl28xxu: make it compile against current Kernel
Antti Palosaari [Sat, 21 Jan 2012 23:28:38 +0000 (20:28 -0300)]
[media] rtl28xxu: make it compile against current Kernel

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rtl2830: correct I2C functionality
Antti Palosaari [Thu, 4 Aug 2011 23:27:19 +0000 (20:27 -0300)]
[media] rtl2830: correct I2C functionality

Implement I2C functionality according to real RTL2830 demod.

Do not send register page in first byte of each I2C write, instead
use logic to set page using own write when needed. Page register is
physical register 0 as generally used.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rtl28xx: reimplement I2C adapter
Antti Palosaari [Thu, 4 Aug 2011 23:21:16 +0000 (20:21 -0300)]
[media] rtl28xx: reimplement I2C adapter

It is almost perfect now!

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>