Commit Graph

11113 Commits (8e8ec596e6c0144e2dd500a57ee23dde9684df46)

Author SHA1 Message Date
Laurent Pinchart 2096a5dcf9 [media] v4l: subdev: Add device node support
Create a device node named subdevX for every registered subdev.

As the device node is registered before the subdev core::s_config
function is called, return -EGAIN on open until initialization
completes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Vimarsh Zutshi <vimarsh.zutshi@gmail.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:42 -03:00
Laurent Pinchart fc0a807985 [media] v4l: Share code between video_usercopy and video_ioctl2
The two functions are mostly identical. They handle the copy_from_user
and copy_to_user operations related with V4L2 ioctls and call the real
ioctl handler.

Create a __video_usercopy function that implements the core of
video_usercopy and video_ioctl2, and call that function from both.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:41 -03:00
Justin P. Mattock b251e61847 [media] drivers:media:cx231xx.h remove one to many l's in the word
The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:41 -03:00
Justin P. Mattock f41e4e9940 [media] drivers:media:cx23418.h remove one to many l's in the word
The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:41 -03:00
Igor M. Liplianin fd5466d1df [media] dw2102: prof 1100 corrected
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:41 -03:00
Igor M. Liplianin b16af29a56 [media] dw2102: i2c transfer corrected for yet another cards
Related to Acorp DS120 and some revisions of DVBWorld DW2102.
If you read three or more registers at one time, you get wrong value for third etc.
Actually, it didn't affect the driver as it reads registers only by one at a time.
But it needs to correct.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:40 -03:00
Igor M. Liplianin a84adf4007 [media] dw2102: i2c transfer corrected for some cards
Prof 7500 and TeVii s630, s660, s480 works better now

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:40 -03:00
Igor M. Liplianin e86e4dfa5a [media] dw2102: remove unnecessary delays for i2c transfer for some cards
Prof 7500 and TeVii s630, s660, s480 works faster now

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:40 -03:00
Igor M. Liplianin 5265ea54bf [media] dw2102: X3M TV SPC1400HD added
The card consist of PCI to USB bridge and USB DVB-S2 receiver.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:40 -03:00
Igor M. Liplianin 738e8ff90f [media] ds3000: wrong hardware tune function implemented
It is taken from another tree, where it is modified.
Patch to fix that

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:40 -03:00
Abylay Ospan 3b30e0a871 [media] stv0900: Update status when LOCK is missed
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:40 -03:00
Igor M. Liplianin 38cdbce763 [media] stv0900: speed up DVB-S searching
Simptoms:
After zapping DVB-S2 channel searching for DVB-S tooks long time.
Now it takes less than a second.

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:39 -03:00
Igor M. Liplianin 050b648e63 [media] cx23885, altera-ci: remove operator return <value> in void procedure
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:39 -03:00
Dan Carpenter b00aff6a36 [media] dib9000: fix return type in dib9000_mbx_send_attr()
dib9000_mbx_send_attr() returns an int.  It doesn't work to save
negative error codes in an unsigned char, so I've made "ret" an int
type.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:39 -03:00
Dan Carpenter ed54c0e33c [media] dib8000: fix small memory leak on error
kfree(state) if fe allocation fails.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:39 -03:00
Matti Aaltonen 96a9cc681e [media] V4L2: WL1273 FM Radio: TI WL1273 FM radio driver
This module implements V4L2 controls for the Texas Instruments
WL1273 FM Radio and handles the communication with the chip.

Signed-off-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:39 -03:00
Randy Dunlap 1b149bbe91 [media] media/radio/wl1273: fix build errors
RADIO_WL1273 needs to make sure that the mfd core is built to avoid
build errors:

