usb-uac: Audio source device implementation with isochronous endpoints (device to host)#5600
usb-uac: Audio source device implementation with isochronous endpoints (device to host)#5600Humminghead wants to merge 5 commits intoembassy-rs:mainfrom
source device implementation with isochronous endpoints (device to host)#5600Conversation
These Terminal Types represent connections to internal audio sources or sinks in a device
The mini-disk audio source example was added for the STM32F1 family.
leftger
left a comment
There was a problem hiding this comment.
Can you try rebasing from the latest changes from main? I feel bad we got UAC host support before device support. I can try testing this out in a week or two if someone hasn't checked it out by then
|
@AlexCharlton might have insight into this. He did the host to device side in his PR |
There was a problem hiding this comment.
This looks like a pretty reasonable interface to me.
@leftger one correction: There is already preexisting device support for an "output" (from the perspective of the host), advertising itself as a speaker. This PR adds an additional "input" device. There's almost no end of complexity to what combination of functions a UAC device can support, though, but I'd say that it's fair that an all-encompassing interface is outside of the remit of this PR. This input device matches the features supported by the existing output device support, which seems good enough to me.
My one critique is that it seems unwarranted for create_control_function to return the an output terminal descriptor (the same critique actually applies for the speaker device too, in reverse). There is no way for a host to output audio to a device using this interface.
|
Thank you for the insight @AlexCharlton. I appreciate the clarification. On your critique do you recommend amending this PR to address the shortcoming or do you think it's better to fix it in a subsequent PR? |
|
Oh, you know what, I think I'm just confused. The output described is a "USB streaming" output, which doesn't count as a "true" output, and indeed is probably the right way to define the interface. It's been months since I've closely worked on UAC, so forgive the confusion. |
|
No problem. Anyways seems like a good PR. I'll look into testing this out in a week's time if no one else has looked into it. |
The AudioSource type implements a UAC1 (USB Audio Class 1.0) input terminal, allowing the device to stream audio to the host (e.g., microphone, line-in, or radio receiver). It provides a complete set of interfaces and endpoints for isochronous audio streaming with asynchronous feedback.
Key Features:
sample_rate_subscriber().Additionally, the 'uac_source' example for the STM32F1 MCU was added.