Hi experts out there,

I am currently writing a lower filter for USB audio. I need to find out the
delay time of the audio data transfering between the ADC (i.e. connected to
mic) and lower filter. Is there any way to find out that??

Many thanks in advance.

aze2cool

RE: Question on delay/latency in USB driver again! by aze2cool

aze2cool
Wed Mar 15 03:00:27 CST 2006

It seems that it is impossible to do that. Or am I asking at wrong place?


"aze2cool" wrote:

> Hi experts out there,
>
> I am currently writing a lower filter for USB audio. I need to find out the
> delay time of the audio data transfering between the ADC (i.e. connected to
> mic) and lower filter. Is there any way to find out that??
>
> Many thanks in advance.
>
> aze2cool

Re: Question on delay/latency in USB driver again! by Tim

Tim
Thu Mar 16 22:52:31 CST 2006

"aze2cool" wrote:
>
>> Hi experts out there,
>>
>> I am currently writing a lower filter for USB audio. I need to find out the
>> delay time of the audio data transfering between the ADC (i.e. connected to
>> mic) and lower filter. Is there any way to find out that??


aze2cool <aze2cool@discussions.microsoft.com> wrote:
>
>It seems that it is impossible to do that. Or am I asking at wrong place?

How would you measure that delay? I suppose you could have your filter
route the data to an I/O port, and then use a dual-trace oscilloscope to
measure the delay between the two signals, but I'm not sure the result
would do you any good. Your lower filter isn't the end of the line;
there's even more latency to come in the stack.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Re: Question on delay/latency in USB driver again! by aze2cool

aze2cool
Fri Mar 24 02:40:04 CST 2006

Many many thanks for your reply, Tim.

Since this delay is not constant and depending on the OS loading. I need to
find out this delay at the lower filter during run time. Is it possible to do
that?

Thank in advance.

aze2cool


"Tim Roberts" wrote:

> "aze2cool" wrote:
> >
> >> Hi experts out there,
> >>
> >> I am currently writing a lower filter for USB audio. I need to find out the
> >> delay time of the audio data transfering between the ADC (i.e. connected to
> >> mic) and lower filter. Is there any way to find out that??
>
>
> aze2cool <aze2cool@discussions.microsoft.com> wrote:
> >
> >It seems that it is impossible to do that. Or am I asking at wrong place?
>
> How would you measure that delay? I suppose you could have your filter
> route the data to an I/O port, and then use a dual-trace oscilloscope to
> measure the delay between the two signals, but I'm not sure the result
> would do you any good. Your lower filter isn't the end of the line;
> there's even more latency to come in the stack.
> --
> - Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.
>

Re: Question on delay/latency in USB driver again! by Tim

Tim
Fri Mar 24 22:17:11 CST 2006

aze2cool <aze2cool@discussions.microsoft.com> wrote:
>
>Many many thanks for your reply, Tim.
>
>Since this delay is not constant and depending on the OS loading. I need to
>find out this delay at the lower filter during run time. Is it possible to do
>that?

No. It's impossible. Think about it. You know when the data reaches you,
but how can you possibly know when the signal arrived at the input jack?

Actually, except in extraordinary circumstances, the delay will not vary
with OS load. Your completion handler is called from an ISR. Unless there
is a driver keeping interrupts disabled for long periods, the delay should
be relatively constant.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Re: Question on delay/latency in USB driver again! by aze2cool

aze2cool
Sun Mar 26 16:49:53 CST 2006

Many thanks again for your reply, Tim.

In the case of no way to find the delay, is there any way to reduce this
delay, says 5ms ~ 1ms(my algorithm can tolerance this amount of delay)? I
know there is a driver called ASIO can acheive that but I have no idea how
they do it. Also, someone out there asked me to try kernel streaming. Again,
I have no idea how to start with it. :-( could you please provide me some
pointers?

Many thanks in advance.

Best Regards,
aze2cool


"Tim Roberts" wrote:

> aze2cool <aze2cool@discussions.microsoft.com> wrote:
> >
> >Many many thanks for your reply, Tim.
> >
> >Since this delay is not constant and depending on the OS loading. I need to
> >find out this delay at the lower filter during run time. Is it possible to do
> >that?
>
> No. It's impossible. Think about it. You know when the data reaches you,
> but how can you possibly know when the signal arrived at the input jack?
>
> Actually, except in extraordinary circumstances, the delay will not vary
> with OS load. Your completion handler is called from an ISR. Unless there
> is a driver keeping interrupts disabled for long periods, the delay should
> be relatively constant.
> --
> - Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.
>

Re: Question on delay/latency in USB driver again! by Tim

Tim
Mon Mar 27 00:54:20 CST 2006

aze2cool <aze2cool@discussions.microsoft.com> wrote:
>
>In the case of no way to find the delay, is there any way to reduce this
>delay, says 5ms ~ 1ms(my algorithm can tolerance this amount of delay)? I
>know there is a driver called ASIO can acheive that but I have no idea how
>they do it. Also, someone out there asked me to try kernel streaming. Again,
>I have no idea how to start with it. :-( could you please provide me some
>pointers?

USBAUDIO.SYS *IS* a kernel streaming driver. I'm not sure what you hope to
accomplish with a lower filter, but adding filters to a driver stack is
only going to INCREASE the overhead.

If you really need deterministic real-time interrupt response, then you
need to use an operating system other than Windows.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.