ERROR: "mfd_add_devices" [drivers/mfd/wl1273-core.ko] undefined!
ERROR: "mfd_remove_devices" [drivers/mfd/wl1273-core.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Matti Aaltonen <matti.j.aaltonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:38 -03:00
Daniel Drake 0522921c0f [media] via-camera: Add suspend/resume support
Add suspend/resume support to the via-camera driver, so that the video
continues streaming over a suspend-resume cycle.

Originally implemented by Jon Corbet.

[mchehab@redhat.com: fix a small CodingStyle issue]
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:37 -03:00
Lukas Max Fisch 498e677cfd [media] Technisat AirStar TeleStick 2
Based on staging 2.6.39.

This patch is based on Veit Berwig's work.

Signed-off-by: Lukas Fisch <lukas.fisch@gmail.com>
Thanks-to: Veit Berwig <veit.Berwig@fimi.landsh.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:36 -03:00
Dan Carpenter 07988007f8 [media] stv090x: handle allocation failures
kmalloc() can fail so check whether state->internal is NULL.
append_internal() can return NULL on allocation failures so check that.
Also if we hit the error condition later in the function then there is
a memory leak and we need to call remove_dev() to fix it.

Also Oliver Endriss pointed out an additional leak that I missed in the
first version of this patch.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:36 -03:00
Manjunatha Halli 57f05bfa2e [media] drivers:media:radio: Update Kconfig and Makefile for wl128x FM driver
Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:36 -03:00
Manjunatha Halli a68793d2da [media] drivers:media:radio: wl128x: Kconfig & Makefile for wl128x driver
Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:36 -03:00
Manjunatha Halli 8b7a186c9b [media] drivers:media:radio: wl128x: FM driver TX sources
This has implementation for FM TX functionality.
It communicates with FM V4l2 module and FM common module.

Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:36 -03:00
Manjunatha Halli 59da522a4e [media] drivers:media:radio: wl128x: FM driver RX sources
This has implementation for FM RX functionality.
It communicates with FM V4l2 module and FM common module

Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:36 -03:00
Manjunatha Halli e8454ff7b9 [media] drivers:media:radio: wl128x: FM Driver Common sources
These are the sources for the common interfaces required by the
FM V4L2 driver for TI WL127x and WL128x chips.

These implement the FM channel-8 protocol communication with the
chip. This makes use of the Shared Transport as its transport.

Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:35 -03:00
Manjunatha Halli 7e38849631 [media] drivers:media:radio: wl128x: FM Driver V4L2 sources
This module interfaces V4L2 subsystem and FM common module.
It registers itself with V4L2 as Radio module.

Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:35 -03:00
Manjunatha Halli 8d19824ba2 [media] drivers:media:radio: wl128x: FM Driver common header file
These are common headers used in FM submodules (FM V4L2,
FM common, FM Rx,and FM TX).

Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:35 -03:00
Paul Cassella 7fd4b41f05 [media] ivtv: yuv: handle get_user_pages() -errno returns
get_user_pages() may return -errno, such as -EFAULT.  So don't blindly use
its return value as an offset into dma->map[] for the next get_user_pages()
call.  Since we'll give up and return an error if either fails, don't even
make the second call if the first failed to give us exactly what we were
looking for.

The old code would also call put_page() on as many elements of dma->map[]
as we'd asked for, regardless of how many were valid.

[Andy Walls modified this patch to return -EFAULT instead of -EINVAL
as Paul's observation "I'm not sure -EINVAL is the best return code vs
-EFAULT or -ENOMEM, [...]" was correct.  The return value bubbles up
as a return code for write(), for which the V4L2 API spec indicates
EINVAL is incorrect and EFAULT is correct.]

Signed-off-by: Paul Cassella <fortytwo-ivtv@maneteren.bigw.org>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:35 -03:00
Andy Walls 0d44b1235c [media] ivtv: Fix sparse warning regarding a user pointer in ivtv_write_vbi_from_user()
Fix the first, botched attempt at preventing direct use of a user pointer in
ivtv_write_vbi().

Reported-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:35 -03:00
Paul Cassella 793e71b667 [media] ivtv: udma: handle get_user_pages() returning fewer pages than we asked for
get_user_pages() may return fewer page than we ask for.  As we give up and
return an error in this case, we need to put_page() each of the pages we
did get.

[Andy Walls modified the patch, only removing the braces in the 'for'
statement, to eliminate a checkpatch warning.]

Signed-off-by: Paul Cassella <fortytwo-ivtv@manetheren.bigw.org>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:33 -03:00
Igor M. Liplianin 0cb73639cf [media] cx88: add support for TeVii S464 PCI card
The card uses ds3000 demod from Montage.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:27 -03:00
Igor M. Liplianin dcc8a12223 [media] ds3000: hardware tune algorithm
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:27 -03:00
Igor M. Liplianin a5bf834b4a [media] ds3000: add carrier offset calculation
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:27 -03:00
Igor M. Liplianin cb8f74da10 [media] ds3000: remove unnecessary dnxt, dcur structures
All necessary parameters already stored in frontend cache.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:27 -03:00
Igor M. Liplianin 18a73f36a2 [media] ds3000: clean up in tune procedure
Variable 'retune' does not make sense.
Loop is not needed for only one try.
Remove unnecessary dprintk's.
Remove a lot of debug messages and delays.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:27 -03:00
Igor M. Liplianin 2f30fb49c3 [media] dw2102: Copyright, cards list updated
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:27 -03:00
Igor M. Liplianin e8f5055ac8 [media] dw2102: add support for the TeVii S480 PCIe
The card consists of a PCI-e to USB Host Controller and
two TeVii S660 equivalent cards.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:27 -03:00
Igor M. Liplianin 5a530cbeca [media] dw2102: fix TeVii s660 remote control
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:26 -03:00
Igor M. Liplianin 52c506e09c [media] dw2102: corrections for TeVii s660 LNB power control
There are two TeVii s660 modifications with different LNB power control
implementations. It is safe to call both methods for each card.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:26 -03:00
Igor M. Liplianin 69519c3eff [media] dw2102: unnecessary NULL's removed
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:26 -03:00
Igor M. Liplianin d3210b5f96 [media] dw2102: Prof 1100 initialization fix
RC keys structure for Prof 1100 already defined, so remove extra initialization.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:26 -03:00
Igor M. Liplianin 4e59df8f25 [media] dw2102: Prof 7500 remote fix
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:26 -03:00
Igor M. Liplianin fa8bae102f [media] dw2102: Prof 7500: Lock LED implemented
Code changed for dw2102, stv0900 in order to achieve that.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:26 -03:00
Igor M. Liplianin 2adc591fb7 [media] dw2102: Add Terratec Cinergy S2 USB HD
MarkusF wrote:
I accidently got a Terratec Cinergy S2 USB HD (instead of a Terratec Cinergy S2 PCI HD).
I found in the windows driver, that the driver is for the usb ids:
0CCD:00A8
1F4D:3000
The dvb-s2 usb adapter has the id 0CCD-00A8.
So I patches your driver and added the usb id, where the 1F4D:3000 is
and it worked (after I downloaded the firmware dvb-fe-ds3000.fw).
w_scan found the channels and vdr is working fine.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:25 -03:00
Igor M. Liplianin d2ffc447ca [media] dw2102: add support for Geniatech SU3000 USB DVB-S2 card
The card uses ds3000 demod from Montage.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:25 -03:00
Igor M. Liplianin 195288da53 [media] dw2102: use separate firmwares for Prof 1100, TeVii S630, S660
Before this patch we can use only one card type from list due to
sharing one firmware name. Now it's fixed.
Also driver tries to attach only appropriate demod for this cards.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:23 -03:00
Igor M. Liplianin feb16e9833 [media] dw2102: Extend keymap parameter for not used remote
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:22 -03:00
Jesper Juhl ba0fd56a4f [media] TTUSB DVB: ttusb_boot_dsp() needs to release_firmware() or it leaks memory
In drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c:ttusb_boot_dsp() we
need to call release_firmware(fw) before returning or we'll leak - no
matter if we succeed or fail.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:22 -03:00
Mike Isely 19a0a296f2 [media] pvrusb2: Use sysfs_attr_init() where appropriate
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:22 -03:00
Mike Isely 058caa8784 [media] pvrusb2: Minor VBI tweak to help potential CC support
pvrusb2: Declare closed-caption setup for line 21 - this is needed for
sliced VBI capture support.  (However none of that works right now
anyway.)

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:22 -03:00
Servaas Vandenberghe 6188a0f151 [media] pvrusb2: width and height maximum values
pvrusb2: The origin of the capability bounds rectangle may differ from
(left=0,top=0) so the calculation should use absolute coordinates,
here below, or use relative coordinates like
cropl_val-cap->bounds.left and cropt_val-cap->bounds.top.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:22 -03:00
Mike Isely 35fa5d4c48 [media] pvrusb2: Fix a few missing default control values, for cropping
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:22 -03:00
Mike Isely 4cfe3319a1 [media] pvrusb2: Minor cosmetic code tweak
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:21 -03:00
Mike Isely 9bf98321b4 [media] pvrusb2: Handle change of mode before handling change of video standard
pvrusb2: Recognize and handle mode change before dealing with changes
related to the video standard.  Even though the video standard should
only matter when in analog mode, doing this way is technically cleaner
in case there's other stuff that might depend on both.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:21 -03:00
Malcolm Priestley 2b74334d12 [media] dvb_pll: DVB-S incorrect tune settings for dw2102/dm1105/cx88/opera1
This tuner PLL has missing initialisation settings resulting in
haphazard tuning. The PLL LPF was set to just 22000 symbol rate.

Basically, the module is a Sharp BS2F7HZ0194 (STV0299+IX2410)

I have had problems implementing the PLL in a new driver and
did not want to break the IX2410 out of the PLL.

This applies to DW2102, DM1105, CX88 and OPERA1 drivers.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:21 -03:00
Stefan Richter 92374e886c [media] firedtv: drop obsolete backend abstraction
Since the drivers/ieee1394/ backend was removed from firedtv, its I/O no
longer needs to be abstracted as exchangeable backend methods.

Also, ieee1394 variants of module and device probe and removal are no
longer there.  Move module probe and removal into firedtv-fw.c where
device probe and removal are implemented.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:21 -03:00
Vasiliy Kulikov 14ddc3188d [media] video: sn9c102: world-wirtable sysfs files
Don't allow everybody to change video settings.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:21 -03:00
Igor M. Liplianin b9bf2eafaa [media] ds3000: don't load firmware during demod init
Speed up tuning, as firmware is not necessary to load every attempt to tune

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:20 -03:00
Igor M. Liplianin caa687c805 [media] ds3000: loading firmware in bigger chunks
Decrease firmware loading time. Before it is ~4000 i2c calls,
now it is ~256 i2c calls to load ds3000 firmware.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:20 -03:00
Igor M. Liplianin 2a66bf370c [media] ds3000: decrease mpeg clock output
TeVii s480 works fine with that on DVB-S2 channels

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:20 -03:00
Igor M. Liplianin a0ea298d57 [media] ds3000: fill in demod init function
Make some initializations in init, not in tune function

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:19 -03:00
Lawrence Rust 6951803c24 [media] Add proper audio support for Nova-S Plus with wm8775 ADC
This patch adds audio DMA capture and ALSA mixer elements for the line
input jack of the Hauppauge Nova-S-plus DVB-S PCI card.  The Nova-S-plus
has a WM8775 ADC that is currently not detected.  This patch enables
this chip and exports volume, balance mute and ALC elements for ALSA
mixer controls.

[mchehab@redhat.com: Changed the patch to only talk with wm8775 if board
info says so. Also, added platform_data support, to avoid changing the
behaviour for other boards, and fixed CodingStyle]

[awalls@md.metrocast.net: Changed patch to make the WM8775_GID defintion
bridge driver private and let the bridge driver set the value of
v4l2_subdev.grp_id.]

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
2011-03-21 20:32:19 -03:00
Dmitri Belimov 724dcbfa9c [media] xc5000: add set_config and other
Add one more radio input, usefull for tm6010
Add control output amplitude.
Add set_config function for configure tuner when TV card hasn't dvb part.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:19 -03:00
Thomas Weber d1303567f7 [media] omap24xxcam: Fix compilation
Add linux/sched.h because of missing declaration of TASK_NORMAL.

This patch fixes the following error:

drivers/media/video/omap24xxcam.c: In function
'omap24xxcam_vbq_complete':
drivers/media/video/omap24xxcam.c:415: error: 'TASK_NORMAL' undeclared
(first use in this function)
drivers/media/video/omap24xxcam.c:415: error: (Each undeclared
identifier is reported only once
drivers/media/video/omap24xxcam.c:415: error: for each function it
appears in.)

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:19 -03:00
Peter Huewe 61ca1500c5 [media] video/saa7164: Fix sparse warning: Using plain integer as NULL pointer
This patch fixes the warning "Using plain integer as NULL pointer",
generated by sparse, by replacing
	if (var == 0)
with
	if (!var)
after an allocation
and all other offending 0s with NULL.

KernelVersion: linus' tree-1f0324c

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:19 -03:00
Hans Verkuil 7ee9e64a3d [media] cx18: fix kernel oops when setting MPEG control before capturing
The cxhdl->priv field was not set initially, only after capturing started.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:19 -03:00
Igor M. Liplianin 2f2710bd4e [media] cx23885, altera-ci: enable all PID's less than 0x20 in hardware PID filter
It takes too long time to scan due to low symbol rate PID's
like PAT, PMT, CAT, NIT.
For that matter we enabled permanently all PID's
less 0x20 in hardware PID filter for NetUP Dual DVB-T/C CI RF card
to combine rates.

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:18 -03:00
Igor M. Liplianin 702dd7903b [media] cx23885: disable MSI for NetUP cards, otherwise CI is not working
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:18 -03:00
Igor M. Liplianin 10d0dcd73c [media] cx23885: implement num_fds_portb, num_fds_portc parameters for cx23885_board structure
This is needed for multifrontend support.
NetUP Dual DVB-T/C CI RF card has frontends connected to port B & C
Each frontend has two switchable cores - DVB-T & DVB-C

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:18 -03:00
Igor M. Liplianin 557f48d572 [media] cx23885: implement tuner_bus parameter for cx23885_board structure
There is two external I2C buses in cx23885 chip.
Currently, analog tuners supported for second I2C bus only
In NetUP Dual DVB-T/C CI RF card tuners connected to first bus
So, in order to support analog tuners sitting on first bus
we need modifications.

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:18 -03:00
Igor M. Liplianin 78db854757 [media] Initial commit to support NetUP Dual DVB-T/C CI RF card
The card based on cx23885 PCI-e brige. Altera FPGA for CI,
multistandard demods stv0367 from STM for QAM & OFDM,  Xcieve xc5000 tuners
and additional cx25840 for second analog input.

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:18 -03:00
Igor M. Liplianin e80edce1ab [media] xc5000: add support for DVB-C tuning
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:17 -03:00
Igor M. Liplianin 17cce932e8 [media] Support for stv0367 multi-standard demodulator
The STV0367 is a multi-standard demodulator which is
capable of processing DVB-T as well as DVB-C signals.
It is fully compliant with DVB-T and DVB-C
recommendations for broadcast services.

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:17 -03:00
Igor M. Liplianin 349bcf02e3 [media] Altera FPGA based CI driver module
An Altera FPGA CI module for NetUP Dual DVB-T/C RF CI card.

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:16 -03:00
Peter Huewe f72cfd859b [media] video/cx231xx: Fix sparse warning: Using plain integer as NULL pointer
This patch fixes the warning "Using plain integer as NULL pointer",
generated by sparse, by replacing the offending 0s with NULL.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Reviewed-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:16 -03:00
Andrew Chew 9bd060e492 [media] V4L: Initial submit of OV9740 driver
This soc_camera driver is for Omnivision's OV9740 sensor.  This initial
submission provides support for YUV422 output at 1280x720 (720p), which is
the sensor's native resolution.  640x480 (VGA) is also supported, with
cropping and scaling performed by the sensor's ISP.

This driver is heavily based off of the existing OV9640 driver.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:16 -03:00
Guennadi Liakhovetski 787d0f9d5c [media] V4l: sh_mobile_ceu_camera: fix cropping offset calculation
Use the correct scales to calculate cropping offsets.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:15 -03:00
Guennadi Liakhovetski 379fa5d356 [media] V4L: mx3_camera: convert to videobuf2
Now that soc-camera supports videobuf API v1 and v2, camera-host drivers
can be converted to videobuf2 individually. This patch converts the
mx3_camera driver.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:15 -03:00
Guennadi Liakhovetski a616898d6d [media] V4L: sh_mobile_ceu_camera: convert to videobuf2
Convert the sh_mobile_ceu_camera driver to the videobuf2 API.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:15 -03:00
Guennadi Liakhovetski 592c2aba26 [media] V4L: soc-camera: extend to also support videobuf2
Extend soc-camera core to also support the videobuf2 API.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:15 -03:00
Guennadi Liakhovetski bd94f58828 [media] V4L: add missing EXPORT_SYMBOL* statements to vb2
videobuf2-memops and videobuf2-core can be compiled as modules, in which
case 3 more symbols from videobuf2-memops.c have to be exported.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:14 -03:00
Guennadi Liakhovetski 353c2129fd [media] V4L: omap1_camera: join split format lines
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:14 -03:00
Alberto Panizzo a48be1d626 [media] V4L: mx3_camera: fix capture issues for non 8-bit per pixel formats
If the camera was set to output formats like RGB565 YUYV or SBGGR10,
the resulting image was scrambled due to erroneous interpretations of
horizontal parameter's units.

This patch in fourcc_to_ipu_pix, eliminate also the pixel formats mappings
that, first are not used within mainline code and second, standing at
the datasheets, they will not work properly:

The IPU internal bus support only the following data formatting
(44.1.1.3 Data Flows and Formats):
 1 YUV 4:4:4 or RGB-8 bits per color component
 2 YUV 4:4:4 or RGB-10 bits per color component
 3 Generic data (from sensor to the system memory only)

And format conversions are done:
 - from memory: unpacking from other formats to IPU supported ones
 - to memory: packing in the inverse order.

So, assigning a packing/unpacking strategy to the IPU for those formats
will produce a packing to memory and not the inverse.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:14 -03:00
Anatolij Gustschin 44facdc8c4 [media] V4L: mx3_camera: correct 'sizeimage' value reporting
The 'pix->width' field may be updated in mx3_camera_set_fmt() to
fulfill the IPU stride line alignment requirements. If this update
takes place, the 'fmt.pix.sizeimage' field in the struct v4l2_format
stucture returned by VIDIOC_S_FMT is wrong. We need to update the
'pix->sizeimage' field in the mx3_camera_set_fmt() function to fix
this issue.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:14 -03:00
Mathias Krause 5bccd60852 [media] V4L: omap1_camera: fix use after free
Even though clk_put() is a no-op on most architectures it is not for
some ARM implementations. To not fail on those, release the clock timer
before freeing the surrounding structure.

This bug was spotted by the semantic patch tool coccinelle using the
script found at scripts/coccinelle/free/kfree.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:14 -03:00
Alberto Panizzo 48a3c77338 [media] V4L: soc_mediabus: add a method to obtain the number of samples per pixel
Add a function to calculate the number of samples on the media-bus,
required to retrieve one pixel of a certain format.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:13 -03:00
Anatolij Gustschin 7fdbd85bce [media] V4L: soc-camera: start stream after queueing the buffers
Some camera systems have strong requirement for capturing
an exact number of frames after starting the stream and do
not tolerate losing captured frames. By starting the stream
after the videobuf has queued the buffers, we ensure that
no frame will be lost.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:13 -03:00
Qing Xu ed5b65dc36 [media] V4L: soc-camera: add enum-frame-size ioctl
add vidioc_enum_framesizes implementation, follow default_g_parm()
and g_mbus_fmt() method

Signed-off-by: Qing Xu <qingx@marvell.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:13 -03:00
Hans Verkuil d63044401a [media] saa7134-empress: add missing MPEG controls
Reported by, and based on a patch from, Martin Dauskardt.

The AUDIO_AC3_BITRATE control is still missing from this list, but such
optional controls are a bit hard to handle. This will be fixed automatically
when we switch to the control framework.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reported-by: Martin Dauskardt <martin.dauskardt@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:12 -03:00
Hans Verkuil e68044e235 [media] firedtv: remove obsolete ieee1394 backend code
drivers/ieee1394/ has been removed in Linux 2.6.37.  The corresponding
backend code in firedtv is no longer built in now and can be deleted.
Firedtv continues to work with drivers/firewire/.

Also, fix a Kconfig menu comment:  Removal of CONFIG_IEEE1394 made the
"Supported FireWire (IEEE 1394) Adapters" comment disappear; bring it back
with corrected dependency.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:12 -03:00
Hans Verkuil 7ee40aadab [media] v4l: removal of old, obsolete ioctls
Some ioctl's were defined wrong on 2.6.2 and 2.6.6, using the wrong
type of R/W arguments. They were fixed, but the old ioctl names are
still there, maintained to avoid breaking binary compatibility:

There's no sense on preserving those forever, as it is very doubtful
that someone would try to use a such old binary with a modern kernel.
Removing them will allow us to remove some magic done at the V4L ioctl
handler.

Note that any application compiled with a videodev2.h from 2.6.7 or later
will be using the correct ioctls.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:12 -03:00
Hans de Goede 76fafe78df [media] gspca_cpia1: Don't allow the framerate divisor to go above 2
Having a framerate divisor of 3 is not really necesarry and leads to
various troubles (frames going missing, compression issues) when allowed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:11 -03:00
Hans de Goede 49b61ec9b5 [media] gspca: Add new vicam subdriver
This is a complete rewrite of the old v4l1 vicam subdriver, featuring
multiple resolutions, gain + exposure control and still has less code.

Oh and it is a v4l2 driver rather then v4l1 ofcourse :)

