Lines Matching refs:h
147 struct uvcg_control_header *h; in uvcg_control_header_make() local
149 h = kzalloc(sizeof(*h), GFP_KERNEL); in uvcg_control_header_make()
150 if (!h) in uvcg_control_header_make()
153 h->desc.bLength = UVC_DT_HEADER_SIZE(1); in uvcg_control_header_make()
154 h->desc.bDescriptorType = USB_DT_CS_INTERFACE; in uvcg_control_header_make()
155 h->desc.bDescriptorSubType = UVC_VC_HEADER; in uvcg_control_header_make()
156 h->desc.bcdUVC = cpu_to_le16(0x0100); in uvcg_control_header_make()
157 h->desc.dwClockFrequency = cpu_to_le32(48000000); in uvcg_control_header_make()
159 config_item_init_type_name(&h->item, name, &uvcg_control_header_type); in uvcg_control_header_make()
161 return &h->item; in uvcg_control_header_make()
167 struct uvcg_control_header *h = to_uvcg_control_header(item); in uvcg_control_header_drop() local
169 kfree(h); in uvcg_control_header_drop()
959 struct uvcg_streaming_header *h; in uvcg_streaming_header_make() local
961 h = kzalloc(sizeof(*h), GFP_KERNEL); in uvcg_streaming_header_make()
962 if (!h) in uvcg_streaming_header_make()
965 INIT_LIST_HEAD(&h->formats); in uvcg_streaming_header_make()
966 h->desc.bDescriptorType = USB_DT_CS_INTERFACE; in uvcg_streaming_header_make()
967 h->desc.bDescriptorSubType = UVC_VS_INPUT_HEADER; in uvcg_streaming_header_make()
968 h->desc.bTerminalLink = 3; in uvcg_streaming_header_make()
969 h->desc.bControlSize = UVCG_STREAMING_CONTROL_SIZE; in uvcg_streaming_header_make()
971 config_item_init_type_name(&h->item, name, &uvcg_streaming_header_type); in uvcg_streaming_header_make()
973 return &h->item; in uvcg_streaming_header_make()
979 struct uvcg_streaming_header *h = to_uvcg_streaming_header(item); in uvcg_streaming_header_drop() local
981 kfree(h); in uvcg_streaming_header_drop()
1264 struct uvcg_frame *h; in uvcg_frame_make() local
1269 h = kzalloc(sizeof(*h), GFP_KERNEL); in uvcg_frame_make()
1270 if (!h) in uvcg_frame_make()
1273 h->frame.b_descriptor_type = USB_DT_CS_INTERFACE; in uvcg_frame_make()
1274 h->frame.b_frame_index = 1; in uvcg_frame_make()
1275 h->frame.w_width = cpu_to_le16(640); in uvcg_frame_make()
1276 h->frame.w_height = cpu_to_le16(360); in uvcg_frame_make()
1277 h->frame.dw_min_bit_rate = cpu_to_le32(18432000); in uvcg_frame_make()
1278 h->frame.dw_max_bit_rate = cpu_to_le32(55296000); in uvcg_frame_make()
1279 h->frame.dw_max_video_frame_buffer_size = cpu_to_le32(460800); in uvcg_frame_make()
1280 h->frame.dw_default_frame_interval = cpu_to_le32(666666); in uvcg_frame_make()
1288 h->frame.b_descriptor_subtype = UVC_VS_FRAME_UNCOMPRESSED; in uvcg_frame_make()
1289 h->fmt_type = UVCG_UNCOMPRESSED; in uvcg_frame_make()
1291 h->frame.b_descriptor_subtype = UVC_VS_FRAME_MJPEG; in uvcg_frame_make()
1292 h->fmt_type = UVCG_MJPEG; in uvcg_frame_make()
1295 kfree(h); in uvcg_frame_make()
1301 config_item_init_type_name(&h->item, name, &uvcg_frame_type); in uvcg_frame_make()
1303 return &h->item; in uvcg_frame_make()
1308 struct uvcg_frame *h = to_uvcg_frame(item); in uvcg_frame_drop() local
1319 kfree(h); in uvcg_frame_drop()
1553 struct uvcg_uncompressed *h; in uvcg_uncompressed_make() local
1555 h = kzalloc(sizeof(*h), GFP_KERNEL); in uvcg_uncompressed_make()
1556 if (!h) in uvcg_uncompressed_make()
1559 h->desc.bLength = UVC_DT_FORMAT_UNCOMPRESSED_SIZE; in uvcg_uncompressed_make()
1560 h->desc.bDescriptorType = USB_DT_CS_INTERFACE; in uvcg_uncompressed_make()
1561 h->desc.bDescriptorSubType = UVC_VS_FORMAT_UNCOMPRESSED; in uvcg_uncompressed_make()
1562 memcpy(h->desc.guidFormat, guid, sizeof(guid)); in uvcg_uncompressed_make()
1563 h->desc.bBitsPerPixel = 16; in uvcg_uncompressed_make()
1564 h->desc.bDefaultFrameIndex = 1; in uvcg_uncompressed_make()
1565 h->desc.bAspectRatioX = 0; in uvcg_uncompressed_make()
1566 h->desc.bAspectRatioY = 0; in uvcg_uncompressed_make()
1567 h->desc.bmInterfaceFlags = 0; in uvcg_uncompressed_make()
1568 h->desc.bCopyProtect = 0; in uvcg_uncompressed_make()
1570 h->fmt.type = UVCG_UNCOMPRESSED; in uvcg_uncompressed_make()
1571 config_group_init_type_name(&h->fmt.group, name, in uvcg_uncompressed_make()
1574 return &h->fmt.group; in uvcg_uncompressed_make()
1580 struct uvcg_uncompressed *h = to_uvcg_uncompressed(item); in uvcg_uncompressed_drop() local
1582 kfree(h); in uvcg_uncompressed_drop()
1762 struct uvcg_mjpeg *h; in uvcg_mjpeg_make() local
1764 h = kzalloc(sizeof(*h), GFP_KERNEL); in uvcg_mjpeg_make()
1765 if (!h) in uvcg_mjpeg_make()
1768 h->desc.bLength = UVC_DT_FORMAT_MJPEG_SIZE; in uvcg_mjpeg_make()
1769 h->desc.bDescriptorType = USB_DT_CS_INTERFACE; in uvcg_mjpeg_make()
1770 h->desc.bDescriptorSubType = UVC_VS_FORMAT_MJPEG; in uvcg_mjpeg_make()
1771 h->desc.bDefaultFrameIndex = 1; in uvcg_mjpeg_make()
1772 h->desc.bAspectRatioX = 0; in uvcg_mjpeg_make()
1773 h->desc.bAspectRatioY = 0; in uvcg_mjpeg_make()
1774 h->desc.bmInterfaceFlags = 0; in uvcg_mjpeg_make()
1775 h->desc.bCopyProtect = 0; in uvcg_mjpeg_make()
1777 h->fmt.type = UVCG_MJPEG; in uvcg_mjpeg_make()
1778 config_group_init_type_name(&h->fmt.group, name, in uvcg_mjpeg_make()
1781 return &h->fmt.group; in uvcg_mjpeg_make()
1787 struct uvcg_mjpeg *h = to_uvcg_mjpeg(item); in uvcg_mjpeg_drop() local
1789 kfree(h); in uvcg_mjpeg_drop()
1940 static int __uvcg_iter_strm_cls(struct uvcg_streaming_header *h, in __uvcg_iter_strm_cls() argument
1954 ret = fun(h, priv2, priv3, 0, UVCG_HEADER); in __uvcg_iter_strm_cls()
1957 list_for_each_entry(f, &h->formats, entry) { in __uvcg_iter_strm_cls()
1989 struct uvcg_streaming_header *h = priv1; in __uvcg_cnt_strm() local
1991 *size += sizeof(h->desc); in __uvcg_cnt_strm()
1993 *size += h->num_fmt * UVCG_STREAMING_CONTROL_SIZE; in __uvcg_cnt_strm()
2050 struct uvcg_streaming_header *h = priv1; in __uvcg_fill_strm() local
2053 memcpy(*dest, &h->desc, sizeof(h->desc)); in __uvcg_fill_strm()
2054 *dest += sizeof(h->desc); in __uvcg_fill_strm()
2056 list_for_each_entry(f, &h->formats, entry) { in __uvcg_fill_strm()
2060 ihdr->bLength = sizeof(h->desc) + h->num_fmt * sz; in __uvcg_fill_strm()
2061 ihdr->bNumFormats = h->num_fmt; in __uvcg_fill_strm()
2093 struct uvc_descriptor_header *h = *dest; in __uvcg_fill_strm() local
2103 h->bLength = UVC_DT_FRAME_UNCOMPRESSED_SIZE( in __uvcg_fill_strm()
2106 h->bLength = UVC_DT_FRAME_MJPEG_SIZE( in __uvcg_fill_strm()