Devices dcam1394(7D)
NAME
dcam1394 - 1394-based digital camera (IDC) driver
SYNOPSIS
#include
DESCRIPTION
The dcam1394 driver supports devices implementing the 1394
Trade Association Digital Camera Specification (also
referred to as the IDC specification). Only a subset of
the specification is supported.
READING DATA
Isochronous data is read from the driver frame-by-frame and
is maintained within the driver in a ring buffer.
Video frames are read from the isochronous input device
using read(2).
The dcam1394framet structure describes the frame layout
and is defined as follows:
struct {
unsigned int vidmode;
unsigned int seqnum;
hrtimet timestamp;
unsigned char *buff;
};
The size to allocate for the structure is determined by the
video mode for which the camera is configured. Possible
values for the vidmode field are listed under
DCAM1394PARAMVIDMODE below.
IOCTL REQUESTS
The following ioctl requests are supported:
DCAM1394CMDCAMRESET
Reset the device.
DCAM1394CMDREGREAD
Read the indicated dcam/IDC register. The argument is a
pointer to a dcam1394regiot structure, which is
defined as follows:
SunOS 5.11 Last change: 19 May 2004 1
Devices dcam1394(7D)
struct {
unsigned int offs;
unsigned int val;
};
The offs field should be set to the offset of the regis-
ter from which to read. Register offset values are
defined in the 1394 Trade Association Digital Camera
Specification.
After the operation is completed, the camera register
value is put in the val field.
DCAM1394CMDREGWRITE
Write the indicated dcam/IDC register. The argument is
a pointer to a dcam1394regiot structure (described
above).
The offs field should be set to the offset of the regis-
ter from which to read. The register offset values are
defined in the 1394 Trade Association Digital Camera
Specification.
The val field should be set to the value to be written
to the camera register.
DCAM1394CMDPARAMGET
Gets a list of parameters associated with a camera. The
argument is a pointer to a dcam1394paramlistt struc-
ture (described below). The parameter list is accessed
through macros defined below.
The paramter list only supports Format 1 video formats.
DCAM1394CMDPARAMSET
Sets a list of parameters associated with a camera. The
argument is a pointer to a dcam1394paramlistt struc-
ture (described below). The parameter list is accessed
through macros defined below.
The paramter list only supports Format 1 video formats.
DCAM1394CMDFRAMERCVSTART
Start receiving video frames from the camera.
SunOS 5.11 Last change: 19 May 2004 2
Devices dcam1394(7D)
The contents of the ring buffer may be accessed by read-
ing the isochronous stream device.
DCAM1394CMDFRAMERCVSTOP
Stop receiving frames from the camera.
DCAM1394CMDRINGBUFLUSH
Flush the frames in the ring buffer.
DCAM1394CMDFRAMESEQNUMCOUNTRESET
Reset frame sequence number.
PARAMETER LIST ACES
The parameter list is initialized and access through macros.
The data type for the parameter list is
dcam1394paramlistt.
The following macros are used to access the parameter list:
PARAMLISTINIT(paramlist)
Initialize the parameter list.
PARAMLISTAD(paramlist, param, subparam)
Add a parameter to the list.
PARAMLISTREMOVE(paramlist, param, subparam)
Remove a parameter from the list.
PARAMLISTISENTRY(paramlist, param, subparam)
Indicates if a specific parameter is in the list.
PARAMVAL(paramlist, param, subparam)
Value of a specified parameter.
SunOS 5.11 Last change: 19 May 2004 3
Devices dcam1394(7D)
PARAMER(paramlist, param, subparam)
Indicates if a specific parameter is successfully set.
When no subparam value is required, the value
DCAM1394SUBPARAMNONE may be used.
PARAMETERS
The following parameters may appear in the list:
DCAM1394PARAMCAPOWERCTRL
Queries if the camera can be turned off and on through
software. The subparam value is ignored.
DCAM1394PARAMPOWER
Controls or queries if the camera is powered up. Verify
this feature using DCAM1394PARAMCAPOWERCTRL before
use. The subparam field is ignored.
DCAM1394PARAMCAPVIDMOD
Queries if a specific video mode is supported by the
camera.
subparam is one of the following and is used to deter-
mine if a specified video mode is supported by the cam-
era:
DCAM1394SUBPARAMVIDMODE0
DCAM1394SUBPARAMVIDMODEYUV444160120
Video mode is 4:4:4, YUV color space, 160x120 resolution.
DCAM1394SUBPARAMVIDMODE1
DCAM1394SUBPARAMVIDMODEYUV422320240
Video mode is 4:2:2, YUV color space, 320x240 resolution.
DCAM1394SUBPARAMVIDMODE2
DCAM1394SUBPARAMVIDMODEYUV411640480
Video mode is 4:1:1, YUV color space, 640x480 resolution.
DCAM1394SUBPARAMVIDMODE3
DCAM1394SUBPARAMVIDMODEYUV422640480
Video mode is 4:2:2, YUV color space, 640x480 resolution.
DCAM1394SUBPARAMVIDMODE4
DCAM1394SUBPARAMVIDMODERGB640480
SunOS 5.11 Last change: 19 May 2004 4
Devices dcam1394(7D)
Video mode is RGB color space, 640x480 resolution.
DCAM1394SUBPARAMVIDMODE5
DCAM1394SUBPARAMVIDMODEY640480
Video mode is Y color space, 640x480 resolution.
DCAM1394PARAMVIDMODE
Controls or queries the current video mode of the cam-
era. The subparam field is ignored. When selecting the
video mode, it should be compatible with the capability
of the camera, which may be determined by checking the
DCAM1394PARAMCAPVIDMODE parameter.
The value of this parameter may be one of the following:
DCAM1394VIDMODE0
DCAM1394VIDMODEYUV444160120
Video mode is 4:4:4, YUV color space, 160x120 resolution.
DCAM1394VIDMODE1
DCAM1394VIDMODEYUV422320240
Video mode is 4:2:2, YUV color space, 320x240 resolution.
DCAM1394VIDMODE2
DCAM1394VIDMODEYUV411640480
Video mode is 4:1:1, YUV color space, 640x480 resolution.
DCAM1394VIDMODE3
DCAM1394VIDMODEYUV422640480
Video mode is 4:2:2, YUV color space, 640x480 resolution.
DCAM1394VIDMODE4
DCAM1394VIDMODERGB640480
Video mode is RGB color space, 640x480 resolution.
DCAM1394VIDMODE5
DCAM1394VIDMODEY640480
Video mode is Y color space, 640x480 resolution.
DCAM1394PARAMCAPFRAMERATEVIDMODE0
Queries if a specific frame rate is supported by the
camera in video mode 0 (4:4:4, YUV, 160x120).
subparam is one of the following and used to determine
if a specified frame rate is supported by the camera:
SunOS 5.11 Last change: 19 May 2004 5
Devices dcam1394(7D)
DCAM1394SUBPARAMFRAMERATE0
DCAM1394SUBPARAMFRAMERATE375FPS
Frame rate is 3.75 frames/second.
DCAM1394SUBPARAMFRAMERATE1
DCAM1394SUBPARAMFRAMERATE75FPS
Frame rate is 7.5 frames/second.
DCAM1394SUBPARAMFRAMERATE2
DCAM1394SUBPARAMFRAMERATE15FPS
Frame rate is 15 frames/second.
DCAM1394SUBPARAMFRAMERATE3
DCAM1394SUBPARAMFRAMERATE30FPS
Frame rate is 30 frames/second.
DCAM1394SUBPARAMFRAMERATE4
DCAM1394SUBPARAMFRAMERATE60FPS
Frame rate is 60 frames/second.
DCAM1394PARAMCAPFRAMERATEVIDMODE1
Queries if a specific frame rate is supported by the
camera in video mode 1 (4:2:2, YUV, 320x240). See
DCAM1394PARAMCAPFRAMERATEVIDMODE0 for a listing
of valid subparam values.
DCAM1394PARAMCAPFRAMERATEVIDMODE2
Queries if a specific frame rate is supported by the
camera in video mode 2 (4:1:1, YUV, 640x480). See
DCAM1394PARAMCAPFRAMERATEVIDMODE0 for a listing
of valid subparam values.
DCAM1394PARAMCAPFRAMERATEVIDMODE3
Queries if a specific frame rate is supported by the
camera in video mode 3 (4:2:2, YUV, 640x480). See
DCAM1394PARAMCAPFRAMERATEVIDMODE0 for a listing
of valid subparam values.
DCAM1394PARAMCAPFRAMERATEVIDMODE4
Queries if a specific frame rate is supported by the
camera in video mode 4. (RGB, 640x480). See
DCAM1394PARAMCAPFRAMERATEVIDMODE0 for a listing
of valid subparam values.
SunOS 5.11 Last change: 19 May 2004 6
Devices dcam1394(7D)
DCAM1394PARAMCAPFRAMERATEVIDMODE5
Queries if a specific frame rate is supported by the
camera in video mode 5. (Y, 640x480). See
DCAM1394PARAMCAPFRAMERATEVIDMODE0 for a listing
of valid subparam values.
DCAM1394PARAMFRAMERATE
Controls or queries the current frame rate of the cam-
era. The subparam field is ignored. When selecting a
frame rate, it should be compatible with the capability
of the camera, which can be determined by querying one
of the frame rate capability parameters above.
The value of this parameter may be one of the following:
DCAM1394FRAMERATE0
DCAM1394375FPS
The frame rate is 3.75 frames per second.
DCAM1394FRAMERATE1
DCAM139475FPS
The frame rate is 7.5 frames per second.
DCAM1394FRAMERATE2
DCAM139415FPS
The frame rate is 15 frames per second.
DCAM1394FRAMERATE3
DCAM139430FPS
The frame rate is 30 frames per second.
DCAM1394FRAMERATE4
DCAM139460FPS
The frame rate is 60 frames per second.
DCAM1394PARAMRINGBUFCAPACITY
Controls or queries the number of frames that the ring
buffer may hold. This value can range between 2 and 30.
The subparam field is ignored.
DCAM1394PARAMRINGBUFNUMFRAMESREADY
Queries the number of frames in the ring buffer ready to
be accessed. The subparam field is ignored.
SunOS 5.11 Last change: 19 May 2004 7
Devices dcam1394(7D)
DCAM1394PARAMRINGBUFREADPTRINCR
Controls or queries the number of bytes to advance the
read pointer as it consumes data from the ring buffer.
The subparam field is ignored.
DCAM1394PARAMFRAMENUMBYTES
Queries the number of bytes in a frame at the current
video mode. The subparam field is ignored.
DCAM1394PARAMSTATUS
Queries the parameter status. The subparam field is
ignored.
The values for the parameter status is a bit field with
the following values possibly set:
DCAM1394STATUSFRAMERCVDONE
Frame successfully received.
DCAM1394STATUSRINGBUFLOSTFRAME
A frame has been lost while processing the ring
buffer.
DCAM1394STATUSPARAMCHANGE
A parameter has been changed.
DCAM1394STATUSFRAMESEQNUMCOUNTOVERFLOW
Frame sequence number has reached its maximum possi-
ble value and has overflowed.
DCAM1394STATUSCAMUNPLUG
Camera has been unplugged.
DCAM1394PARAMBRIGHTNES
Query or control a camera feature. This feature queries
SunOS 5.11 Last change: 19 May 2004 8
Devices dcam1394(7D)
or controls the brightness of the camera.
DCAM1394SUBPARAMPRESENCE
Indicates if the feature is available.
DCAM1394SUBPARAMCAPONOF
Indicates if the feature may be enabled and dis-
abled. May only be queried.
DCAM1394SUBPARAMONOF
Indicates if the feature is enabled.
DCAM1394SUBPARAMCAPCTRLAUTO
Indicates if the automatic control of this feature
is supported by the camera. May only be queried.
DCAM1394SUBPARAMCAPCTRLMANUAL
Indicates if the manual control of this feature is
supported by the camera. May only be queried.
DCAM1394SUBPARAMCTRLMODE
Indicates if the feature is in auto or manual mode.
DCAM1394SUBPARAMINVAL
Minimum value of the feature. May only be queried.
DCAM1394SUBPARAMAXVAL
Maximum value of the feature. May only be queried.
DCAM1394SUBPARAMVALUE
Current value of the feature.
DCAM1394SUBPARAMCAPREAD
SunOS 5.11 Last change: 19 May 2004 9
Devices dcam1394(7D)
Indicates if the feature may be read. May only be
queried.
DCAM1394PARAMEXPOSURE
Query or control a camera feature. This feature queries
or controls the exposure of the camera. The subparams
supported by this feature are described under
DCAM1394PARAMBRIGHTNES.
DCAM1394PARAMSHARPNES
Query or control a camera feature. This feature queries
or controls the sharpness of the camera. The subparams
supported by this feature are described under
DCAM1394PARAMBRIGHTNES.
DCAM1394PARAMWHITEBALANCE
Query or control a camera feature. This feature queries
or controls the white balance of the camera. The sub-
params supported by this feature are described under
DCAM1394PARAMBRIGHTNES, except for
DCAM1394SUBPARAMVALUE. DCAM1394SUBPARAMVALUE is
replaced by two distinct subparams.
DCAM1394SUBPARAMUVALUE U or B component of the
white balance.
DCAM1394SUBPARAMVALUE V or R component of the
white balance.
DCAM1394PARAMHUE
Query or control a camera feature. This feature queries
or controls the hue of the camera. The subparams sup-
ported by this feature are described under
DCAM1394PARAMBRIGHTNES.
DCAM1394PARAMSATURATION
Query or control a camera feature. This feature queries
or controls the saturation of the camera. The subparams
supported by this feature are described under
SunOS 5.11 Last change: 19 May 2004 10
Devices dcam1394(7D)
DCAM1394PARAMBRIGHTNES.
DCAM1394PARAMGAMA
Query or control a camera feature. This feature queries
or controls the gamma of the camera. The subparams sup-
ported by this feature are described under
DCAM1394PARAMBRIGHTNES.
DCAM1394PARAMSHUTER
Query or control a camera feature. This feature queries
or controls the sharpness of the camera. The subparams
supported by this feature are described under
DCAM1394PARAMBRIGHTNES.
DCAM1394PARAMGAIN
Query or control a camera feature. This feature queries
or controls the gain of the camera. The subparams sup-
ported by this feature are described under
DCAM1394PARAMBRIGHTNES.
DCAM1394PARAMIRIS
Query or control a camera feature. This feature queries
or controls the iris of the camera. The subparams sup-
ported by this feature are described under
DCAM1394PARAMBRIGHTNES.
DCAM1394PARAMFOCUS
Query or control a camera feature. This feature queries
or controls the focus of the camera. The subparams sup-
ported by this feature are described under
DCAM1394PARAMBRIGHTNES.
DCAM1394PARAMZOM
Query or control a camera feature. This feature queries
or controls the zoom of the camera. The subparams sup-
ported by this feature are described under
DCAM1394PARAMBRIGHTNES.
SunOS 5.11 Last change: 19 May 2004 11
Devices dcam1394(7D)
DCAM1394PARAMPAN
Query or control a camera feature. This feature queries
or controls the pan of the camera. The subparams sup-
ported by this feature are described under
DCAM1394PARAMBRIGHTNES.
DCAM1394PARAMTILT
Query or control a camera feature. This feature queries
or controls the tilt of the camera.The subparams sup-
ported by this feature are described under
DCAM1394PARAMBRIGHTNES.
DEVICE SPECIAL FILES
/dev/dcamN Device node for isochronous input from cam-
era.
/dev/dcamctlN Device node for camera control.
FILES
kernel/drv/sparcv9/dcam1394
64-bit ELF kernel module.
kernel/drv/dcam1394
32-bit ELF kernel module.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Evolving
SEE ALSO
attributes(5), hci1394(7D)
SunOS 5.11 Last change: 19 May 2004 12
Devices dcam1394(7D)
1394 Trade Association Digital Camera Specification, Version
1.04 - 1996
IE Std 1394-2000 Standard for a High Performance Serial
Bus - 2000
SunOS 5.11 Last change: 19 May 2004 13
|