Lines Matching defs:strm_if

675 	usbvc_stream_if_t *strm_if;
702 strm_if = usbvcp->usbvc_curr_strm;
703 if (strm_if->start_polling == 1) {
705 usb_pipe_stop_isoc_polling(strm_if->datain_ph, USB_FLAGS_SLEEP);
707 strm_if->start_polling = 0;
709 strm_if->stream_on = 0;
711 usbvc_close_isoc_pipe(usbvcp, strm_if);
712 if_num = strm_if->if_descr->if_alt->altif_descr.bInterfaceNumber;
720 usbvc_free_read_bufs(usbvcp, strm_if);
723 strm_if->buf_read_num = USBVC_DEFAULT_READ_BUF_NUM;
725 usbvc_free_map_bufs(usbvcp, strm_if);
742 usbvc_stream_if_t *strm_if;
774 strm_if = usbvcp->usbvc_curr_strm;
775 if (!strm_if) {
787 if (strm_if->datain_ph == NULL) {
788 if (usbvc_open_isoc_pipe(usbvcp, strm_if) != USB_SUCCESS) {
796 if (usbvc_alloc_read_bufs(usbvcp, strm_if) != USB_SUCCESS) {
807 if (strm_if->start_polling != 1) {
808 if (usbvc_start_isoc_polling(usbvcp, strm_if, NULL) !=
817 strm_if->start_polling = 1;
820 if (list_is_empty(&strm_if->buf_read.uv_buf_done)) {
834 while (list_is_empty(&strm_if->buf_read.uv_buf_done)) {
940 usbvc_stream_if_t *strm_if;
946 strm_if = usbvcp->usbvc_curr_strm;
947 LE_TO_UINT32(strm_if->ctrl_pc.dwMaxVideoFrameSize, 0, maxsize);
1016 usbvc_stream_if_t *strm_if;
1034 strm_if = usbvcp->usbvc_curr_strm;
1035 if (!strm_if) {
1042 bufgrp = &strm_if->buf_map;
1488 usbvc_stream_if_t *strm_if;
1495 strm_if = usbvcp->usbvc_curr_strm;
1496 if (!strm_if) {
1508 if (strm_if->stream_on == 0) {
1515 if (!strm_if->datain_ph) {
1525 if ((rv = usbvc_vs_set_probe_commit(usbvcp, strm_if,
1526 &strm_if->ctrl_pc, VS_COMMIT_CONTROL)) != USB_SUCCESS) {
1537 if ((rv = usbvc_set_alt(usbvcp, strm_if)) != USB_SUCCESS) {
1550 if (usbvc_start_isoc_polling(usbvcp, strm_if, V4L2_MEMORY_MMAP)
1558 strm_if->start_polling = 1;
2261 usbvc_stream_if_t *strm_if;
2265 strm_if = (usbvc_stream_if_t *)kmem_zalloc(sizeof (usbvc_stream_if_t),
2267 strm_if->if_descr = &usbvcp->usbvc_reg->dev_curr_cfg->cfg_if[if_num];
2268 if_alt_data = strm_if->if_descr->if_alt;
2269 if (usbvc_parse_stream_header(usbvcp, strm_if) != USB_SUCCESS) {
2272 kmem_free(strm_if, sizeof (usbvc_stream_if_t));
2276 if (usbvc_parse_format_groups(usbvcp, strm_if) != USB_SUCCESS) {
2279 kmem_free(strm_if, sizeof (usbvc_stream_if_t));
2285 for (i = 0; i < strm_if->if_descr->if_n_alt; i++) {
2286 if_alt_data = &strm_if->if_descr->if_alt[i];
2290 if (strm_if->input_header != NULL &&
2292 strm_if->input_header->descr->bEndpointAddress) {
2296 if (strm_if->output_header != NULL &&
2298 strm_if->output_header->descr->bEndpointAddress) {
2305 if (pktsize > strm_if->max_isoc_payload) {
2306 strm_if->max_isoc_payload = pktsize;
2312 strm_if->fid = 0xff;
2317 strm_if->buf_read_num = USBVC_DEFAULT_READ_BUF_NUM;
2321 strm_if->max_isoc_payload);
2323 return (strm_if);
2337 usbvc_stream_if_t *strm_if;
2349 strm_if = usbvc_parse_stream_if(usbvcp, if_num);
2350 if (strm_if == NULL) {
2358 list_create(&(strm_if->buf_map.uv_buf_free),
2360 list_create(&(strm_if->buf_map.uv_buf_done),
2362 list_create(&(strm_if->buf_read.uv_buf_free),
2364 list_create(&(strm_if->buf_read.uv_buf_done),
2367 list_insert_tail(&(usbvcp->usbvc_stream_list), strm_if);
2608 usbvc_parse_format_groups(usbvc_state_t *usbvcp, usbvc_stream_if_t *strm_if)
2623 if (strm_if->input_header) {
2624 fmtgrp_cnt = strm_if->input_header->descr->bNumFormats;
2625 } else if (strm_if->output_header) {
2626 fmtgrp_cnt = strm_if->output_header->descr->bNumFormats;
2638 if_alt_data = strm_if->if_descr->if_alt;
2672 strm_if->fmtgrp_cnt = fmtgrp_num;
2683 strm_if->format_group = NULL;
2690 strm_if->format_group = fmtgrp;
2703 usbvc_parse_stream_header(usbvc_state_t *usbvcp, usbvc_stream_if_t *strm_if)
2712 if_alt_data = strm_if->if_descr->if_alt;
2735 strm_if->input_header =
2739 in_hdr = strm_if->input_header;
2752 strm_if->output_header =
2756 out_hdr = strm_if->output_header;
2780 usbvc_alloc_read_bufs(usbvc_state_t *usbvcp, usbvc_stream_if_t *strm_if)
2789 LE_TO_UINT32(strm_if->ctrl_pc.dwMaxVideoFrameSize, 0, len);
2794 for (i = 0; i < strm_if->buf_read_num; i++) {
2802 list_insert_tail(&(strm_if->buf_read.uv_buf_free), buf);
2804 strm_if->buf_read.buf_cnt = strm_if->buf_read_num;
2806 "read_bufs: %d bufs allocated", strm_if->buf_read.buf_cnt);
2879 usbvc_free_read_bufs(usbvc_state_t *usbvcp, usbvc_stream_if_t *strm_if)
2885 if (!strm_if) {
2889 buf = strm_if->buf_read.buf_filling;
2891 strm_if->buf_read.buf_filling = NULL;
2893 while (!list_is_empty(&strm_if->buf_read.uv_buf_free)) {
2894 buf = list_head(&strm_if->buf_read.uv_buf_free);
2896 list_remove(&(strm_if->buf_read.uv_buf_free), buf);
2900 while (!list_is_empty(&strm_if->buf_read.uv_buf_done)) {
2901 buf = list_head(&strm_if->buf_read.uv_buf_done);
2903 list_remove(&(strm_if->buf_read.uv_buf_done), buf);
2907 strm_if->buf_read.buf_cnt = 0;
2918 usbvc_alloc_map_bufs(usbvc_state_t *usbvcp, usbvc_stream_if_t *strm_if,
2939 strm_if->buf_map.buf_head = bufs;
2962 list_insert_tail(&strm_if->buf_map.uv_buf_free, &bufs[i]);
2967 strm_if->buf_map.buf_cnt = buf_cnt;
2968 strm_if->buf_map.buf_filling = NULL;
2976 usbvc_free_map_bufs(usbvc_state_t *usbvcp, usbvc_stream_if_t *strm_if)
2981 if (!strm_if) {
2985 strm_if->buf_map.buf_filling = NULL;
2986 while (!list_is_empty(&strm_if->buf_map.uv_buf_free)) {
2987 buf = (usbvc_buf_t *)list_head(&strm_if->buf_map.uv_buf_free);
2988 list_remove(&(strm_if->buf_map.uv_buf_free), buf);
2990 while (!list_is_empty(&strm_if->buf_map.uv_buf_done)) {
2991 buf = (usbvc_buf_t *)list_head(&strm_if->buf_map.uv_buf_done);
2992 list_remove(&(strm_if->buf_map.uv_buf_done), buf);
2994 buf = strm_if->buf_map.buf_head;
3004 kmem_free(buf, sizeof (usbvc_buf_t) * strm_if->buf_map.buf_cnt);
3005 strm_if->buf_map.buf_cnt = 0;
3006 strm_if->buf_map.buf_head = NULL;
3017 usbvc_open_isoc_pipe(usbvc_state_t *usbvcp, usbvc_stream_if_t *strm_if)
3024 if ((rval = usbvc_set_alt(usbvcp, strm_if)) != USB_SUCCESS) {
3031 if ((rval = usb_pipe_open(usbvcp->usbvc_dip, strm_if->curr_ep, &policy,
3032 USB_FLAGS_SLEEP, &strm_if->datain_ph)) != USB_SUCCESS) {
3040 strm_if->start_polling = 0;
3042 strm_if->stream_on = 0;
3046 (void *)strm_if->datain_ph);
3056 usbvc_close_isoc_pipe(usbvc_state_t *usbvcp, usbvc_stream_if_t *strm_if)
3059 if (!strm_if) {
3065 if (strm_if->datain_ph) {
3067 usb_pipe_close(usbvcp->usbvc_dip, strm_if->datain_ph,
3071 strm_if->datain_ph = NULL;
3080 usbvc_start_isoc_polling(usbvc_state_t *usbvcp, usbvc_stream_if_t *strm_if,
3091 pkt_size = HS_PKT_SIZE(strm_if->curr_ep->wMaxPacketSize);
3092 if_num = strm_if->if_descr->if_alt->altif_descr.bInterfaceNumber;
3093 LE_TO_UINT32(strm_if->ctrl_pc.dwMaxVideoFrameSize, 0, frame_size);
3099 if_num, strm_if->curr_alt, n_pkt, pkt_size,
3100 strm_if->curr_ep->wMaxPacketSize,
3101 (1 + ((strm_if->curr_ep->wMaxPacketSize>> 11) & 3)),
3135 rval = usb_pipe_isoc_xfer(strm_if->datain_ph, req, 0);
3244 usbvc_stream_if_t *strm_if;
3251 strm_if = usbvcp->usbvc_curr_strm;
3272 rval = usb_pipe_isoc_xfer(strm_if->datain_ph, isoc_req,
3287 strm_if->start_polling = 0;
3290 strm_if->start_polling, completion_reason);
3305 usbvc_set_alt(usbvc_state_t *usbvcp, usbvc_stream_if_t *strm_if)
3317 LE_TO_UINT32(strm_if->ctrl_pc.dwMaxPayloadTransferSize, 0, bandwidth);
3327 strm_if->curr_ep = NULL;
3329 ohd = strm_if->output_header;
3330 ihd = strm_if->input_header;
3335 for (i = 0; i < strm_if->if_descr->if_n_alt; i++) {
3336 alt = &strm_if->if_descr->if_alt[i];
3359 strm_if->curr_alt = i;
3360 strm_if->curr_ep = &alt->altif_ep[j].ep_descr;
3364 if (!strm_if->curr_ep) {
3372 "usbvc_set_alt: strm_if->curr_alt=%d", strm_if->curr_alt);
3373 if_num = strm_if->if_descr->if_alt->altif_descr.bInterfaceNumber;
3375 if ((rval = usb_set_alt_if(usbvcp->usbvc_dip, if_num, strm_if->curr_alt,
3380 if_num, strm_if->curr_alt, rval);
3388 if_num, strm_if->curr_alt);
3404 usbvc_stream_if_t *strm_if;
3445 strm_if = usbvcp->usbvc_curr_strm;
3447 LE_TO_UINT32(strm_if->ctrl_pc.dwMaxVideoFrameSize, 0, len);
3458 strm_if->fid = head_flag & USBVC_STREAM_FID;
3505 strm_if->fid, buf_filling->len, buf_filling->filled);
3513 if (strm_if->fid != 0xff && strm_if->fid ==
3521 strm_if->fid = head_flag & USBVC_STREAM_FID;
3524 } else if (strm_if->fid != (head_flag & USBVC_STREAM_FID)) {
3527 strm_if->fid = head_flag & USBVC_STREAM_FID;
3659 usbvc_vs_set_probe_commit(usbvc_state_t *usbvcp, usbvc_stream_if_t *strm_if,
3677 setup.wIndex = strm_if->if_descr->if_alt->altif_descr.bInterfaceNumber;
3716 usbvc_vs_get_probe(usbvc_state_t *usbvcp, usbvc_stream_if_t *strm_if,
3729 (uint16_t)strm_if->if_descr->if_alt->altif_descr.bInterfaceNumber;
3759 usbvc_stream_if_t *strm_if;
3778 strm_if = usbvcp->usbvc_curr_strm;
3783 for (i = 0; i < strm_if->fmtgrp_cnt; i++) {
3784 curr_fmtgrp = &strm_if->format_group[i];
3821 if (usbvc_vs_set_probe_commit(usbvcp, strm_if, &ctrl, VS_PROBE_CONTROL)
3826 if (usbvc_vs_get_probe(usbvcp, strm_if, &ctrl_get, GET_CUR)
3833 LE_TO_UINT32(strm_if->ctrl_pc.dwMaxPayloadTransferSize, 0, bandwidth);
3838 if (usbvc_vs_set_probe_commit(usbvcp, strm_if, &ctrl_get,
3848 if (index < strm_if->fmtgrp_cnt) {
3849 strm_if->cur_format_group = &strm_if->format_group[index];
3859 strm_if->cur_format_group->frames[0].descr->bFrameIndex;
3860 if (index < strm_if->cur_format_group->frame_cnt) {
3861 strm_if->cur_format_group->cur_frame =
3862 &strm_if->cur_format_group->frames[index];
3873 * setting to strm_if->ctrl_pc
3875 bcopy(&ctrl_get, &strm_if->ctrl_pc, sizeof (usbvc_vs_probe_commit_t));