| Age | Commit message (Collapse) | Author |
|
|
|
feat(audio): add USB Audio Host (UAC 1.0/2.0) support
|
|
device/dfu: fix transfer buffer overwrite issue
|
|
device/cdc: avoid flushing tx buffer on connection
|
|
Signed-off-by: HiFiPHile <[email protected]>
|
|
Signed-off-by: HiFiPHile <[email protected]>
|
|
Signed-off-by: HiFiPHile <[email protected]>
|
|
Signed-off-by: HiFiPHile <[email protected]>
|
|
Signed-off-by: HiFiPHile <[email protected]>
|
|
Report asynchronous start and stop completion with transfer results. Replace the ambiguous stream error callback and byte count with explicit transfer-failure events, and ignore stale completions after stopping.
|
|
Describe configuration limits by their actual storage scope, document asynchronous stream startup and shutdown, clarify that FIFO APIs are always non-blocking, and correct playback callback ordering.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Remove the narrow public Feature Unit request API while retaining managed mute and volume helpers. Expose validated Audio Control descriptors during enumeration and provide raw asynchronous and synchronous entity requests for advanced controls.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Group comments with the structures and helpers they describe, remove review-specific wording, and explain feedback-rate staging and control-buffer lifetimes in terms of runtime behavior.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Use UAC1 synchronization attributes and UAC2 endpoint usage fields according to the active protocol. This prevents UAC2 audio-data IN endpoints from being mistaken for explicit feedback endpoints.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Accept the defined silence value and round ordinary volume requests to the nearest supported resolution step within the cached range. Add tests for silence, clamping, and step alignment.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Validate descriptor lengths before typed access, keep supported alternate settings when neighboring formats are unsupported, and reject MIDI 1.0 and 2.0 streaming interfaces from the Audio host parser. Extend parser coverage for malformed and mixed descriptor layouts.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Enforce a shared capture/playback sample rate only while the opposite stream is running. This lets both stopped streams be configured in either order while preventing a live shared clock from changing underneath a transfer.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Move control-transfer bookkeeping out of USB memory and overlay mount-only Clock RANGE storage with cache-aligned runtime control payload buffers. Keep explicit feedback separate because it may overlap runtime requests.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Keep the fractional packet accumulator when a new explicit-feedback value is latched. Repeated feedback updates no longer bias high-speed fractional rates toward alternating undersized and oversized packets.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Add protocol-selectable UAC1/UAC2 parsing, UAC2 terminal and Feature Unit topology, Clock Source discovery, sampling-frequency ranges, and protocol-specific stream controls. Cover UAC2 playback, capture, control discovery, and malformed descriptors with unit tests.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Retain every valid discrete rate in descriptor order, including duplicate public tuples. Alternate settings remain independently selectable without disruptive validation or deduplication during enumeration.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Store each Audio Streaming alternate setting once and flatten its sample rates only at the public API boundary. Keep feedback and pacing state playback-only, eliminating duplicate configuration fields from capture streams.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Signed-off-by: HiFiPHile <[email protected]>
|
|
Signed-off-by: HiFiPHile <[email protected]>
|
|
|
|
Inspect each associated Feature Unit during mount, cache master mute support and the common MIN, MAX, and RES volume range, and ignore units with neither control. Add typed asynchronous and synchronous mute and volume APIs and demonstrate them in the host example.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Check descriptor bounds, minimum lengths, frequency counts, and interface types with the host validation helpers before accessing fields. Malformed UAC1 functions now fail enumeration without out-of-bounds reads.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Keep the sampling-frequency control flag in the alternate-setting parser state shared by its single data endpoint. This supports either descriptor order without separate pending and unassigned endpoint flags.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Treat isochronous bInterval as a power-of-two exponent for both full and high speed, using the appropriate frame unit. Packet sizing and fractional scheduling now use the actual service interval.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Retain an audio function when at least one direction has a supported configuration, but release the tentative instance when neither direction does. Unsupported and MIDI-only functions no longer consume host slots or emit mount callbacks.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Keep one unresolved Feature Unit candidate per stream direction while parsing AudioControl entities. Duplex functions are now associated correctly even when both Feature Units precede their USB terminals.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Require the UAC1 AudioControl protocol before allocating an instance. The current parser assumes UAC1 descriptor layouts, so accepting UAC2 would misinterpret entities and consume a host slot.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Route asynchronous activation and sampling-frequency failures through the stream error callback. Keep a running stream active when SET_INTERFACE alt 0 cannot be submitted so stop can be retried without diverging from device state.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Collect one audio data endpoint for each alternate setting and ignore explicit feedback endpoints until feedback scheduling is implemented. Validate the maximum packet for every discrete rate against the endpoint, transfer buffer, and FIFO.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Parse the contiguous AudioStreaming interfaces by class and subclass instead of copying baInterfaceNr. This removes the UAC1-only collection limit and prevents MIDI AudioControl interfaces from leaving a half-allocated Audio Host instance.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Make configuration a synchronous local operation that selects and opens the endpoint. Start now activates the alternate setting and sets the sampling frequency afterward, including every restart, so devices cannot reset the selected rate with SET_INTERFACE.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Keep capture and playback transfers continuously armed from their completion callbacks. Capture overwrites the oldest complete frames when full, while playback sends silence on underrun without consuming partial queued audio.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Bring the audio work onto the current host core and build files before applying the remaining review fixes.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Record terminal and Feature Unit links while parsing the AudioControl block, then resolve the stream association after all entities are known. Common capture and playback descriptor orders are both supported.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Collect only format descriptors with discrete sampling frequencies. The configuration API exposes concrete tuples and cannot safely represent a continuous range as one selectable rate.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Convert full-speed bInterval values to the scheduler microframe timebase and size transfers for the complete service interval. Endpoints with bInterval greater than one no longer run at a one-frame cadence.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Associate one directly connected Feature Unit with each capture and playback stream. This lets applications control microphone and speaker paths independently.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Reset Feature Unit state when parsing a new audio function. Devices without a matching unit must not inherit an ID collected from an earlier interface or device.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Keep Feature Unit request data in driver-owned storage until asynchronous completion and use the width defined for each control. This avoids overlapping request state and malformed one-byte controls.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Clear the started state only after SET_INTERFACE alt 0 succeeds. A failed control transfer can then be retried instead of leaving software and device state inconsistent.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Close the previously selected HCD endpoint before opening another alternate setting. This prevents stale endpoint size and controller state from surviving a format change.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Apply the host memory section and alignment attributes to audio transfer storage. This keeps buffers accessible to controllers that require DMA-capable memory.
Signed-off-by: HiFiPHile <[email protected]>
|
|
Associate UAC1 AudioStreaming endpoints by their usage type. Keep data and implicit-feedback IN endpoints as streams while leaving explicit feedback endpoints unopened until feedback scheduling is supported.
Signed-off-by: HiFiPHile <[email protected]>
|
|
vendor_host.c/.h implemented a CFG_TUH_VENDOR class driver that no example, board
or test ever enabled: usbh's driver table entry was compiled out everywhere, and
the six tusb_config.h files that mentioned the macro all set it to 0. Maintainer
call - dead code, not a shrinking of supported classes.
Removes the sources, the usbh driver-table entry, the CFG_TUH_VENDOR default in
tusb_option.h, the tusb.h include, both build-system source lists, the rp2040
family.cmake entry and the IAR project template rows.
|
|
|