Skip to content

Audio control transfers misaligned on some platforms #3026

Closed
@sodank808

Description

@sodank808

Operating System

Others

Board

ESP32-S3

Firmware

Probably the most relevant example is uac2_headset.

What happened ?

After the 0.18.0 release, certain platforms such as iOS fail to record the microphone because the endpoint stalls. This was root caused to missing 4 byte alignment on the ctrl_buf_1 buffer in audio_device.c. It seems that this changed in #2865 but it is unclear why it was changed, probably a mistake.

How to reproduce ?

Record microphone in a USB audio class 2.0 example. The original replication was on iOS in voice memo. Unfortunately, alignment issues can be finicky and depend on the arrangement of memory performed by the linker.

Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)

Unfortunately, the device under test does not have logging piped out.

Screenshots

In the USB analyzer, I was able to clue in to the issue when the IN endpoint stopped sending data right after a control transfer

Image

I have checked existing issues, dicussion and documentation

  • I confirm I have checked existing issues, dicussion and documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions