discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] how to implement auto-correction of sample rate i


From: Artem Pisarenko
Subject: Re: [Discuss-gnuradio] how to implement auto-correction of sample rate in flow graph ?
Date: Tue, 14 Jan 2014 00:35:15 -0800 (PST)

I've completed my contribution. It modifies several GNU Radio in-tree
packages.

Expectations:
As described here:
http://gnuradio.4.n7.nabble.com/how-to-implement-auto-correction-of-sample-rate-in-flow-graph-tp45268p45337.html
with difference about correction method (see result).
- sources and sinks interface enchancement, they provide output of their
current buffer measurements (consists of relative buffer filling and maybe
some other metadata) via asynchronous message port "sync_out".
- addition of special resampler block, it accepts messages at its "sync_in"
port and performs auto-correction of resampler ratio. Block configuration is
well-defined, operation is indpendent of graph structure, hardware, data
stream dynamic and jitter, etc.

Result:
Due to lack of my knowledge in some areas and disappointing gnu radio
limitations, I wasn't able to make it properly and resulted in limited
implementation. Also I've used fractional resampler block as base for
design, so correction performed properly (instead of "blind" adding/deleting
samples, as supposed to be initially). Implementation has bad performance
characteristics and obscure configuration (some parameters are determined
experimentally), but it works.
I modified audio sink block from gr-audio (only alsa implementation) as
example of hardware block implementing required interface.

See attached GRC graph as an example of usage. It implements audio loopback
and therefore doesn't introduce real sample rate skew, it just shows how it
works.

No critics about design accepted. (I asked for help beforehand, nobody
advised.)

Patch for GNU Radio tree
<http://gnuradio.4.n7.nabble.com/file/n45723/gnuradio_feature__auto_correction_of_sample_rate.patch>
  
Example graph
<http://gnuradio.4.n7.nabble.com/file/n45723/test_auto_sample_rate.grc>  



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/how-to-implement-auto-correction-of-sample-rate-in-flow-graph-tp45268p45723.html
Sent from the GnuRadio mailing list archive at Nabble.com.



reply via email to

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