Hi all,

I'm trying to get my head around how the UAC2 gadget stuff is supposed to work 
in relation to sample rate conversion etc. etc. From the docs 
(https://www.kernel.org/doc/htmldocs/gadget/structure.html), I surmise that:

1. USB controller driver
2. Gadget Driver
3. Upper Level (u_audio.c) connecting into ALSA subsystem

What I'm not clear about is who is responsible for clocking ? For a more HW 
based gadget, an externally clocked DAC connected via I2S would pull data from 
a buffer, and the OUT endpoint would supply data into that endpoint and 
synchronize the host sending the data via the feedback IN endpoint.

To play audio with the above structure would mean piping data from the UAC2 
Gadget Capture device to the target ALSA output device, which in my case is an 
externally clocked DAC. The problem then arises that the "clock" of the UAC2 
gadget and the output DAC are unrelated and there is no way to feedback the 
clocking to the UAC2 gadget via the ALSA interface (for the feedback endpoint). 
This can of course be handled by sample rate conversion, but it is suboptimal.

A better approach would be IMO to create something like:

1. USB controller driver
2. Gadget driver
3. Upper Level connecting as a JACK client.

In this scenario, JACK would already be setup to use the externally clocked 
DAC. By implementing a JACK client connecting to the gadget driver there would 
now be a direct way to supply the feedback endpoint with the data it needs.

Please let me know if I'm missing something.

All the best,
/Robert

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to