On 09/06/2014 08:53 AM, Pierre C wrote:
I'm implementing a USB Audio Class 2 device using a Cortex-M4 with high speed USB. So far it works well, the device is recognized by ALSA, playback, capture, sample rate change, and all controls like volume and mute work. I'm using explicit feedback.
I'd like to use implicit feedback instead,
Why?
and had some problems...
With implicit feedback, when playback starts, ALSA should start capture automatically (even if there are no applications requesting capture at the moment) to use the number of capture samples as feedback. But it doesn't.
So, I'd like to know :
- Is it actually supported ?
Yes.
- If it is, what descriptors should I use to make it work ?
The usage mask of bmAttributes of the endpoint should be USB_ENDPOINT_USAGE_IMPLICIT_FB, along with some other constraints. See set_sync_endpoint() in sound/usb/pcm.c
Note, however, that we only implemented implicit feedback mode in the driver because there are devices out there which use such modes. If you're doing the device-side yourself, I'd actually recommend going for explicit feedback, especially if that already works for you. Any particular reason why you want to change that?
Daniel