Many thanks to Devin Heitmueller <dheitmueller@kernellabs.com> for
donating his 3com homeconnect to me, which made this rewrite possible.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:10 -03:00
Hans de Goede bcc6f66906 [media] gspca_sn9c20x: Add another MSI laptop to the sn9c20x upside down list
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:10 -03:00
Hans de Goede 6899a9c777 [media] gspca_sn9c20x: Make buffers slightly larger for JPEG frames
In good lighting conditions (lots of details visible) the current buffers
are sometimes too small.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:10 -03:00
Hans de Goede b39e0cb901 [media] gspca_sn9c20x: Add LED_REVERSE flag for 0c45:62bb
This fixes the led not working on this camera

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:10 -03:00
Hans de Goede 779b51f7a5 [media] gspca_sn9c20x: Add hflip and vflip controls for the ov7660 sensor
Tested with a camera with usb-id: 0c45:62bb

Also enable dmi based flopped laptop detection for the 0c45:627b ov7660 model.
Some of the MSI laptops with upside down camera have this one instead of the
0c45:624f.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:10 -03:00
Hans de Goede 8bc50f3540 [media] gspca_sn9c20x: Fix colored borders with ov7660 sensor
Tested with a camera with usb-id: 0c45:62bb

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:09 -03:00
Jean-François Moine c42cedbb65 [media] gspca - ov519: Add the 800x600 resolution for sensors ov2610/2610ae
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:08 -03:00
Jean-François Moine 07c6c9c6d0 [media] gspca - ov519: Add the sensor ov2610ae
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:08 -03:00
Jean-François Moine 20c957b360 [media] gspca - sonixj: The pin S_PWR_DN is inverted for sensor mi0360
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:08 -03:00
Jean-François Moine d57747f1e7 [media] gspca - ov534: Add saturation control for ov767x
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:08 -03:00
Jean-François Moine 458efe2d55 [media] gspca - ov534: Add the webcam 06f8:3002 and sensor ov767x
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:08 -03:00
Jean-François Moine 228dd2660c [media] gspca - ov534: Use the new control mechanism
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:08 -03:00
Jean-François Moine 062909f649 [media] gspca - sonixj, zc3xx: Let some bandwidth for audio when USB 1.1
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:07 -03:00
Jean-François Moine 5c95606b1d [media] gspca - sonixj: Set both pins for infrared of mt9v111 webcams
This avoids to define the webcam model.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:07 -03:00
Jean-François Moine 336d23ef88 [media] gspca - sonixj: Same init for all bridges but the sn9c102p
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:07 -03:00
Jean-François Moine e6a92a7445 [media] gspca - sonixj: Simplify GPIO setting when audio present
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:06 -03:00
Jean-François Moine 222036765c [media] gspca - sonixj: Adjust autogain for sensor mt9v111
The gain/expo adjustment was too long.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:06 -03:00
Jean-François Moine 804632201f [media] gspca - sonixj: Fix start sequence of sensor mt9v111
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:06 -03:00
Jean-François Moine b96cfc33e7 [media] gspca - sonixj: Update the JPEG quality for best image transfer
During image capture, the filling rate of the isoc packets is computed.
It is then used by a work queue to update the current JPEG quality.

