Audio Source configuration


Can anyone point me to some “color” on how to work with the Audio
I am working examples to transmit FM Audio and have problems with
on the UHD:USRP Sink.

The examples (from and others) I am
running select Audio Source Arch:alsa and this seems to be a problem.

I have tried to replace the Device name with plughw:0,0 as suggested in
documetnation, but this does not seem to have an impact on the choice of
Audio arch: alsa

If I replace the audio source with a signal source at the same sample
all is well, but the Audio Source implements UUUUUUUUUUUU.

Using the suggestion of having the USRP expect a bit lower rate than the
audio can deliver seems to implement nearly limitless delay … the
is received but only after a very long … many seconds delay … …

At this time I am using a B210 connected via USB3 to an I7 with plenty
memory running Ubuntu 12.04 … I have similar issues trying to use an
E310 as the transmitter …

Any direction would be appreciated.


If you’re getting long strings of ‘U’, this means a gross sample-rate
mis-match somewhere in your flow-graph,
rather than the more-subtle “two clock” problem.

Make sure that everything agrees internal to the graph about
sample-rates, and, perhaps more importantly, that your audio hardware
is capable of delivering the desired rates.

On 2015-03-17 10:30, Larry Van Der J. via USRP-users wrote:

Using the suggestion of having the USRP expect a bit lower rate than the audio
can deliver seems to implement nearly limitless delay … the voice is received
but only after a very long … many seconds delay … … [1]

Hi Larry,

if I understand correctly, then you’re using the audio source as “input”
to your usrp_sink-terminated flow graph.
In that case, the "U"nderruns come from UHD, not the audio source; the
flow graph is not supplying samples fast enough.

The problem might be systematic, for example if the rate change in your
flow graph does not reflect the actual rate ratio between your audio
device and the USRP – e.g. the your audio device generates samples at
48kS/s, and your USRP consumes them with 5MS/s, but you have an
interpolation rate of 100 (leading to a rate at which samples arrive at
the USRP sink of 4.8MS/s; these are all just exemplary numbers).

Also possible, though, is that this is simply an extreme case of clock
mismatch: For example, assume the reference clock in your USRP is of by
2ppm, making the “sample consume rate” (1+2e-6) times higher than it
should be, according to an imaginary “exact” clock.
Now, assume your sound card is a bit “slower” than it should be, so let
these should-be 48kS/s be (1-500e-6) times that what it should be.
That means that for every a USRP sampling rate of let’s say 5MS/s, you’d
have around 2500 samples too little per second, which (there’s around
250 samples transportable per USB packet) is around 10 sample packets
less than the USRP consumes.


[1] I pulled up the first sound chip datasheet I could find (TI
PCM2903), and it demanded ±500 ppm.

Maybe watch your CPU utilization with htop when you’re recording with
terminal command to /dev/null, and compare it to gnuradio with a null

If you take out or disable the audio source, the underflows should go

On Tue, Mar 17, 2015 at 5:14 PM, Marcus Müller
[email protected]

Thanks for reaching out, all input is appreciated.

The file in use is from

The “gross” mismatch in sample rates comes about when you set the
resampler output rate to be exactly what the UHD:USRP Sink is expecting

in this case 250K.

The incidence of UUU’s is reduced when you introduce the fudge factor
suggested at 1.1 in that there is only a short string of approximately
U’s on startup, but the delay between speaking and transmitting grows
nearly instantaneous at the start of a test to countable numbers of
within a short period of time, presumably because there is a buffer
involved that is being drained more slowly than it is being filled …

The OK to Block setting in the Audio Block seems to have no influence
is as expected since it is noted in the text of the tutorial that ALSA
unaffected by this setting).

Least anyone think that delays on the order of a few seconds are not a
problem, I note that in applications intended to improve indoor
delays between the direct path of the outdoor signal and the enhanced
from the regenerative equipment are critical to operation and need to be
the order of 10s of microseconds for the equipment to function

Any thoughts on how to troubleshoot the Audio Source or determine
alternates to ALSA would be much appreciated.

Thanks again, 73



Thanks to everyone who has replied. It seems that audio processing has
some sort of timing issues.

When I experiment with the channelizers detailed in;

With the only change being setting the Mb0 clock source to default
than as in the demo in order to get the flowgraph to run on my E310 as
as my B210, The B210 is running on an Ubuntu 12.04 kernel
3.8.0-44-generic, the E310 is running 3.14.2-xilinx.

I find that the code runs with minimal aU and O on the B210 connected
USB3 to an I7 machine.

However, when I I try the exact same code Xed in to my E310 running the
Dizzy Demo image with updates to allow for QTGUI and QWT to operate,

There are very many string of approximately 30 Os interspered with
aUs and these overflow result in completely broken unusable audio.

I am now researching what levers may be available for audio system
and into the possibility of switching to Jack for audio …

As always any links or pointers are welcomed.


On Tue, Mar 17, 2015 at 10:30 AM, Larry Van Der J. [email protected]