V4L/DVB: V4L2: Add support for OMAP2/3 V4L2 display driver on top of DSS2
Features Supported -
1. Provides V4L2 user interface for the video pipelines of DSS
2. Basic streaming working on LCD, DVI and TV.
3. Works on latest DSS2 library from Tomi
4. Support for various pixel formats like YUV, UYVY, RGB32, RGB24,
RGB565
5. Supports Alpha blending.
6. Supports Color keying both source and destination.
7. Supports rotation.
8. Supports cropping.
9. Supports Background color setting.
10. Allocated buffers to only needed size
Sakari Ailus [Mon, 1 Mar 2010 08:14:18 +0000 (05:14 -0300)]
V4L/DVB: V4L: Events: Add backend
Add event handling backend to V4L2. The backend handles event subscription
and delivery to file handles. Event subscriptions are based on file handle.
Events may be delivered to all subscribed file handles on a device
independent of where they originate from.
Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sakari Ailus [Tue, 23 Mar 2010 12:25:26 +0000 (09:25 -0300)]
V4L/DVB: V4L: File handles
This patch adds a list of v4l2_fh structures to every video_device.
It allows using file handle related information in V4L2. The event interface
is one example of such use.
The use of v4l2_fh is not mandatory for drivers.
Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB: [v5,2/2] v4l: Add a mem-to-mem videobuf framework test device
This is a virtual device driver for testing the memory-to-memory framework.
This virtual device uses in-memory buffers for both its source and destination.
It is capable of multi-instance, multi-buffer-per-transaction operation
(via the mem2mem framework).
[mchehab@redhat.com: use videobuf_queue_to_vaddr instead of the removed videobuf_queue_to_vmalloc] 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> Reviewed-by: Vaibhav Hiremath <hvaibhav@ti.com> Tested-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB: add memory-to-memory device helper framework for videobuf
A mem-to-mem device is a device that uses memory buffers passed by
userspace applications for both their source and destination data. This
is different from existing drivers, which utilize memory buffers for either
input or output, but not both.
In terms of V4L2 such a device would be both of OUTPUT and CAPTURE type.
Examples of such devices would be: image 'resizers', 'rotators',
'colorspace converters', etc.
This patch adds a separate Kconfig sub-menu for mem-to-mem devices as well.
V4L/DVB: V4L: v4l2-subdev driver for AK8813 and AK8814 TV-encoders from AKM
AK8814 only differs from AK8813 by included Macrovision Copy Protection
function. This patch adds a driver for AK8813 and AK8814 I2C PAL/NTSC TV
encoders.
V4L/DVB: V4L: SuperH Video Output Unit (VOU) driver
A number of SuperH Mobile SoCs, including sh7724, include a Video Output Unit.
This patch adds a video (V4L2) output driver for it. The driver uses v4l2-subdev
and mediabus APIs to interface to TV encoders.
V4L/DVB: sh_mobile_ceu_camera.c: preserve output window on VIDIOC_S_CROP
Current version of sh_mobile_ceu_camera.c interprets the V4L2 API specification
of the VIDIOC_S_CROP ioctl as "change input (for capture devices) area,
preserve scaling factors, therefore change output window," whereas a more
intuitive interpretation of the API is "change input area, preserve output
window." Switch sh_mobile_ceu_camera.c to use this interpretation.
Hans Verkuil [Sat, 10 Apr 2010 07:13:53 +0000 (04:13 -0300)]
V4L/DVB: vivi: clean up and a major overhaul
- Clean up the code
- Use the kernel's built-in vga8x16 font instead of our own.
- Drop exclusive open: now multiple users can open the device as per the V4L2 spec.
- Move the format description to the vivi device instead of keeping it in the file
handle. Again as per the spec.
- Streamline and simplify the drawing code. It is now easy to add text on top of
the colorbar pattern.
- Upgrade the max resolution to 1920x1200.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB: videobuf-dma-sg: Avoid using a wrong size
drivers/media/video/videobuf-dma-sg.c: In function ‘__videobuf_mmap_mapper’:
drivers/media/video/videobuf-dma-sg.c:557: warning: ‘size’ may be used uninitialized in this function
The condition where size is floating should never happen, due to the paranoia check,
but a future change at the logic might break it. So, let's just set size to zero and
use it for the paranoia check.
Hans Verkuil [Sun, 28 Mar 2010 12:09:05 +0000 (09:09 -0300)]
V4L/DVB: v4l videobuf: add videobuf_buffer *buf as argument to mmap_mapper
mmap_mapper should operate on a buffer, not on a complete queue. So let
the videobuf-core find the correct buffer instead of duplicating that
code in each mmap_mapper implementation.
The dma-sg implementation has backwards compatibility code for handling
the V4L1_COMPAT layer. This code is now under the v4L1_COMPAT config option.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 28 Mar 2010 12:22:53 +0000 (09:22 -0300)]
V4L/DVB: v4l videobuf: move video_copy_to_user and copy_stream to core
The video_copy_to_user and copy_stream ops are almost identical for all
videobuf memtype variants. All that is needed is to use the new vaddr
op and these functions can be moved into the core, ensuring we have just
one single implementation instead of three.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 28 Mar 2010 11:18:37 +0000 (08:18 -0300)]
V4L/DVB: v4l videobuf: rename .vmalloc to .vaddr
Rename the .vmalloc op in struct videobuf_qtype_ops to .vaddr. This op returns
the virtual kernel address of a buffer. vaddr is a lot less confusing than
vmalloc since this callback does do any allocations.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB: Add FE_CAN_PSK_8 to allow apps to identify PSK_8 capable DVB devices
The enum fe_caps provides flags that allow an application to detect
whether a device is capable of handling various modulation types etc.
A flag for detecting PSK_8, however, is missing.
This patch adds the flag FE_CAN_PSK_8 to frontend.h and implements
it for the gp8psk-fe.c and cx24116.c driver (apparently the only ones
with PSK_8). Only the gp8psk-fe.c has been explicitly tested, though.
Signed-off-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de> Tested-by: Derek Kelly <user.vdr@gmail.com> Acked-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Driver is not properly initializing u64 constants on 32 bit systems:
drivers/media/IR/imon.c:301: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:302: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:304: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:305: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:308: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:309: warning: integer constant is too large for ‘long’ type
drivers/media/IR/imon.c:310: warning: integer constant is too large for ‘long’ type
Fix also a few troubles at error printk handling:
drivers/media/IR/imon.c: In function ‘imon_init_intf0’:
drivers/media/IR/imon.c:1909: warning: ‘ret’ may be used uninitialized in this function
drivers/media/IR/imon.c: In function ‘imon_init_intf1’:
drivers/media/IR/imon.c:1989: warning: ‘ret’ may be used uninitialized in this function
Cc: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB: ir-core-priv.h: Fix a few CodingStyle errors
As reported by checkpatch.pl:
ERROR: open brace '{' following function declarations go on the next line
+static inline bool geq_margin(unsigned d1, unsigned d2, unsigned margin) {
ERROR: open brace '{' following function declarations go on the next line
+static inline bool eq_margin(unsigned d1, unsigned d2, unsigned margin) {
ERROR: open brace '{' following function declarations go on the next line
+static inline bool is_transition(struct ir_raw_event *x, struct ir_raw_event *y) {
Cc: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
David Härdeman [Thu, 15 Apr 2010 21:46:00 +0000 (18:46 -0300)]
V4L/DVB: ir-core: change duration to be coded as a u32 integer
This patch implements the agreed upon 1:31 integer encoded pulse/duration
struct for ir-core raw decoders. All decoders have been tested after the
change. Comments are welcome.
Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jarod Wilson [Fri, 16 Apr 2010 21:29:02 +0000 (18:29 -0300)]
V4L/DVB: ir-core: add imon driver
This is a new driver for the SoundGraph iMON and Antec Veris IR/display
devices commonly found in many home theater pc cases and as after-market
case additions.
[mchehab@redhat.com: add KERN_CONT on line 2098 to shutup checkpatc.pl]
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jarod Wilson [Fri, 16 Apr 2010 21:28:35 +0000 (18:28 -0300)]
V4L/DVB: ir-core: add imon pad and mce keymaps
This adds the keymaps for the hardware decode scancodes imon
devices create for their native imon pad (and mini) remotes,
and the hardware scancodes generated by the imon devices when
used with an rc6 windows media center ed. remote.
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jarod Wilson [Fri, 16 Apr 2010 21:27:58 +0000 (18:27 -0300)]
V4L/DVB: ir-core: make ir_g_keycode_from_table a public function
The imon driver I've previously submitted and have been porting to
use ir-core needs to use ir_g_keycode_from_table, as ir_keydown is
not sufficient, due to these things having really oddball hardware
decoders in them. This just moves the function declaration from
ir-core-priv.h over to ir-core.h.
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dean Anderson [Fri, 9 Apr 2010 22:54:26 +0000 (19:54 -0300)]
V4L/DVB: s2255drv: removes kref tracking and videodev parent
kref replaced as suggested in code review
uses atomic variable to track when it is ok to delete device
removes setting of video device parent, which is now
handled in v4l2_device.c
Signed-off-by: Dean Anderson <linux-dev@sensoray.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Joe Perches [Mon, 5 Apr 2010 19:05:39 +0000 (16:05 -0300)]
V4L/DVB: pvrusb2-v4l2: Rename dev_info to pdi
There is a macro called dev_info that prints struct device specific
information. Having variables with the same name can be confusing and
prevents conversion of the macro to a function.
Rename the existing dev_info variables to something else in preparation
to converting the dev_info macro to a function.
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB: tm6000: fix compilation due to the lack of a semicolon
Add a missing semicolon to fix this error:
In file included from drivers/staging/tm6000/tm6000-cards.c:32:
drivers/staging/tm6000/tm6000.h:123: error: two or more data types in
declaration specifiers
Randy Dunlap [Tue, 30 Mar 2010 17:32:04 +0000 (14:32 -0300)]
V4L/DVB: [-next] gspca: fix build for INPUT=m or INPUT=n
Handle case of GSPCA=m, INPUT=m when building gspca core;
also handle case of INPUT=n by using stubs.
drivers/media/video/gspca/gspca.c:662: error: implicit declaration of function 'gspca_input_destroy_urb'
drivers/media/video/gspca/gspca.c:668: error: implicit declaration of function 'gspca_input_create_urb'
drivers/media/video/gspca/gspca.c:2284: error: implicit declaration of function 'gspca_input_connect'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dmitri Belimov [Tue, 30 Mar 2010 06:02:17 +0000 (03:02 -0300)]
V4L/DVB: Fix default state Beholder H6 tuner
The hybrid tuner FMD1216MEX_MK3 after cold start has disabled IF. This
tuner has internal I2C switch. This switch switch I2C bus between DVB-T
and IF part. Default state is DVB-T. When module saa7134 is load it
can't find IF tda9887 and disable analog TV mode.
Sets internal I2C switch of the tuner to IF by send special value to the
tuner as for receive analog TV from low band. It can be usefule for
other cards.
I didn't set configure a tuner by a tuner model because this tuner can
have different I2C address. May be we can do it later after discuss for
more robust support a tuners.
Dean Anderson [Fri, 9 Apr 2010 02:46:08 +0000 (23:46 -0300)]
V4L/DVB: s2255drv: removal of big kernel lock
big kernel lock removed from open function.
v4l2 code does not require locking the open function except
to check asynchronous firmware load state, which is protected
by a mutex
Signed-off-by: Dean Anderson <dean@sensoray.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The following patch fixes code that checks for CX88_VMUX_TELEVISION,
but not CX88_VMUX_CABLE. This prevented for example the audio standard
from being set when using the cable input.
Nicolas Noirbent [Mon, 22 Mar 2010 17:54:43 +0000 (14:54 -0300)]
V4L/DVB: ds3000: fix divide-by-zero error in ds3000_read_snr()
Fix a divide-by-zero error in ds3000's ds3000_read_snr(), when getting
a very low signal reading (dvbs2_signal_reading >= 1). This prevents
some nasty EIPs when running szap-s2 with a very low signal strength.
Signed-off-by: Nicolas Noirbent <nicolas.noirbent@smartjog.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB: ir-core: Remove warining noise if decoders compiled builtin
drivers/media/IR/ir-raw-event.c:55: warning: ‘wq_load’ defined but not used
drivers/media/IR/ir-raw-event.c:222: warning: ‘init_decoders’ defined but not used
drivers/media/IR/rc-map.c: In function ‘get_rc_map’:
drivers/media/IR/rc-map.c:40: warning: unused variable ‘rc’
Andreas Bombe [Sun, 21 Mar 2010 19:02:45 +0000 (16:02 -0300)]
V4L/DVB: V4L2: Replace loops for finding max buffers in VIDIOC_REQBUFS callbacks
Due to obvious copy and paste coding a number of video capture drivers
which implement a limit on the buffer memory decremented the user
supplied buffer count in a while loop until it reaches an acceptable
value.
This is a silly thing to do when the maximum value can be directly
computed.
Signed-off-by: Andreas Bombe <aeb@debian.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
On newer kernels, a saa7134 board stopped to display TV video output
properly. After a bisect, I found it as the commit causing the issue.
Turns out that v4l_bound_align_image isn't doing the same bounding
calculation as manually done previously in saa7134_try_fmt_vid_cap.
What isn't equal is the calculation done in clamp align, while
previously it did "f->fmt.pix.width &= ~0x03", clamp_align function
does "Round to nearest aligned value" as stated in the comment, which
yields a different result. If I comment the round calculation in
clamp_align like this: "x = (x /*+ (1 << (align - 1))*/) & mask",
I get it fixed too, because this way the calculation is the same then.
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Wolfram Sang [Mon, 5 Apr 2010 04:14:26 +0000 (01:14 -0300)]
V4L/DVB: dvb/dib8000: fix build warning
In file included from drivers/media/dvb/dvb-usb/dib0700_devices.c:14:
drivers/media/dvb/frontends/dib8000.h: In function 'dib8000_get_adc_power':
drivers/media/dvb/frontends/dib8000.h:112: warning: no return statement in function returning non-void
Fixed by adding a return to the dummy function.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 6 Apr 2010 18:56:08 +0000 (15:56 -0300)]
V4L/DVB: video_ioctl2: handle the v4l1 compat bit first and move VIDIOCGMBUF into the switch
Try to make a more sensible sequence of events in __video_do_ioctl: first
check for a valid ops pointer, then get the compat part done. The VIDIOCGMBUF
command is now part of the big switch.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 6 Apr 2010 14:36:39 +0000 (11:36 -0300)]
V4L/DVB: w9966: convert to V4L2
Note that I have not been able to find anyone with this hardware. I tried
contacting the author without success, searched on eBay and similar places
without luck either.
So this conversion is untested. That said, it was pretty straightforward
so it is time to have this driver join the V4L2 world at last.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>