Tested-by: Franck Bourdonnec <fbourdonnec@chez.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:06 -03:00
Jean-François Moine dccdcccdd3 [media] gspca - sonixj: Have the same JPEG quality for encoding and decoding
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:06 -03:00
Jean-François Moine a4a3076ffc [media] gspca - sonixj: Better scanning of isochronous packets
A marker 'ff ff 00 c4 c4 96' indicates an end of frame.
It is 62 bytes long and may be splitted on 2 packets.
It contains a flag 'USB full' which indicates that the frame is truncated.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:06 -03:00
Jean-François Moine 0f77f40c30 [media] gspca - sonixj: Move the avg lum computation to a separate function
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:05 -03:00
Hans Verkuil 87a0c94ce6 [media] v4l2-ctrls: Fix control enumeration for multiple subdevs with ctrl
v4l2-ctl and qv4l2 enumerate controls using V4L2_CTRL_FLAG_NEXT_CTRL,
falling back to the old method if the flag isn't supported.

The v4l2_subdev_queryctrl function will currently handle that flag, but
for the controls of the subdev only. This isn't right, it should refuse
this flag, otherwise v4l2-ctl will only see the controls of the first
subdev.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:04 -03:00
Mauro Carvalho Chehab fb8decfabd [media] em28xx: properly handle subdev controls
Subdev controls return codes are evil, as they return -EINVAL to mean
both unsupported and invalid arguments. Due to that, we need to use a
trick to identify what controls are supported by a subdev.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:04 -03:00
Mauro Carvalho Chehab 78e51566f0 [media] em28xx: Fix return value for s_ctrl
On some cases, driver returns 1. This should be OK, but qv4l2 is too
strict about return values.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:04 -03:00
Mauro Carvalho Chehab 0e09a3c92b [media] tvp5150: device detection should be done only once
Having the device detection happening at reset is bad, as every time,
it will produce a message like:
	tvp5150 2-005c: tvp5150am1 detected.

