Capture Driver
Software Design Interfaces
Version 02.01.01.08
Platform Support Products
157
user space algorithms to configure and request these statistics through custom
IOCTLs.
9.3.2. Software Design Interfaces
9.3.2.1. Opening and Closing of driver
The device can be opened using open call from the application, with the device
name and mode of operation as parameters. Application should open the driver
in blocking mode. In this mode, DQBUF IOCTL will not return until an empty
frame is available.
/* call to open a video capture logical channel in blocking mode */
fd = open("/dev/video0", O_RDWR);
/* closing of channel */
close (fd);
9.3.2.2. Buffer Management
ISP Capture driver can work with physically non-contiguous buffers. It uses the
ISP MMU to capture data to buffers scattered to a set of page frames. Hence,
in user pointer mode the application can allocate buffers in user space, which
need not be physically contiguous, and pass this directly to driver for capture
operation. The only restriction for the user buffer is that, the buffer should be
aligned to 32 bytes boundary. The driver supports both memory usage modes:
1) Memory map buffer mode
2) User Pointer mode
In Memory map buffer mode, application can request memory from the driver
by calling
VIDIOC_REQBUFS
IOCTL. In user buffer mode, application needs to
allocate memory using some other mechanism in user space like
malloc
or
memalign
. In driver buffer mode, maximum number of buffers is limited to
VIDEO_MAX_FRAME
(defined in driver header files) and is limited by the available
memory in the kernel.
The main steps that the application must perform for buffer allocation are:
1) Allocating Memory
2) Getting Physical Address
3) Mapping Kernel Space Address to User Space
1. Allocating Memory
This IOCTL is used to allocate memory for frame buffers. This is the necessary
IOCTL for streaming IO. It has to be called for both driver buffer mode and user
buffer mode. Using this IOCTL, driver will know whether driver buffer mode or
user buffer mode will be used.
Summary of Contents for OMAP35 Series
Page 1: ...OMAP35x EVM Linux PSP User Guide 02 01 01 08 Published 22 May 2009 ...
Page 2: ...2 Platform Support Products Version 02 01 01 08 ...
Page 4: ...OMAP35x EVM Linux PSP 2 Platform Support Products Version 02 01 01 08 ...
Page 12: ...Version 02 01 01 08 Platform Support Products x ...
Page 16: ...Version 02 01 01 08 Platform Support Products xiv ...
Page 22: ...Version 02 01 01 08 Platform Support Products xx ...
Page 30: ...Version 02 01 01 08 Platform Support Products 8 ...
Page 58: ...Version 02 01 01 08 Platform Support Products 36 ...
Page 138: ...Version 02 01 01 08 Platform Support Products 116 ...
Page 158: ...Resizer Driver Data Structures 136 Platform Support Products Version 02 01 01 08 ...
Page 164: ...Version 02 01 01 08 Platform Support Products 142 ...
Page 170: ...Version 02 01 01 08 Platform Support Products 148 ...
Page 202: ...Version 02 01 01 08 Platform Support Products 180 ...