audio/video: check usbd_edpt_iso_alloc() result
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 67/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- embedded-iot
Research direction
Read the ISO allocation calls in audio_device.c at lines 937, 943, and 949 and video_device.c at line 1405, then check how their open() paths report failures. Ensure allocation failure makes open() fail so SET_CONFIGURATION is rejected. Done when an ESP32-S3 HIL test with ISO IN endpoint 0x85 confirms configuration fails instead of leaving a silent stream.
Written by the indexing model from the issue text.
Description
Follow-up from #4280.
audio_device.c:937,943,949 and video_device.c:1405 call usbd_edpt_iso_alloc() and drop its result. When the DCD rejects the allocation (e.g. #4280's dwc2 check for an IN endpoint past the implemented TX FIFOs, or a FIFO/packet-memory shortfall), the driver still opens the interface and later activates a dead endpoint, so the host sees a configured device that never streams.
Remaining work:
TU_ASSERT()the result in both drivers soopen()fails and SET_CONFIGURATION is rejected.- HIL: an audio or video config with an ISO IN endpoint
0x85on ESP32-S3 should fail SET_CONFIGURATION instead of enumerating silent.
Deferred because it changes class drivers outside #4280's DCD scope.
- Dominant language
- C
- Stars
- 7.2k
- Forks
- 1.6k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 96
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hathach/tinyusb
-
followup Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
test_audio_host: out-of-bounds read in test_audio_host_uses_exponential_full_speed_iso_intervalOpenfollowup Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
followup Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
followup Prio 📌
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
followup Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
polhenarejos/pico-fido#302 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
espressif/esp-vision#16 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
libsdl-org/SDL#16577 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
halt_error adds a trailing newline for non-string input, contrary to the manualPossibly taken @Huang-404-Q claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days