xref: /titanic_52/usr/src/uts/common/sys/1394/targets/dcam1394/dcam_param.h (revision 8eea8e29cc4374d1ee24c25a07f45af132db3499)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SYS_1394_TARGETS_DCAM1394_PARAM_H
28 #define	_SYS_1394_TARGETS_DCAM1394_PARAM_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 #define	IS_VALID	0x1
37 #define	IS_PRESENT	0x2
38 #define	CAP_GET		0x4
39 #define	CAP_SET		0x8
40 #define	CAP_CTRL_SET	0x10
41 
42 
43 int	param_attr_init(dcam_state_t *softc_p,
44 	    dcam1394_param_attr_t param_attr);
45 void	param_attr_set(dcam1394_param_attr_t param_attr, uint_t param,
46 	    uint_t subparam, uint_t attr_bmap);
47 
48 int	dcam1394_ioctl_param_get(dcam_state_t *softc_p,
49 	    dcam1394_param_list_t param_list);
50 int	dcam1394_ioctl_param_set(dcam_state_t *softc_p, int is_ctrl_file,
51 	    dcam1394_param_list_t param_list);
52 
53 int	dcam1394_param_get(dcam_state_t *softc_p, uint_t param,
54 	    uint_t subparam, uint_t *val_p);
55 int	dcam1394_param_set(dcam_state_t *softc_p, uint_t param,
56 	    uint_t subparam, uint_t val);
57 
58 int	 feature_get(dcam_state_t *softc_p, uint_t feature_csr_offs,
59 	    uint_t feature_elm_inq_reg_offs, uint_t subparam, uint_t *val_p);
60 int	feature_set(dcam_state_t *softc_p, uint_t feature_csr_offs,
61 	    uint_t subparam, uint_t val);
62 
63 int	param_cap_power_ctrl_get(dcam_state_t *softc_p, uint_t *val_p);
64 int	param_cap_vid_mode_get(dcam_state_t *softc_p, uint_t subparam,
65 	    uint_t *val_p);
66 int	param_cap_frame_rate_get(dcam_state_t  *softc_p, uint_t param,
67 	    uint_t subparam, uint_t *val_p);
68 int	param_power_get(dcam_state_t *softc_p, uint_t *val_p);
69 int	param_power_set(dcam_state_t *softc_p, uint_t val);
70 int	param_vid_mode_get(dcam_state_t *softc_p, uint_t *val_p);
71 int	param_vid_mode_set(dcam_state_t *softc_p, uint_t val);
72 int	param_frame_rate_get(dcam_state_t *softc_p, uint_t *val_p);
73 int	param_frame_rate_set(dcam_state_t *softc_p, uint_t val);
74 int	param_ring_buff_capacity_get(dcam_state_t *softc_p, uint_t *val_p);
75 int	param_ring_buff_capacity_set(dcam_state_t *softc_p, uint_t val);
76 int	param_ring_buff_num_frames_ready_get(dcam_state_t *softc_p,
77 	    uint_t *val_p);
78 int	param_ring_buff_read_ptr_incr_get(dcam_state_t *softc_p, uint_t *val_p);
79 int	param_ring_buff_read_ptr_incr_set(dcam_state_t *softc_p, uint_t val);
80 int	param_frame_num_bytes_get(dcam_state_t *softc_p, uint_t *val_p);
81 int	param_status_get(dcam_state_t *softc_p, uint_t *val_p);
82 int	param_brightness_get(dcam_state_t *softc_p, uint_t subparam,
83 	    uint_t *val_p);
84 int	param_brightness_set(dcam_state_t *softc_p, uint_t subparam,
85 	    uint_t val);
86 int	param_exposure_get(dcam_state_t *softc_p, uint_t subparam,
87 	    uint_t *val_p);
88 int	param_exposure_set(dcam_state_t *softc_p, uint_t subparam, uint_t val);
89 int	param_sharpness_get(dcam_state_t *softc_p, uint_t subparam,
90 	    uint_t *val_p);
91 int	param_sharpness_set(dcam_state_t *softc_p, uint_t subparam, uint_t val);
92 int	param_white_balance_get(dcam_state_t *softc_p, uint_t subparam,
93 	    uint_t *val_p);
94 int	param_white_balance_set(dcam_state_t *softc_p, uint_t subparam,
95 	    uint_t val);
96 int	param_hue_get(dcam_state_t *softc_p, uint_t subparam, uint_t *val_p);
97 int	param_hue_set(dcam_state_t *softc_p, uint_t subparam, uint_t val);
98 int	param_saturation_get(dcam_state_t *softc_p, uint_t subparam,
99 	    uint_t *val_p);
100 int	param_saturation_set(dcam_state_t *softc_p, uint_t subparam,
101 	    uint_t val);
102 int	param_gamma_get(dcam_state_t *softc_p, uint_t subparam, uint_t *val_p);
103 int	param_gamma_set(dcam_state_t *softc_p, uint_t subparam, uint_t val);
104 int	param_shutter_get(dcam_state_t *softc_p, uint_t subparam,
105 	    uint_t *val_p);
106 int	param_shutter_set(dcam_state_t *softc_p, uint_t subparam, uint_t val);
107 int	param_gain_get(dcam_state_t *softc_p, uint_t subparam, uint_t *val_p);
108 int	param_gain_set(dcam_state_t *softc_p, uint_t subparam, uint_t val);
109 int	param_iris_get(dcam_state_t *softc_p, uint_t subparam, uint_t *val_p);
110 int	param_iris_set(dcam_state_t *softc_p, uint_t subparam, uint_t val);
111 int	param_focus_get(dcam_state_t *softc_p, uint_t subparam, uint_t *val_p);
112 int	param_focus_set(dcam_state_t *softc_p, uint_t subparam, uint_t val);
113 int	param_zoom_get(dcam_state_t *softc_p, uint_t subparam, uint_t *val_p);
114 int	param_zoom_set(dcam_state_t *softc_p, uint_t subparam, uint_t val);
115 int	param_pan_get(dcam_state_t *softc_p, uint_t subparam, uint_t *val_p);
116 int	param_pan_set(dcam_state_t *softc_p, uint_t subparam, uint_t val);
117 int	param_tilt_get(dcam_state_t *softc_p, uint_t subparam, uint_t *val_p);
118 int	param_tilt_set(dcam_state_t *softc_p, uint_t subparam, uint_t val);
119 
120 #ifdef	__cplusplus
121 }
122 #endif
123 
124 #endif	/* _SYS_1394_TARGETS_DCAM1394_PARAM_H */
125