This only polutes the log and for an accidental kernel hacker, it looks
like a real problem. So, move those printk's to happen during device
probe.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:04 -03:00
Mauro Carvalho Chehab 437f5fa342 [media] tuner: Remove remaining usages of T_DIGITAL_TV
A few places used T_DIGITAL_TV internally. Remove the usage of this
obsolete mode mask.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:04 -03:00
Mauro Carvalho Chehab 550df5a450 [media] tuner-core: Don't touch at standby during tuner_lookup
It makes no sense that tuner_lookup would touch at the standby
state. Remove it.

Thanks-to: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:03 -03:00
Mauro Carvalho Chehab 0eec66c0df [media] tuner-core: Rearrange some functions to better document
Group a few functions together and add/fix comments for each
block of the driver.

This is just a cleanup patch meant to improve driver readability.
No functional changes in this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:03 -03:00
Mauro Carvalho Chehab a2894e3f8e [media] tuner-core: Improve function documentation
This driver is complex, and used by everyone. Better to have it
properly documented.

No functional changes are done in this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:03 -03:00
Mauro Carvalho Chehab ad020dc2fe [media] tuner-core: remove usage of DIGITAL_TV
tuner-core has no business to do with digital TV. So, don't use
T_DIGITAL_TV on it, as it has no code to distinguish between
them, and nobody fills T_DIGITAL_TV right.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:03 -03:00
Mauro Carvalho Chehab 2d351df443 [media] Remove the remaining usages for T_STANDBY
tda9887 used to use the T_STANDBY type internally, while tea5761
used it to put the device to sleep. Fix the code for it to work
properly with the tuner core changes and remove this flag from
tuner.h.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:03 -03:00
Mauro Carvalho Chehab 0ae79d993c [media] tuner-core: Fix a few comments on it
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:03 -03:00
Mauro Carvalho Chehab a34ec5f374 [media] tuner-core: dead code removal
Remove the now obsolete set_freq. Also merge set_addr and set_type_addr.

In the past, it used to have two different setup calls, one to set just
the tuner type to any tuner found, and another to set the type only if
the address matches. Those two internal calls were grouped together,
but the functions weren't merged, making the code uglier.

No functional changes are done in this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:02 -03:00
Mauro Carvalho Chehab 900f734b3b [media] tuner-core: Don't use a static var for xc5000_cfg
A static var is evil, especially if a device has two boards with
xc5000. Instead, just like the other drivers, use stack to store
its config during setup.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:02 -03:00
Mauro Carvalho Chehab 7d275bf840 [media] tuner-core: CodingStyle cleanups
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:02 -03:00
Mauro Carvalho Chehab e2f63d9ba5 [media] tuner-core: do the right thing for suspend/resume
Power down tuners at suspend. At resume, if the tuner is in standby,
calls set_mode, that will turn it on and set the latest frequencies.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:01 -03:00
Mauro Carvalho Chehab cbde689823 [media] tuner-core: Better implement standby mode
In the past, T_STANDBY were used on devices with a separate radio tuner to
mark a tuner that were disabled. With the time, it got newer meanings.

Also, due to a bug at the logic, the driver might incorrectly return
T_STANDBY to userspace.

So, instead of keeping the abuse, just use a boolean for storing
such information.

We can't remove T_STANDBY yet, as this is used on two other drivers. A
latter patch will address its usage outside tuner-core.

