Lines Matching refs:desc
521 const usb_descriptor_t *desc;
523 while ((desc = usb_desc_iter_next(&iter)) != NULL) {
526 print_descriptor(desc);
791 const usb_descriptor_t *desc;
801 while ((desc = usb_desc_iter_next_non_interface(iter)) != NULL) {
802 if (desc->bDescriptorType != UDESC_CS_INTERFACE ||
803 desc->bLength < sizeof(*uvdesc))
805 uvdesc = (const uvideo_descriptor_t *)desc;
829 while ((desc = usb_desc_iter_next_non_interface(iter)) != NULL) {
830 if (desc->bDescriptorType != UDESC_CS_INTERFACE ||
831 desc->bLength < sizeof(*uvdesc))
833 uvdesc = (const uvideo_descriptor_t *)desc;
877 uvideo_unit_alloc(const uvideo_descriptor_t *desc)
882 KASSERT(desc->bDescriptorType == UDESC_CS_INTERFACE);
885 err = uvideo_unit_init(vu, desc);
897 uvideo_unit_init(struct uvideo_unit *vu, const uvideo_descriptor_t *desc)
908 switch (desc->bDescriptorSubtype) {
910 if (desc->bLength < sizeof(*input))
912 input = (const uvideo_input_terminal_descriptor_t *)desc;
915 if (desc->bLength < sizeof(*camera))
918 (const uvideo_camera_terminal_descriptor_t *)desc;
941 if (desc->bLength < sizeof(*selector))
943 selector = (const uvideo_selector_unit_descriptor_t *)desc;
949 if (desc->bLength < sizeof(*processing))
951 processing = (const uvideo_processing_unit_descriptor_t *)desc;
962 if (desc->bLength < sizeof(*extension))
964 extension = (const uvideo_extension_unit_descriptor_t *)desc;
975 desc->bDescriptorType, desc->bDescriptorSubtype));
1140 const usb_descriptor_t *desc;
1157 while ((desc = usb_desc_iter_next_non_interface(iter)) != NULL) {
1158 switch (desc->bDescriptorType) {
1160 if (desc->bLength < sizeof(usb_endpoint_descriptor_t))
1163 desc, bmAttributes);
1165 desc, bEndpointAddress);
1198 desc, bEndpointAddress);
1205 desc, bInterval);
1209 desc, wMaxPacketSize)));
1212 usb_endpoint_descriptor_t, desc,
1220 if (desc->bLength < sizeof(*uvdesc))
1222 uvdesc = (const uvideo_descriptor_t *)desc;
1267 desc->bLength,
1268 desc->bDescriptorType));
1327 const usb_descriptor_t *desc;
1422 while ((desc = usb_desc_iter_peek(iter)) != NULL) {
1423 if (desc->bDescriptorType != UDESC_CS_INTERFACE)
1425 if (desc->bLength < sizeof(*uvdesc)) {
1427 desc->bLength));
1430 uvdesc = (const uvideo_descriptor_t *)desc;
2576 print_descriptor(const usb_descriptor_t *desc)
2581 if (desc->bDescriptorType == UDESC_INTERFACE) {
2584 if (desc->bLength < sizeof(*id)) {
2588 id = (const usb_interface_descriptor_t *)desc;
2601 print_vc_descriptor(desc);
2604 print_vs_descriptor(desc);
2608 desc->bLength, desc->bDescriptorType);
2613 desc->bLength, desc->bDescriptorType);
2620 print_vc_descriptor(const usb_descriptor_t *desc)
2626 switch (desc->bDescriptorType) {
2628 if (desc->bLength < sizeof(usb_endpoint_descriptor_t)) {
2633 (const usb_endpoint_descriptor_t *)desc);
2636 if (desc->bLength < sizeof(*vcdesc)) {
2640 vcdesc = (const uvideo_descriptor_t *)desc;
2643 if (desc->bLength <
2653 if (desc->bLength <
2662 if (desc->bLength <
2677 if (desc->bLength <
2687 if (desc->bLength <
2697 if (desc->bLength <
2707 if (desc->bLength <
2726 if (desc->bLength < sizeof(*vcdesc)) {
2730 vcdesc = (const uvideo_descriptor_t *)desc;
2733 if (desc->bLength <
2754 desc->bLength, desc->bDescriptorType);
2760 print_vs_descriptor(const usb_descriptor_t *desc)
2765 switch (desc->bDescriptorType) {
2767 if (desc->bLength < sizeof(usb_endpoint_descriptor_t)) {
2772 (const usb_endpoint_descriptor_t *)desc);
2775 if (desc->bLength < sizeof(*vsdesc)) {
2779 vsdesc = (const uvideo_descriptor_t *)desc;
2782 if (desc->bLength <
2792 if (desc->bLength <
2803 if (desc->bLength <
2815 if (desc->bLength <
2827 if (desc->bLength <
2837 if (desc->bLength <
2847 if (desc->bLength <
2865 desc->bLength, desc->bDescriptorType);
2890 print_endpoint_descriptor(const usb_endpoint_descriptor_t *desc)
2894 desc->bLength,
2895 desc->bDescriptorType,
2896 desc->bEndpointAddress);
2898 print_bitmap(&desc->bmAttributes, 1);
2900 UGETW(desc->wMaxPacketSize),
2901 desc->bInterval);
2906 const uvideo_vc_header_descriptor_t *desc)
2912 desc->bLength,
2913 desc->bDescriptorType,
2914 desc->bDescriptorSubtype,
2915 UGETW(desc->bcdUVC),
2916 UGETW(desc->wTotalLength),
2917 UGETDW(desc->dwClockFrequency),
2918 desc->bInCollection);
2923 const uvideo_input_terminal_descriptor_t *desc)
2929 desc->bLength,
2930 desc->bDescriptorType,
2931 desc->bDescriptorSubtype,
2932 desc->bTerminalID,
2933 UGETW(desc->wTerminalType),
2934 desc->bAssocTerminal,
2935 desc->iTerminal);
2940 const uvideo_output_terminal_descriptor_t *desc)
2946 desc->bLength,
2947 desc->bDescriptorType,
2948 desc->bDescriptorSubtype,
2949 desc->bTerminalID,
2950 UGETW(desc->wTerminalType),
2951 desc->bAssocTerminal,
2952 desc->bSourceID,
2953 desc->iTerminal);
2958 const uvideo_camera_terminal_descriptor_t *desc)
2967 desc->bLength,
2968 desc->bDescriptorType,
2969 desc->bDescriptorSubtype,
2970 desc->bTerminalID,
2971 UGETW(desc->wTerminalType),
2972 desc->bAssocTerminal,
2973 desc->iTerminal,
2974 UGETW(desc->wObjectiveFocalLengthMin),
2975 UGETW(desc->wObjectiveFocalLengthMax),
2976 UGETW(desc->wOcularFocalLength),
2977 desc->bControlSize);
2979 print_bitmap(desc->bmControls, desc->bControlSize);
2984 const uvideo_selector_unit_descriptor_t *desc)
2991 desc->bLength,
2992 desc->bDescriptorType,
2993 desc->bDescriptorSubtype,
2994 desc->bUnitID,
2995 desc->bNrInPins);
2997 b = &desc->baSourceID[0];
2998 for (i = 0; i < desc->bNrInPins; ++i)
3005 const uvideo_processing_unit_descriptor_t *desc)
3012 desc->bLength,
3013 desc->bDescriptorType,
3014 desc->bDescriptorSubtype,
3015 desc->bUnitID,
3016 desc->bSourceID,
3017 UGETW(desc->wMaxMultiplier),
3018 desc->bControlSize);
3020 print_bitmap(desc->bmControls, desc->bControlSize);
3021 b = &desc->bControlSize + desc->bControlSize + 1;
3029 const uvideo_extension_unit_descriptor_t *desc)
3038 desc->bLength,
3039 desc->bDescriptorType,
3040 desc->bDescriptorSubtype,
3041 desc->bUnitID);
3044 usb_guid_print(&desc->guidExtensionCode);
3048 desc->bNumControls,
3049 desc->bNrInPins);
3052 byte = &desc->baSourceID[0];
3053 for (i = 0; i < desc->bNrInPins; ++i)
3067 const uvideo_vc_interrupt_endpoint_descriptor_t *desc)
3072 desc->bLength,
3073 desc->bDescriptorType,
3074 desc->bDescriptorSubtype,
3075 UGETW(desc->wMaxTransferSize));
3081 const uvideo_vs_output_header_descriptor_t *desc)
3087 desc->bLength,
3088 desc->bDescriptorType,
3089 desc->bDescriptorSubtype,
3090 desc->bNumFormats,
3091 UGETW(desc->wTotalLength),
3092 desc->bEndpointAddress,
3093 desc->bTerminalLink,
3094 desc->bControlSize);
3099 const uvideo_vs_input_header_descriptor_t *desc)
3106 desc->bLength,
3107 desc->bDescriptorType,
3108 desc->bDescriptorSubtype,
3109 desc->bNumFormats,
3110 UGETW(desc->wTotalLength),
3111 desc->bEndpointAddress,
3112 desc->bmInfo,
3113 desc->bTerminalLink,
3114 desc->bStillCaptureMethod,
3115 desc->bTriggerSupport,
3116 desc->bTriggerUsage,
3117 desc->bControlSize);
3118 print_bitmap(desc->bmaControls, desc->bControlSize);
3123 const uvideo_vs_format_uncompressed_descriptor_t *desc)
3128 desc->bLength,
3129 desc->bDescriptorType,
3130 desc->bDescriptorSubtype,
3131 desc->bFormatIndex,
3132 desc->bNumFrameDescriptors);
3133 usb_guid_print(&desc->guidFormat);
3137 desc->bBitsPerPixel,
3138 desc->bDefaultFrameIndex,
3139 desc->bAspectRatioX,
3140 desc->bAspectRatioY,
3141 desc->bmInterlaceFlags,
3142 desc->bCopyProtect);
3147 const uvideo_vs_frame_uncompressed_descriptor_t *desc)
3155 desc->bLength,
3156 desc->bDescriptorType,
3157 desc->bDescriptorSubtype,
3158 desc->bFrameIndex,
3159 desc->bmCapabilities,
3160 UGETW(desc->wWidth),
3161 UGETW(desc->wHeight),
3162 UGETDW(desc->dwMinBitRate),
3163 UGETDW(desc->dwMaxBitRate),
3164 UGETDW(desc->dwMaxVideoFrameBufferSize),
3165 UGETDW(desc->dwDefaultFrameInterval),
3166 desc->bFrameIntervalType);
3171 const uvideo_vs_format_mjpeg_descriptor_t *desc)
3178 desc->bLength,
3179 desc->bDescriptorType,
3180 desc->bDescriptorSubtype,
3181 desc->bFormatIndex,
3182 desc->bNumFrameDescriptors,
3183 desc->bmFlags,
3184 desc->bDefaultFrameIndex,
3185 desc->bAspectRatioX,
3186 desc->bAspectRatioY,
3187 desc->bmInterlaceFlags,
3188 desc->bCopyProtect);
3193 const uvideo_vs_frame_mjpeg_descriptor_t *desc)
3201 desc->bLength,
3202 desc->bDescriptorType,
3203 desc->bDescriptorSubtype,
3204 desc->bFrameIndex,
3205 desc->bmCapabilities,
3206 UGETW(desc->wWidth),
3207 UGETW(desc->wHeight),
3208 UGETDW(desc->dwMinBitRate),
3209 UGETDW(desc->dwMaxBitRate),
3210 UGETDW(desc->dwMaxVideoFrameBufferSize),
3211 UGETDW(desc->dwDefaultFrameInterval),
3212 desc->bFrameIntervalType);
3217 const uvideo_vs_format_dv_descriptor_t *desc)
3223 desc->bLength,
3224 desc->bDescriptorType,
3225 desc->bDescriptorSubtype,
3226 desc->bFormatIndex,
3227 UGETDW(desc->dwMaxVideoFrameBufferSize),
3228 UVIDEO_GET_DV_FREQ(desc->bFormatType),
3229 UVIDEO_GET_DV_FORMAT(desc->bFormatType));