Print this page
fixup .text where possible
7127  remove -Wno-missing-braces from Makefile.uts


   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 #pragma ident   "%Z%%M% %I%     %E% SMI"
  28 

  29 /*
  30  * dcam_frame.c
  31  *
  32  * dcam1394 driver.  Support for video frame access.
  33  */
  34 
  35 #include <sys/int_limits.h>
  36 #include <sys/types.h>
  37 #include <sys/kmem.h>
  38 #include <sys/cmn_err.h>
  39 #include <sys/1394/targets/dcam1394/dcam.h>
  40 #include <sys/1394/targets/dcam1394/dcam_frame.h>
  41 #include <sys/tnf_probe.h>
  42 #include <sys/dcam/dcam1394_io.h>
  43 
  44 #include <sys/1394/targets/dcam1394/dcam_reg.h>
  45 
  46 static void dcam_free_resources(dcam_state_t *);
  47 
  48 typedef struct dcam_mode_info_s {


  77  *  mode_4 1/2h, 240q, 960
  78  *  mode_5 1/2h,  80q, 320
  79  *
  80  * 3.75fps
  81  *  mode_0 x
  82  *  mode_1 1/8h,  20q,  80
  83  *  mode_2 1/4h,  60q, 240
  84  *  mode_3 1/4h,  80q, 320
  85  *  mode_4 1/4h, 120q, 480
  86  *  mode_5 1/4h,  40q, 160
  87  *
  88  * 60fps
  89  *  mode_5 4H, 640q, 2560
  90  *
  91  */
  92 
  93 /* indexed by vid mode, frame rate */
  94 static int g_bytes_per_packet[6][5] = {
  95 
  96         /* fps:                 3.75    7.5     15      30      60 */
  97         /* vid mode 0 */        -1,     60,     120,    240,    -1,
  98         /* vid mode 1 */        80,     160,    320,    640,    -1,
  99         /* vid mode 2 */        240,    480,    960,    1920,   -1,
 100         /* vid mode 3 */        320,    640,    1280,   2560,   -1,
 101         /* vid mode 4 */        480,    960,    1920,   3840,   -1,
 102         /* vid mode 5 */        160,    320,    640,    1280,   2560
 103 };
 104 
 105 /* indexed by vid mode */
 106 static int g_bytes_per_frame[6] = {
 107     57600,
 108     153600,
 109     460800,
 110     614400,
 111     921600,
 112     307200
 113 };
 114 
 115 
 116 static
 117 void dcam_rsrc_fail(t1394_isoch_single_handle_t t1394_single_hdl,
 118     opaque_t single_evt_arg, t1394_isoch_rsrc_error_t fail_args);
 119 
 120 /*
 121  * dcam1394_ioctl_frame_rcv_start
 122  */




   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 
  28 
  29 /*
  30  * dcam_frame.c
  31  *
  32  * dcam1394 driver.  Support for video frame access.
  33  */
  34 
  35 #include <sys/int_limits.h>
  36 #include <sys/types.h>
  37 #include <sys/kmem.h>
  38 #include <sys/cmn_err.h>
  39 #include <sys/1394/targets/dcam1394/dcam.h>
  40 #include <sys/1394/targets/dcam1394/dcam_frame.h>
  41 #include <sys/tnf_probe.h>
  42 #include <sys/dcam/dcam1394_io.h>
  43 
  44 #include <sys/1394/targets/dcam1394/dcam_reg.h>
  45 
  46 static void dcam_free_resources(dcam_state_t *);
  47 
  48 typedef struct dcam_mode_info_s {


  77  *  mode_4 1/2h, 240q, 960
  78  *  mode_5 1/2h,  80q, 320
  79  *
  80  * 3.75fps
  81  *  mode_0 x
  82  *  mode_1 1/8h,  20q,  80
  83  *  mode_2 1/4h,  60q, 240
  84  *  mode_3 1/4h,  80q, 320
  85  *  mode_4 1/4h, 120q, 480
  86  *  mode_5 1/4h,  40q, 160
  87  *
  88  * 60fps
  89  *  mode_5 4H, 640q, 2560
  90  *
  91  */
  92 
  93 /* indexed by vid mode, frame rate */
  94 static int g_bytes_per_packet[6][5] = {
  95 
  96         /* fps:                 3.75    7.5     15      30      60 */
  97         /* vid mode 0 */        {  -1,  60,     120,    240,      -1 },
  98         /* vid mode 1 */        {  80,  160,    320,    640,      -1 },
  99         /* vid mode 2 */        { 240,  480,    960,    1920,     -1 },
 100         /* vid mode 3 */        { 320,  640,    1280,   2560,     -1 },
 101         /* vid mode 4 */        { 480,  960,    1920,   3840,     -1 },
 102         /* vid mode 5 */        { 160,  320,    640,    1280,   2560 }
 103 };
 104 
 105 /* indexed by vid mode */
 106 static int g_bytes_per_frame[6] = {
 107     57600,
 108     153600,
 109     460800,
 110     614400,
 111     921600,
 112     307200
 113 };
 114 
 115 
 116 static
 117 void dcam_rsrc_fail(t1394_isoch_single_handle_t t1394_single_hdl,
 118     opaque_t single_evt_arg, t1394_isoch_rsrc_error_t fail_args);
 119 
 120 /*
 121  * dcam1394_ioctl_frame_rcv_start
 122  */