drivers/usbdev/gadget/f_uvc.c
static int fuvc_handle_ext_control(struct uvc_dev_s *fuvc, struct usbdev_req_s *req,
                                   const struct usb_device_request *ctrl)
{
  uint16_t w_value;
  int ret = 0;

  w_value = UGETW(ctrl->wValue);

  switch (ctrl->bRequest)
    {
    case UVC_RC_SETCUR:
      req->callback  = fuvc_control_unit_callback;
      fuvc->event_id = w_value >> 8;
      fuvc->unit_id  = UNIT_ID_H264_EXTENSION;
      break;

    default:
      ret = run_cmd_func(req->buf, req->xfrd, w_value >> 8, ctrl->bRequest, UNIT_ID_H264_EXTENSION);
      if (ret < 0)
        {
          usb_err("run_cmd_func return error!\n");
        }
      break;
    }

  return ret;
}
/* We have two UVC specifications, version 1.1 & 1.5
 * The latter added H264 stream format/frame definition,
 * but the former supports H264 stream via extension unit.
 * After careful consideration, I think we'd better support
 * version 1.1, because it's better supported by windows 7
 */
We have two UVC specifications, version 1.1 & 1.5
The latter added H264 stream format/frame definition,
but the former supports H264 stream via extension unit.
After careful consideration, I think we'd better support
version 1.1, because it's better supported by windows 7
We have two UVC specifications version 1 . 1 & 1 . 5 The latter added H264 stream format / frame definition but the former supports H264 stream via extension unit . After careful consideration I think we ' d better support version 1 . 1 because it ' s better supported by windows 7
static int fuvc_handle_ext_control(struct uvc_dev_s *fuvc, struct usbdev_req_s *req,
                                   const struct usb_device_request *ctrl)
{
  uint16_t w_value;
  int ret = 0;
  w_value = UGETW(ctrl->wValue);
  switch (ctrl->bRequest)
    {
    case UVC_RC_SETCUR:
      req->callback  = fuvc_control_unit_callback;
      fuvc->event_id = w_value >> 8;
      fuvc->unit_id  = UNIT_ID_H264_EXTENSION;
      break;
    default:
      ret = run_cmd_func(req->buf, req->xfrd, w_value >> 8, ctrl->bRequest, UNIT_ID_H264_EXTENSION);
      if (ret < 0)
        {
          usb_err("run_cmd_func return error!\n");
        }
      break;
    }
  return ret;
}
static int fuvc_handle_ext_control ( struct uvc_dev_s * fuvc , struct usbdev_req_s * req , const struct usb_device_request * ctrl ) { uint16_t w_value ; int ret = 0 ; w_value = UGETW ( ctrl -> wValue ) ; switch ( ctrl -> bRequest ) { case UVC_RC_SETCUR : req -> callback = fuvc_control_unit_callback ; fuvc -> event_id = w_value >> 8 ; fuvc -> unit_id = UNIT_ID_H264_EXTENSION ; break ; default : ret = run_cmd_func ( req -> buf , req -> xfrd , w_value >> 8 , ctrl -> bRequest , UNIT_ID_H264_EXTENSION ) ; if ( ret < 0 ) { usb_err ( " \n " ) ; } break ; } return ret ; }
We have two UVC specifications, version 1.1 & 1.5
 The latter added H264 stream format/frame definition,
 but the former supports H264 stream via extension unit.
We have two UVC specifications version 1 . 1 & 1 . 5 The latter added H264 stream format / frame definition but the former supports H264 stream via extension unit .