Software Design Interfaces - Texas Instruments OMAP35 Series User Manual

Evm linux psp
Hide thumbs Also See for OMAP35 Series:
Table of Contents

Advertisement

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.
Version 02.01.01.08
Platform Support Products
Capture Driver
Software Design Interfaces
157

Advertisement

Table of Contents
loading

This manual is also suitable for:

Omap3515Omap3525Omap3530

Table of Contents