Lines Matching refs:h
138 struct uvcg_control_header *h; in uvcg_control_header_make() local
140 h = kzalloc(sizeof(*h), GFP_KERNEL); in uvcg_control_header_make()
141 if (!h) in uvcg_control_header_make()
144 h->desc.bLength = UVC_DT_HEADER_SIZE(1); in uvcg_control_header_make()
145 h->desc.bDescriptorType = USB_DT_CS_INTERFACE; in uvcg_control_header_make()
146 h->desc.bDescriptorSubType = UVC_VC_HEADER; in uvcg_control_header_make()
147 h->desc.bcdUVC = cpu_to_le16(0x0100); in uvcg_control_header_make()
148 h->desc.dwClockFrequency = cpu_to_le32(48000000); in uvcg_control_header_make()
150 config_item_init_type_name(&h->item, name, &uvcg_control_header_type); in uvcg_control_header_make()
152 return &h->item; in uvcg_control_header_make()
158 struct uvcg_control_header *h = to_uvcg_control_header(item); in uvcg_control_header_drop() local
160 kfree(h); in uvcg_control_header_drop()
914 struct uvcg_streaming_header *h; in uvcg_streaming_header_make() local
916 h = kzalloc(sizeof(*h), GFP_KERNEL); in uvcg_streaming_header_make()
917 if (!h) in uvcg_streaming_header_make()
920 INIT_LIST_HEAD(&h->formats); in uvcg_streaming_header_make()
921 h->desc.bDescriptorType = USB_DT_CS_INTERFACE; in uvcg_streaming_header_make()
922 h->desc.bDescriptorSubType = UVC_VS_INPUT_HEADER; in uvcg_streaming_header_make()
923 h->desc.bTerminalLink = 3; in uvcg_streaming_header_make()
924 h->desc.bControlSize = UVCG_STREAMING_CONTROL_SIZE; in uvcg_streaming_header_make()
926 config_item_init_type_name(&h->item, name, &uvcg_streaming_header_type); in uvcg_streaming_header_make()
928 return &h->item; in uvcg_streaming_header_make()
934 struct uvcg_streaming_header *h = to_uvcg_streaming_header(item); in uvcg_streaming_header_drop() local
936 kfree(h); in uvcg_streaming_header_drop()
1206 struct uvcg_frame *h; in uvcg_frame_make() local
1211 h = kzalloc(sizeof(*h), GFP_KERNEL); in uvcg_frame_make()
1212 if (!h) in uvcg_frame_make()
1215 h->frame.b_descriptor_type = USB_DT_CS_INTERFACE; in uvcg_frame_make()
1216 h->frame.b_frame_index = 1; in uvcg_frame_make()
1217 h->frame.w_width = cpu_to_le16(640); in uvcg_frame_make()
1218 h->frame.w_height = cpu_to_le16(360); in uvcg_frame_make()
1219 h->frame.dw_min_bit_rate = cpu_to_le32(18432000); in uvcg_frame_make()
1220 h->frame.dw_max_bit_rate = cpu_to_le32(55296000); in uvcg_frame_make()
1221 h->frame.dw_max_video_frame_buffer_size = cpu_to_le32(460800); in uvcg_frame_make()
1222 h->frame.dw_default_frame_interval = cpu_to_le32(666666); in uvcg_frame_make()
1230 h->frame.b_descriptor_subtype = UVC_VS_FRAME_UNCOMPRESSED; in uvcg_frame_make()
1231 h->fmt_type = UVCG_UNCOMPRESSED; in uvcg_frame_make()
1233 h->frame.b_descriptor_subtype = UVC_VS_FRAME_MJPEG; in uvcg_frame_make()
1234 h->fmt_type = UVCG_MJPEG; in uvcg_frame_make()
1237 kfree(h); in uvcg_frame_make()
1243 config_item_init_type_name(&h->item, name, &uvcg_frame_type); in uvcg_frame_make()
1245 return &h->item; in uvcg_frame_make()
1250 struct uvcg_frame *h = to_uvcg_frame(item); in uvcg_frame_drop() local
1261 kfree(h); in uvcg_frame_drop()
1480 struct uvcg_uncompressed *h; in uvcg_uncompressed_make() local
1482 h = kzalloc(sizeof(*h), GFP_KERNEL); in uvcg_uncompressed_make()
1483 if (!h) in uvcg_uncompressed_make()
1486 h->desc.bLength = UVC_DT_FORMAT_UNCOMPRESSED_SIZE; in uvcg_uncompressed_make()
1487 h->desc.bDescriptorType = USB_DT_CS_INTERFACE; in uvcg_uncompressed_make()
1488 h->desc.bDescriptorSubType = UVC_VS_FORMAT_UNCOMPRESSED; in uvcg_uncompressed_make()
1489 memcpy(h->desc.guidFormat, guid, sizeof(guid)); in uvcg_uncompressed_make()
1490 h->desc.bBitsPerPixel = 16; in uvcg_uncompressed_make()
1491 h->desc.bDefaultFrameIndex = 1; in uvcg_uncompressed_make()
1492 h->desc.bAspectRatioX = 0; in uvcg_uncompressed_make()
1493 h->desc.bAspectRatioY = 0; in uvcg_uncompressed_make()
1494 h->desc.bmInterfaceFlags = 0; in uvcg_uncompressed_make()
1495 h->desc.bCopyProtect = 0; in uvcg_uncompressed_make()
1497 h->fmt.type = UVCG_UNCOMPRESSED; in uvcg_uncompressed_make()
1498 config_group_init_type_name(&h->fmt.group, name, in uvcg_uncompressed_make()
1501 return &h->fmt.group; in uvcg_uncompressed_make()
1507 struct uvcg_uncompressed *h = to_uvcg_uncompressed(item); in uvcg_uncompressed_drop() local
1509 kfree(h); in uvcg_uncompressed_drop()
1676 struct uvcg_mjpeg *h; in uvcg_mjpeg_make() local
1678 h = kzalloc(sizeof(*h), GFP_KERNEL); in uvcg_mjpeg_make()
1679 if (!h) in uvcg_mjpeg_make()
1682 h->desc.bLength = UVC_DT_FORMAT_MJPEG_SIZE; in uvcg_mjpeg_make()
1683 h->desc.bDescriptorType = USB_DT_CS_INTERFACE; in uvcg_mjpeg_make()
1684 h->desc.bDescriptorSubType = UVC_VS_FORMAT_MJPEG; in uvcg_mjpeg_make()
1685 h->desc.bDefaultFrameIndex = 1; in uvcg_mjpeg_make()
1686 h->desc.bAspectRatioX = 0; in uvcg_mjpeg_make()
1687 h->desc.bAspectRatioY = 0; in uvcg_mjpeg_make()
1688 h->desc.bmInterfaceFlags = 0; in uvcg_mjpeg_make()
1689 h->desc.bCopyProtect = 0; in uvcg_mjpeg_make()
1691 h->fmt.type = UVCG_MJPEG; in uvcg_mjpeg_make()
1692 config_group_init_type_name(&h->fmt.group, name, in uvcg_mjpeg_make()
1695 return &h->fmt.group; in uvcg_mjpeg_make()
1701 struct uvcg_mjpeg *h = to_uvcg_mjpeg(item); in uvcg_mjpeg_drop() local
1703 kfree(h); in uvcg_mjpeg_drop()
1846 static int __uvcg_iter_strm_cls(struct uvcg_streaming_header *h, in __uvcg_iter_strm_cls() argument
1860 ret = fun(h, priv2, priv3, 0, UVCG_HEADER); in __uvcg_iter_strm_cls()
1863 list_for_each_entry(f, &h->formats, entry) { in __uvcg_iter_strm_cls()
1895 struct uvcg_streaming_header *h = priv1; in __uvcg_cnt_strm() local
1897 *size += sizeof(h->desc); in __uvcg_cnt_strm()
1899 *size += h->num_fmt * UVCG_STREAMING_CONTROL_SIZE; in __uvcg_cnt_strm()
1956 struct uvcg_streaming_header *h = priv1; in __uvcg_fill_strm() local
1959 memcpy(*dest, &h->desc, sizeof(h->desc)); in __uvcg_fill_strm()
1960 *dest += sizeof(h->desc); in __uvcg_fill_strm()
1962 list_for_each_entry(f, &h->formats, entry) { in __uvcg_fill_strm()
1966 ihdr->bLength = sizeof(h->desc) + h->num_fmt * sz; in __uvcg_fill_strm()
1967 ihdr->bNumFormats = h->num_fmt; in __uvcg_fill_strm()
1999 struct uvc_descriptor_header *h = *dest; in __uvcg_fill_strm() local
2009 h->bLength = UVC_DT_FRAME_UNCOMPRESSED_SIZE( in __uvcg_fill_strm()
2012 h->bLength = UVC_DT_FRAME_MJPEG_SIZE( in __uvcg_fill_strm()