discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] [USRP-users] Audio Synchronization


From: Benny Alexandar
Subject: Re: [Discuss-gnuradio] [USRP-users] Audio Synchronization
Date: Tue, 21 Mar 2017 17:11:57 +0000

Hi Marcus,


Yes, we had long discussions and I had discussion
with Fons separately as well.

I tried to implement his paper
http://kokkinizita.linuxaudio.org/papers/adapt-resamp.pdf
on an embedded platform to quickly check the behavior as
well, were I can adjust the audio sample rate in hardware.
So, I don't need an adaptive re-sampler.

Because of the limitations in implementing the paper
as such, I had to modify it and Fons stopped supporting me!

Instead of controlling the average  number of samples
control the average time any particular sample
stays in the buffer.Please find the attached
figure modified to control the average time.

In the fig,
'W(k)' and 'R(k)'  are functions  which can take an arbitrary sample
number as their argument and returns the corresponding write and read time.

If a straight line is drawn horizontally the intersection points
corresponds to the Write and Read timings for the same number of samples. 

During callback the delay error is calculated as
 err = t_R - t_W + aDec_t - D
 
 where,
 t_R   = time at read side callback when it finished
         DMAing the k samples.
 t_W   = write time of buffer when it wrote k samples.
 aDec_t  =  average decoding time.
 D   = target delay.
 

If ‘err’ is positive we need to increase the read sample
rate. If it is negative we need to decrease it.

 

This approach is a very good optimization in terms of
computation. On the write side I have to apply
the DLL to smooth time and send only the
write timestamp as meta data to callback.
I don't need to compute the sample rate at
 write side and even number of samples written
 also. The interpolation of time at read side
 is just the previous buffer timestamp for the
 same number of samples written and read
assuming the buffering is only two buffers
between write and read.
 
Unlike other broadcast standards such as DVB-T where
the transmitter sends a reference TimeStamp counter
(CTS,PTS) as a global reference clock information to receiver,
in digital radio standards such as DAB there are
no reference timestamp from transmitter. Only by using
the local clock the receiver estimates a worst case delay.

Please review this proposal, I would like to implement
it for GNU radio as a GSoC project as well.
I'm planning this for broadcast receivers such as
DAB/DAB+ , DRM/DRM+ etc.

 -ben


From: Marcus Müller <address@hidden>
Sent: Monday, March 20, 2017 11:42:50 PM
To: Benny Alexandar; GNURadio Discussion List
Subject: Re: [USRP-users] Audio Synchronization
 

Hi Ben,


please keep discussions on the list.


I don't fully understand your question. You, Fons and I (as well as others) had a very very lengthy discussion on why this is hard and how to do that on the mailing list a while back.


Best regards,

Marcus


On 03/19/2017 07:13 AM, Benny Alexandar wrote:

Hi Marcus,


I'm using digital radio (DRM) receiver.


How to synchronize the audio in digital radio reception with transmitter audio clock to avoid buffer over flow and under run ?


Audio In-> DRM Tx --->......--->USRP----> gr-drm---> Audio out


-ben


From: USRP-users <address@hidden> on behalf of Marcus Müller via USRP-users <address@hidden>
Sent: Sunday, March 19, 2017 12:03:11 AM
To: address@hidden
Subject: Re: [USRP-users] Audio Synchronization
 

Hi Benny,


what kind of broadcast are you referring to? AM, FM (which are analog audio, so you'd not have any audio clock), DRM, DAB/DAB+?

maybe a really quick block diagram would help me understand the issue at hand.


Best regards,

Marcus


On 18.03.2017 14:03, Benny Alexandar via USRP-users wrote:

Hi,


I'm implementing the broadcast receiver using USRP & GNU Radio. For audio synchronization with transmitter clock, should I use the RF local clock base band arriving sample time or estimate the audio clock after audio decoding ?


How to do the synchronization with audio transmitter clock ?


-ben



_______________________________________________
USRP-users mailing list
address@hidden
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


Attachment: AudCtrl_TS.JPG
Description: AudCtrl_TS.JPG


reply via email to

[Prev in Thread] Current Thread [Next in Thread]