FCAM-DRIVERS

Description
-------------

FCam-drivers is a set of replacement kernel modules for the Nokia N900
camera subsystem, meant to be used in conjunction with the FCam
userspace camera API.  These are all slightly modified from the
original code that is included in the kernel tree for the Nokia N900.

Partial list of changes relative to the N900 baseline kernel:

v1.0.4: (first release) 

  - Added V4L2 ioctl for installing an FCam application as a special
    user of the camera subsystem. This allows for spawning of
    real-time threads by the FCam user-space API, and for disabling of
    the built-in user space camera daemon while the FCam application
    is running.

  - Added V4L2 ioctl for waiting until the next sensor HSVS sync
    signal arrives.  This allows for timing synchronization between
    the FCam user space API and the sensor.

  - Added two custom V4L2 controls, one to control the frame time and
    one for exact gain control. The frame time control violates the
    spirit of the V4L2 specification, as frame time is not supposed to
    vary for a given format, but variable frame time is highly
    important for the FCam APi. The gain control is simply a
    finer-grained control than what is included in the et8ek8.c driver
    by default.

  - Added ISP IOCTL (VIDIOC_PRIVATE_ISP_PIPELINE_STATS_REQ) to
    retrieve pipeline statistics, needed for properly interpreting
    statistics generator results.
 
  - Disabled LSC (lens shading compensation) in the ISP
    previewer. Causes sbl_overflow errors from the ISP when enabled,
    and workarounds have not been implemented yet.

  - Fixes to the ISP statistics module code to make histogram and
    sharpness map modules provide the latest set of buffers to the
    caller.


Building:
----------

Building these modules has only been tested inside the Maemo 5 SDK
scratchbox development environment, available from Nokia. See
http://wiki.maemo.org/Documentation/Maemo_5_Final_SDK_Installation

The below is known to work, although it may be overkill (getting only
kernel headers may be sufficient)

Once you have scratchbox set up, you'll need a copy of the Maemo
kernel headers for the Nokia N900. Make sure you're using the FREMANTLE_ARMEL target, 
and then get the headers with:

       fakeroot apt-get install kernel-headers

which will create the directory /usr/src/kernel-headers inside scratchbox. 

You can then build the fcam-drivers Maemo package with
        
       make deb

inside the fcam-drivers directory.  This will create the .deb package in the parent directory.

Installation:
--------------

To install the .deb package directory, copy it to your N900, and when logged in as root, type

       dpkg -i <package_name>

You'll have to reboot to complete the installation process.

Legal:
-----------
Modifications/additions to the kernel source code are:
Copyright (C) 2010 Stanford University

This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.

