diff --git a/repos/libports/ports/libuvc.hash b/repos/libports/ports/libuvc.hash index a97c4da09a..040168b86d 100644 --- a/repos/libports/ports/libuvc.hash +++ b/repos/libports/ports/libuvc.hash @@ -1 +1 @@ -7a28e14a7037264f56d8a9a25e9c354054d6294d +71fd7ae692e1dadaaf191edc3de532efa6b2e1af diff --git a/repos/libports/ports/libuvc.port b/repos/libports/ports/libuvc.port index 7a6b21aa55..f39262633c 100644 --- a/repos/libports/ports/libuvc.port +++ b/repos/libports/ports/libuvc.port @@ -9,6 +9,9 @@ DIR(libuvc) := src/lib/libuvc DIRS := include/libuvc DIR_CONTENT(include/libuvc) := src/lib/libuvc/include/libuvc/libuvc.h +PATCHES := src/lib/libuvc/uvc150.patch +PATCH_OPT := -p1 -d src/lib/libuvc + default: include/libuvc/libuvc_config.h include/libuvc/libuvc_config.h: _dirs diff --git a/repos/libports/src/lib/libuvc/uvc150.patch b/repos/libports/src/lib/libuvc/uvc150.patch new file mode 100644 index 0000000000..1fbd398c2c --- /dev/null +++ b/repos/libports/src/lib/libuvc/uvc150.patch @@ -0,0 +1,53 @@ +--- a/src/device.c ++++ b/src/device.c +@@ -1089,6 +1089,8 @@ uvc_error_t uvc_parse_vc_header(uvc_device_t *dev, + info->ctrl_if.dwClockFrequency = DW_TO_INT(block + 7); + case 0x0110: + break; ++ case 0x0150: ++ break; + default: + UVC_EXIT(UVC_ERROR_NOT_SUPPORTED); + return UVC_ERROR_NOT_SUPPORTED; +--- a/src/stream.c ++++ b/src/stream.c +@@ -191,16 +191,18 @@ uvc_error_t uvc_query_stream_ctrl( + uvc_stream_ctrl_t *ctrl, + uint8_t probe, + enum uvc_req_code req) { +- uint8_t buf[34]; ++ uint8_t buf[48]; + size_t len; + uvc_error_t err; + + memset(buf, 0, sizeof(buf)); + +- if (devh->info->ctrl_if.bcdUVC >= 0x0110) ++ if (devh->info->ctrl_if.bcdUVC < 0x0110) ++ len = 26; ++ else if (devh->info->ctrl_if.bcdUVC < 0x0150) + len = 34; + else +- len = 26; ++ len = 48; + + /* prepare for a SET transfer */ + if (req == UVC_SET_CUR) { +@@ -216,7 +218,7 @@ uvc_error_t uvc_query_stream_ctrl( + INT_TO_DW(ctrl->dwMaxVideoFrameSize, buf + 18); + INT_TO_DW(ctrl->dwMaxPayloadTransferSize, buf + 22); + +- if (len == 34) { ++ if (len >= 34) { + INT_TO_DW ( ctrl->dwClockFrequency, buf + 26 ); + buf[30] = ctrl->bmFramingInfo; + buf[31] = ctrl->bPreferredVersion; +@@ -254,7 +256,7 @@ uvc_error_t uvc_query_stream_ctrl( + ctrl->dwMaxVideoFrameSize = DW_TO_INT(buf + 18); + ctrl->dwMaxPayloadTransferSize = DW_TO_INT(buf + 22); + +- if (len == 34) { ++ if (len >= 34) { + ctrl->dwClockFrequency = DW_TO_INT ( buf + 26 ); + ctrl->bmFramingInfo = buf[30]; + ctrl->bPreferredVersion = buf[31];