Thanks-to: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:01 -03:00
Mauro Carvalho Chehab e2d25a2474 [media] tuner-core: Some cleanups at check_mode/set_mode
Properly document those functions and do some cleanups around that.
There's just one behavior change on this patchset: it will now restore
TV frequency when changing from radio to TV mode.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:01 -03:00
Mauro Carvalho Chehab 9f3f71ef6d [media] tuner-core: Reorganize the functions internally
This is a big patch with no functional changes. It just
rearranges everything inside the driver, and prepares to
break TV and Radio into two separate fops groups.

Currently, it has an heuristics logic to determine if the
call came from radio or video. However, the caller driver
knows for sure, so tuner-core shouldn't try to guess it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:01 -03:00
Mauro Carvalho Chehab b77bdb0288 [media] tuner-core: move some messages to the proper place
Move the frequency set debug printk's to the code that actually
are changing it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:00 -03:00
Mauro Carvalho Chehab 04f590e82b [media] tuner-core: remove the legacy is_stereo() call
Nobody is using this legacy call. Just remove it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:00 -03:00
Mauro Carvalho Chehab 5620094a2e [media] tuner-core: Remove V4L1/V4L2 API switch
V4L1 was removed. So, the code there is just dead code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:00 -03:00
Mauro Carvalho Chehab 121ec13267 [media] cx88: Don't allow opening a device while it is not ready
After registering the cdev, it would be possible do have an open on it.
In a matter of fact, some versions of udev do this. So, move registration
to the end and protect it with a mutex.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:00 -03:00
Mauro Carvalho Chehab b618726414 [media] cx88: use unlocked_ioctl for cx88-video.
cx88-video has locks. don't use the locked ioctl version, as
it is not needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:00 -03:00
Mauro Carvalho Chehab 4e105039da [media] cx231xx: Add support for PV Xcapture USB
Adds support for Pixelviex Xcapture USB grabber device.
This device has one composite and one s-video entry
only, plus a button.

For now, the button is not supported.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:00 -03:00
Mauro Carvalho Chehab 38f5ddc1bf [media] cx231xx: Allow some boards to not use I2C port 3
Some devices don't need to use it. So allow to just disable this logic.
Having it enabled on some devices cause power management to complain,
generating error -71.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:59 -03:00
Mauro Carvalho Chehab 2f86138706 [media] cx231xx: Use parameters to describe some board variants
Instead of per-model tests all over the code, use some parameters
at the board entries to describe the model variants for:
	- devices with 417 MPEG encoder;
	- devices that use external AV;
	- devices where vbi VANC endpoint doesn't work;
	- devices with xc5000 that require different IF
	  initialization (and probably will cover also
	  xc3028).
	- devices with xceive tuner that require a reset
	  during init.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:59 -03:00
Mauro Carvalho Chehab 3f25ffa2cd [media] cx231xx: Use a generic check for TUNER_XC5000
The check for xc5000 assumes that the tuner will always
be using the same bus and will have the same address.
As those are configurable via dev->board, it should use,
instead, the values defined there.

Also, a similar type of test will be needed by other
tuners (for example, for TUNER_XC2028)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:59 -03:00
Mauro Carvalho Chehab 8bb84227d1 [media] cx231xx: Simplify interface checking logic at probe
Just a cleanup patch. Removes one indent level by moving
the return -ENODEV to happen before the device register
logic, if the interface is not the audio/video (int 1).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:59 -03:00
Alina Friedrichsen b8bc77db1e [media] tuner-xc2028: More firmware loading retries
My Hauppauge WinTV HVR-1400 needs sometimes more then only one retry to load the firmware successfully.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:58 -03:00
iceberg 2b97e2201e [media] double mutex lock in drivers/media/radio/si470x/radio-si470x-
KERNEL_VERSION: 2.6.37
common.c in function ssize_t si470x_fops_read.

1. First mutex_lock on &radio->lock in line 441
2. Second in line 462

