|
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.
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:
|
AudCtrl_TS.JPG
Description: AudCtrl_TS.JPG
[Prev in Thread] | Current Thread | [Next in Thread] |