Skip to content

Commit

Permalink
Add UAC2 fix patch for TinyUSB 0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
shermp committed Feb 22, 2025
1 parent 0bf7062 commit 949beac
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions patch/tinyusb-v0.18-patch.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/src/portable/raspberrypi/rp2040/dcd_rp2040.c b/src/portable/raspberrypi/rp2040/dcd_rp2040.c
index af08b549d..40c21aa71 100644
--- a/src/portable/raspberrypi/rp2040/dcd_rp2040.c
+++ b/src/portable/raspberrypi/rp2040/dcd_rp2040.c
@@ -496,6 +496,10 @@ bool dcd_edpt_iso_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet
bool dcd_edpt_iso_activate(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc) {
(void) rhport;
const uint8_t ep_addr = ep_desc->bEndpointAddress;
+ // init w/o allocate
+ const uint16_t mps = ep_desc->wMaxPacketSize;
+ uint16_t size = (uint16_t)tu_div_ceil(mps, 64) * 64u;
+ hw_endpoint_init(ep_addr, size, TUSB_XFER_ISOCHRONOUS);
// Fill in endpoint control register with buffer offset
struct hw_endpoint* ep = hw_endpoint_get_by_addr(ep_addr);
TU_ASSERT(ep->hw_data_buf != NULL); // must be inited and buffer allocated

0 comments on commit 949beac

Please sign in to comment.