I think that mutex in line 462 is not needed.

 433static ssize_t si470x_fops_read(struct file *file, char __user *buf,
 434                size_t count, loff_t *ppos)
 435{
....
 441        mutex_lock(&radio->lock);
 442        if ((radio->registers[SYSCONFIG1] & SYSCONFIG1_RDS) == 0)
 443                si470x_rds_on(radio);
 444
 445        /* block if no new data available */
 446        while (radio->wr_index == radio->rd_index) {
 447                if (file->f_flags & O_NONBLOCK) {
 448                        retval = -EWOULDBLOCK;
 449                        goto done;
 450                }
 451                if (wait_event_interruptible(radio->read_queue,
 452                        radio->wr_index != radio->rd_index) < 0) {
 453                        retval = -EINTR;
 454                        goto done;
 455                }
 456        }
 457
 458        /* calculate block count from byte count */
 459        count /= 3;
 460
 461        /* copy RDS block out of internal buffer and to user buffer */
 462        mutex_lock(&radio->lock);

Found by Linux Device Drivers Verification Project

Remove second mutex.

Signed-off-by: Alexander Strakh <strakh@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:56 -03:00
Hans Verkuil cbfb3daa66 [media] cpia2: convert to video_ioctl2
Unable to test this due to lack of hardware.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:51 -03:00
Hans Verkuil afa3852161 [media] pwc: convert to video_ioctl2
Tested with a Logitech QuickCam Pro 4000.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:51 -03:00
Hans Verkuil b577f962d2 [media] pwc: convert to core-assisted locking
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:51 -03:00
Hans Verkuil 5b2830298d [media] vivi: fix compiler warning
drivers/media/video/vivi.c:1059: warning: this decimal constant is unsigned only in ISO C90

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:51 -03:00
Hans Verkuil 7e996afa81 [media] vivi: convert to the control framework and add test controls
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:50 -03:00
Hans Verkuil 0eb73de019 [media] tvp7002: use control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:50 -03:00
Hans Verkuil 9a775323ee [media] vpx3220: use control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:50 -03:00
Hans Verkuil 6c45ec718e [media] tvp5150: use the control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:50 -03:00
Hans Verkuil cf6832afe5 [media] tvp514x: use the control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:50 -03:00
Hans Verkuil e3d5ef0410 [media] tlv320aic23b: use control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:50 -03:00
Hans Verkuil 4744ebf631 [media] saa7110: use control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:50 -03:00
Hans Verkuil bd84a65aef [media] bt819: use control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:49 -03:00
Hans Verkuil ceed52d67e [media] adv7343: use control framework
Also fixed a memory leak in the probe function if an error occurred.
The gain control range was also fixed (a proper range from -64 to 64).

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:49 -03:00
Hans Verkuil a75b9be1c2 [media] cx18: Use the control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:49 -03:00
Hans Verkuil 34a078da8e [media] cs5345: use the control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:49 -03:00
Mauro Carvalho Chehab 1f075d1f1b [media] technisat-usb2: CodingStyle cleanups
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:49 -03:00
Mauro Carvalho Chehab d642f2f3c5 [media] add support for Encore FM3
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:49 -03:00
Mauro Carvalho Chehab 99fb079aad [media] saa7134: Properly report when a board doesn't have eeprom
When a device is not detected, the driver prints a warning message.
That's ok, except for the fact that, even on newer devices that have
eeprom but aren't yet supported, it prints a message saying that the
device doesn't have eeprom.

Fix it by having a separate message for devices with eeprom, but not
yet known by the driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:48 -03:00
Mauro Carvalho Chehab 0cda12556b [media] tuner-simple: add support for Tena TNF5337 MFD
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:48 -03:00
Pawel Osciak e007a32526 [media] v4l: vivi: port to videobuf2
Make vivi use videobuf2 in place of videobuf.

Signed-off-by: Pawel Osciak <p.osciak@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>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:48 -03:00
Mauro Carvalho Chehab 8112248a1b [media] Move CI cxd2099 driver to staging
This driver is abusing the kernel<=>userspace API, due to the lack of a
proper solution for it. A discussion were done at:
	http://www.mail-archive.com/linux-media@vger.kernel.org/msg22196.html
But there's not a solution for it yet. So, move the driver to staging, while
we don't have a final solution.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:47 -03:00
Oliver Endriss 4862d6b2e2 [media] stv090x: 22kHz workaround must also be performed for the 2nd frontend
22kHz workaround must also be performed for the 2nd frontend.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:46 -03:00
Oliver Endriss 3d0cef2c3c [media] ngene: Improved channel initialisation and release
Refactored code for channel initialisation and release:
- Do not create device nodes which are not required.
- Better error handling.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:46 -03:00
Oliver Endriss 179fd15a99 [media] stv090x: Fix losing lock in dual DVB-S2 mode
Do not clear registers ACLC/BCLC in DVB-S2 mode for Cut <= 20.
Otherwise, the demod could lose the lock periodically.
Verified with cineS2 and Duoflex.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:46 -03:00
Oliver Endriss 908f668bfb [media] stv090x: Fixed typos in register macros
Fixed typos in register macros.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:45 -03:00
Oliver Endriss e549bedf8f [media] ngene: Fix copy-paste error
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:45 -03:00
Oliver Endriss f164396ff5 [media] ngene: Enable CI for Mystique SaTiX-S2 Dual (v2)
Enable CI for Mystique SaTiX-S2 Dual (v2).

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:45 -03:00
Ralph Metzler cce33c3493 [media] ngene: Add net device
Add dvb net device.
Note that the physical address must be setup manually.

Signed-off-by: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:45 -03:00
Ralph Metzler 1b7c41ef33 [media] ngene: Shutdown workaround
Implement shutdown workaround for some chipsets.

Signed-off-by: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:45 -03:00
Ralph Metzler 0f0b270f90 [media] ngene: CXD2099AR Common Interface driver
Driver for the Common Interface Controller CXD2099AR.
Supports the CI of the cineS2 DVB-S2.

For now, data is passed through '/dev/dvb/adapterX/sec0':
- Encrypted data must be written to 'sec0'.
- Decrypted data can be read from 'sec0'.
- Setup the CAM using device 'ca0'.

Signed-off-by: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:45 -03:00
Oliver Endriss 8a484719c7 [media] ngene: Clean-up driver initialisation (part 1)
If tuner initialisation failed, the frontend node was not removed.
When the frontend was opened, a kernel oops occurred...

This is the first step to improve error handling during initialisation.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:44 -03:00
Oliver Endriss 5fec18574f [media] ngene: Support up to 4 tuners
Support up to 4 tuners for cineS2 v5, duoflex & mystique v2.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:44 -03:00
Oliver Endriss ac9725d224 [media] ngene: Fixes for TS input over I2S
Fix TS input over I2S.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:44 -03:00
Oliver Endriss 09961aae7b [media] ngene: Firmware 18 support
Small modifications for firmware 18.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:44 -03:00
Oliver Endriss f790bdd00d [media] stv090x: Optional external lock routine
Card driver may supply its own lock routine now.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:44 -03:00
Andreas Regel 5bd0dc2d8a [media] stv090x: make sleep/wakeup specific to the demod path
The STV0900 features two demodulator paths in one chip. Thus it is not
possible to use the generic power off function of the chip when sending
one of them to standby. The other path will stop working in that case.

The sleep function now switches off functionality specific to the demod
path. The global stuff is only switched off, when both paths are in
sleep mode. The wakeup function always turns on the global functionality
and then works specific to the path.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:44 -03:00
Mauro Carvalho Chehab 2c2c441b10 [media] dib8000: Fix some wrong alignments
Something went wrong with the alignments for the if clause at line 2113.
Instead of using one tab for alignments, it used 3 tabs, plus one space
character.

WARNING: suspect code indent for conditional statements (8, 33)
+	if ((state->fe[0]->dtv_property_cache.delivery_system != SYS_ISDBT) ||
[...]
+				 int i = 80000;

WARNING: suspect code indent for conditional statements (33, 41)
+				 for (index_frontend = 0; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) {
+					 dib8000_set_bandwidth(state->fe[index_frontend], fe->dtv_property_cache.bandwidth_hz / 1000);

WARNING: suspect code indent for conditional statements (33, 41)
+				 do {
+					 msleep(20);

WARNING: suspect code indent for conditional statements (41, 49)
+					 for (index_frontend = 0; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) {
+						 if (((tune_failed >> index_frontend) & 0x1) == 0) {

WARNING: suspect code indent for conditional statements (49, 57)
+						 if (((tune_failed >> index_frontend) & 0x1) == 0) {
+							 found = dib8000_autosearch_irq(state->fe[index_frontend]);

WARNING: suspect code indent for conditional statements (41, 49)
+					 if ((nbr_pending == 0) && (exit_condition == 0))
+						 exit_condition = 1;

Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:43 -03:00
Mauro Carvalho Chehab 46f7296a52 [media] dib7000p: Fix 4-byte wrong alignments for some case statements
ERROR: switch and case should be at the same indent
 	switch (ch->u.ofdm.transmission_mode) {
[...]
+    case TRANSMISSION_MODE_4K:

WARNING: please, no spaces at the start of a line
+    case TRANSMISSION_MODE_4K:$

ERROR: switch and case should be at the same indent
 	switch (ch->u.ofdm.transmission_mode) {
[...]
+    case TRANSMISSION_MODE_4K:

WARNING: please, no spaces at the start of a line
+    case TRANSMISSION_MODE_4K:$

ERROR: switch and case should be at the same indent
 	switch (ch->u.ofdm.transmission_mode) {
[...]
+    case TRANSMISSION_MODE_4K:

WARNING: please, no spaces at the start of a line
+    case TRANSMISSION_MODE_4K:$

Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:43 -03:00
Olivier Grenie b4d6046e84 [media] DiBxxxx: Codingstype updates
This patchs fix several conding-style violations.

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-03-21 20:31:43 -03:00
Olivier Grenie be9bae10ff [media] DiB0700: add support for several board-layouts
This patchs adds support for DiBcom's NIM8096MD, NIM9090M, NIM9090MD,
NIM7090, TFE7090PVR (no diversity) reference designs.

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-03-21 20:31:43 -03:00
Olivier Grenie 713d54a8bd [media] DiB7090: add support for the dib7090 based
This patch adds support for the SoC DiB7090 DVB-T demodulator and its
melt-in UHF/VHF RF tuner.

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-03-21 20:31:43 -03:00
Olivier Grenie dd316c6bac [media] DIB9000: initial support added
This patchs add initial support for the DiB9000-device. This
demodulator is firmware-driven.

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-03-21 20:31:41 -03:00
Olivier Grenie 28fafca787 [media] DiB0090: misc improvements
This patch adds several performance improvements and prepares the
usage of firmware-based devices.

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-03-21 20:31:41 -03:00
Olivier Grenie b994d19268 [media] DiBx000: add addition i2c-interface names
This patch adds the possibitity to use different I2C-ports to talk to
slave-devices than the standard ones.

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-03-21 20:31:41 -03:00
Olivier Grenie 4c70e074f8 [media] DiB8000: add diversity support
This patch adds a set a functions which allow the handling of multiple
demodulator in a diversity reception chain.

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-03-21 20:31:41 -03:00
Olivier Grenie 7757ddda6f [media] DiB0700: add function to change I2C-speed
This commit adds a function to the DiB0700 USB driver which allows
drivers to change the I2C clock speed.

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-03-21 20:31:41 -03:00
Sylwester Nawrocki f8e2e3eab8 [media] Add v4l2 subdev driver for NOON010PC30L image sensor
Add I2C/V4L2 subdev driver for Siliconfile NOON010PC30 CIF camera.
The driver implements basic functionality, i.e. CIF/QCIF/QQCIF
resolution and color format selection, automatic/manual color
balance control. Other functions like cropping, rotation/flip,
exposure etc. can be easily implemented if needed.

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
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-03-21 20:31:40 -03:00
Sungchun Kang ba10795ed1 [media] s5p-fimc: fimc_stop_capture bug fix
When is called fimc_stop_capture, it seems that wait_event_timeout
used improperly. It should be wake up by irq handler.

Reviewed-by Jonghun Han <jonghun.han@samsung.com>

Signed-off-by: Sungchun Kang <sungchun.kang@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:40 -03:00
Hyunwoong Kim 5bbe425e57 [media] s5p-fimc: fix MSCTRL.FIFO_CTRL for performance enhancement
This patch fixes the value of FIFO_CTRL in MSCTRL.
Main-scaler has the value to specify a basis FIFO control of input DMA.

The description of FIFO_CTRL has been changed as below.
0 = FIFO Empty (Next burst transaction is possible when FIFO is empty)
1 = FIFO Full (Next burst transaction is possible except Full FIFO)

Value '1' is recommended to enhance the FIMC operation performance.

Reviewed-by: Jonghun Han <jonghun.han@samsung.com>
Signed-off-by: Hyunwoong Kim <khw0178.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:40 -03:00
Hyunwoong Kim 65777e5c58 [media] s5p-fimc: Support stop_streaming and job_abort
This patch adds callback functions, stop_streaming and job_abort,
to abort or finish any DMA in progress. stop_streaming is called
by videobuf2 framework and job_abort is called by m2m framework.
ST_M2M_PEND state is added to discard the next job.

Reviewed-by: Jonghun Han <jonghun.han@samsung.com>
Signed-off-by: Hyunwoong Kim <khw0178.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:40 -03:00
Hyunwoong Kim 1b09f292eb [media] s5p-fimc: update checking scaling ratio range
Horizontal and vertical scaling range are according to the following equations.
If (SRC_Width >= 64 x DST_Width) { Exit(-1);  /* Out of Horizontal scale range}
If (SRC_Height >= 64 x DST_Height) { Exit(-1);  /* Out of Vertical scale range}

fimc_check_scaler_ratio() is used to check if horizontal and vertical
scale range are valid or not. To use fimc_check_scaler_ratio,
source and destination format should be set by VIDIOC_S_FMT.
And in case of scaling up, it doesn't have to check the scale range.

Reviewed-by: Jonghun Han <jonghun.han@samsung.com>
Signed-off-by: Hyunwoong Kim <khw0178.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:40 -03:00
Sylwester Nawrocki 70f66ea2aa [media] s5p-fimc: Move scaler details handling to the register API file
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-03-21 20:31:39 -03:00
Hyunwoong Kim b241c6d6f4 [media] s5p-fimc: Configure scaler registers depending on FIMC version
The main scaler has four SFRs for main scaler ratio depending on FIMC version.
FIMC 4.x has only two SFRs and FIMC 5.x has four SFRs for main scaler.
Those are MainHorRatio, MainHorRatio_ext, MainVerRatio and MainverRatio_ext.

The FIMC 5.x has 15 bit resolution for scaling ratio as below.
{MainHorRatio,MainHorRatio_ext} = {[14:6],[5:0]}.
{MainVerRatio,MainVerRatio_ext} = {[14:6],[5:0]}.
MainHorRatio = CISCCTRL[24:16], MainHorRatio_ext = CIEXTEN[15:10]
MainVerRatio = CISCCTRL[8:0],   MainVerRatio_ext = CIEXTEN[5:0]

This patch supports FIMC 4.x and FIMC 5.x using platform_device_id::driver_data.

Reviewed-by: Jonghun Han <jonghun.han@samsung.com>
Signed-off-by: Hyunwoong Kim <khw0178.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:39 -03:00
Hyunwoong Kim 10038bea7a [media] s5p-fimc: fix the value of YUV422 1-plane formats
Some color formats are mismatched in s5p-fimc driver.
CIOCTRL[1:0], order422_out, should be set 2b'00 not 2b'11
to use V4L2_PIX_FMT_YUYV. Because in V4L2 standard V4L2_PIX_FMT_YUYV means
"start + 0: Y'00 Cb00 Y'01 Cr00 Y'02 Cb01 Y'03 Cr01". According to datasheet
2b'00 is right value for V4L2_PIX_FMT_YUYV.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:39 -03:00
Sylwester Nawrocki a25be18dfb [media] s5p-fimc: Add control of the external sensor clock
Manage the camera sensor clock in the host driver rather than
leaving this task for sensor drivers. The clock frequency
must be passed in the sensor's and host driver's platform data.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:39 -03:00
Sylwester Nawrocki ac75934cc6 [media] s5p-fimc: Enable simultaneous rotation and flipping
Map all (0, 90, 180, 270) deg counterclockwise rotation and
horizontal and vertical flip controls to (0, 90) deg rotation,
horizontal and vertical flip transformations available
in the device.

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-03-21 20:31:39 -03:00