UAC2: are UAC2 latency controls included in snd_pcm_status_get_delay?

Pavel Hofman pavel.hofman at ivitera.com
Thu Jan 6 08:59:55 CET 2022


Hi,

The UAC2 ch. "5.2.4.8 Latency Control" specifies latencies optionally 
reported by the device for individual entities. Especially the overall 
terminal latency TE_LATENCY_CONTROL is interesting.

Some video players include the delay reported by 
snd_pcm_status_get_delay into their AV sync calculation.

A linux USB audio gadget can perform some advanced DSP, which including 
the output device latency can result in a non-negligible overall 
latency. The gadget userspace software could configure the actual value 
to be reported by the gadget to the host in the selector UAC2_TE_LATENCY 
(audio_v2.h). The UAC2-specced max value of over 4 secs is more than 
sufficient for standard use cases.

But I could not find any read of the UAC2_TE_LATENCY control selector in 
the snd-usb-audio driver ( 
https://elixir.bootlin.com/linux/latest/C/ident/UAC2_TE_LATENCY ). 
Please does the driver include this value into the overall delay 
reported through alsa-lib? If not, would it make sense to add such support?

Thanks a lot,

Pavel.


More information about the Alsa-devel mailing list