I'm thinking way ahead about a possible future project which will contain, among many other things, a "DIY hearing aid" of sorts. Microphones feeding earbuds with some DSP in between, all in a physically small space. Not because I'm hard of hearing, but to account for an acoustic lowpass caused by a different part of the project.
I have some experience using digital live audio systems that claim about 1ms latency from the ADC's, all the way through the (quite involved) DSP, to the DAC's. In other words, a stereo recorder hooked up to a Y-splitter at the ADC input for one recording channel, and the DAC output for the other recording channel, would measure about 1ms offset between them. (see the test circuit below)
That's fine for a concert, where you can easily have more physical offset than that (~1 foot) between the mics and speakers, but for my project, I'm looking at several inches at most.
So, to get a feel for what I'm stuck with, and how much I need to optimize and overpower my DSP code to fit in the time remaining (small buffers, even down to a single sample just to get it out NOW!, which means I can't use SIMD instructions - increased sample rate, not for "audiophool" quality but just to shorten the turn-around time - etc.), what latency can I expect for a typical audio CODEC chip in this test circuit?:
I expect a minimum of 2 samples, just because of how I2S works - latch and shift out from the ADC, then shift into the DAC and latch again - but I imagine that the conversions themselves aren't instantaneous either.
I've looked at a few datasheets and, at least for the cheap ones, I can't find a parameter that tells me the overall latency. For their intended application of PC audio, I can understand that it's not important, but for this project, it kinda is.
What parameter(s) should I be looking for in a good datasheet? And are there any rules of thumb / tribal knowledge that would be useful as well, in terms of realtime DSP where the output might combine with the original input, after a small speed-of-the-wave delay of the original input? (1's of samples at 48kHz)
Of course, all of this might not even matter, depending on the acoustic lowpass that I end up with, for which this DSP needs to be a complimentary highpass with transducer-correction and peak-limiting. I have no idea what that acoustic lowpass is going to be, so I'm looking for enough general information that I can evaluate it when the time comes.
(If the crossover frequency ends up being low enough and steep enough (overall latency is a small fraction of a single wave), this may all be a moot point; I'm not going to hear the original anyway, where it matters, so just throw some pre-fab code at it and call it good. Or the crossover might be high or gradual enough that it does matter...)
Anyway, I'm looking for enough general information that I can evaluate it when the time comes. Thanks!