linrad 03.28

174 views
Skip to first unread message

w3sz

unread,
Dec 18, 2011, 4:42:45 PM12/18/11
to lin...@googlegroups.com
If you have problems setting up the sound cards, then choose sampling rate of 44100 for the input card and all will be OK.

On one of my Macs I needed to do this. On the other one, other sampling rates such as 96000 were fine!

73,

Roger Rehr
W3SZ

VK2KU

unread,
Dec 19, 2011, 12:56:11 AM12/19/11
to Linrad
A couple of days ago I decided it was time to upgrade from v3.21, and
v3.28 seemed to be the way to go.
At first things seemed ok, but after 2 days they are not ok.
My system: Intel Core 2 Duo (E3400) with 4GB RAM running WinXP(SP3).
Software running: Tac32 for GPS time, Linrad and MAP65-IQ - nothing
else, no internet..
Input to Linrad from SDR-IQ via USB port.

Number of threads to block - I chose 1, maybe 0 would be better.
I understand the words, but not their import.

Use Portaudio? I chose "No", not understanding what Portaudio had to
contribute to the USB input from my SDR-IQ.

I get repeated errors now:
Rx A/D Speed Error - (typically 97322 (nominal 95236).
Rx UNDERRUN ERROR - MIN starts at 0.512 and descends soon to zero,
even with Output Delay margin at 3000!
DA SYNC ERRORS

The behaviour does not seem to be consistent or reproducible, but the
only way I have found to eliminate these errors
is to DISABLE the output sound. This is not a direct problem to me,
since I am only using the Linrad displays
and MAP65-IQ for spotting EME signals, but it shouldn't be necessary!
Even then I am getting the "No RX Data" message in MAP65-IQ at around
36secs, and no meaningful waterfall.

v3.21 continues to run perfectly. Am I missing something? Advice
appreciated.

Guy VK2KU

Leif Asbrink

unread,
Dec 19, 2011, 1:19:50 PM12/19/11
to lin...@googlegroups.com
Hello Guy,

> At first things seemed ok, but after 2 days they are not ok.
> My system: Intel Core 2 Duo (E3400) with 4GB RAM running WinXP(SP3).
> Software running: Tac32 for GPS time, Linrad and MAP65-IQ - nothing
> else, no internet..
> Input to Linrad from SDR-IQ via USB port.

OK.



> Number of threads to block - I chose 1, maybe 0 would be better.
> I understand the words, but not their import.

The computation of an FFT may take much longer time than acceptable
for the input and output. The FFT routines therefore have a sleep(0)
statement that is executed regularly and that allows other threads
to do their tasks before the slow FFT computation is resumed. This
was essential on single core machines. The sleep and resume may
cause bad cache usage and should not be needed if there is more
than one cpu. The number to block is the number of threads that
will not have any sleep(0) statements.

If you are running several instances of Linrad and allow them all
to block threads you might have to select big I/O buffers
to not loose data. Yet it might be the only way to have many
instances simultaneously running on a machine with limited
performance but the penalty would be a large delay from antenna
loudspeaker.

I have had no feedback on observations of the influence of this
parameter. There is also a parameter for the timer interval
which by default is 20 ms. It can be set as low as 1 ms. One
can also set increased priority.

> Use Portaudio? I chose "No", not understanding what Portaudio had to
> contribute to the USB input from my SDR-IQ.

That choice is for the output. (after you pressed B) The Windows
sound system is sometimes badly written. Part of it is the device
driver for your sound hardware. If you select to use Portaudio
for the output you might find that you have a WDM-KS driver for
your soundcard. Such drivers are generally much faster.

> I get repeated errors now:
> Rx A/D Speed Error - (typically 97322 (nominal 95236).
> Rx UNDERRUN ERROR - MIN starts at 0.512 and descends soon to zero,
> even with Output Delay margin at 3000!
> DA SYNC ERRORS
>
> The behaviour does not seem to be consistent or reproducible, but the
> only way I have found to eliminate these errors
> is to DISABLE the output sound. This is not a direct problem to me,
> since I am only using the Linrad displays
> and MAP65-IQ for spotting EME signals, but it shouldn't be necessary!
> Even then I am getting the "No RX Data" message in MAP65-IQ at around
> 36secs, and no meaningful waterfall.
>
> v3.21 continues to run perfectly. Am I missing something? Advice
> appreciated.

There are two things to observe.

1) The output sampling rate.
Have a look at your parameters. Is the sampling rate for the output
different?

2) The DMA rate. You can see what rate you actually have by pressing T.
The U menu will allow limits for setting max and min. I have had no
feedback on this and the default has been changed a couple of times
with no comments from anyone. You may set MIN to 10 and MAX to 1000
to see what Linrad finds optimum. Yoy can then force higher or
lower by use of the parameters.

The problem you see is most probably caused by the output soundcard
driver. If you select to use Portaudio you would probably find that
there is only a single rate and that would be 48 kHz. As it happens
Portaudio is very bad for MME drivers and direct sound. If there is
not WDM-KS or ASIO (I do not think WASAPI is available under XP) you
should avoid Portaudio. The maximum DMA rate with Portaudio would
have to be set below 50 Hz. Probably 10 or 20 Hz.

If the hardware is 48 kHz only and you set Linrad to 48 kHz for the
soundcard output the output should work properly. A soundcard with
native support for a lower rate would be more efficient, but on
a modern computer I do not think anyone would notice.


73

Leif / SM5BSZ

VK2KU

unread,
Dec 19, 2011, 10:04:21 PM12/19/11
to Linrad
Thanks, Leif.
That all seems to work.
I tried Portaudio at 48k with WDM-KS (whatever that is).
I still got some D/A Sync errors but MAP65-IQ was working ok.
Setting DMA Rate Min to 10 and Max to 20 fixed that error, so all is
well.

I did notice that the A/D speed was reported as 95274 (instead of the
expected 95236),
and that D/A was reported as 45942 rather than 48000,
but I ignored that!
In any case I then disabled the Soundcard since I am not using the
audio output.

Thanks again,

Guy VK2KU

Leif Asbrink

unread,
Dec 20, 2011, 5:05:21 PM12/20/11
to lin...@googlegroups.com
Hi Guy,

> That all seems to work.
> I tried Portaudio at 48k with WDM-KS (whatever that is).

KS stands for kernel space......

> I still got some D/A Sync errors but MAP65-IQ was working ok.
> Setting DMA Rate Min to 10 and Max to 20 fixed that error, so all is
> well.

Something is seriously wrong. The output is not working. Please try
to set the latency factor to 8 for the output to see if that helps.
If it does, try some smaller value until you know what is needed
to get the sound to work right. 48kHz without sync errors.



> I did notice that the A/D speed was reported as 95274 (instead of the
> expected 95236),

This error might be because Linrad is not computing accurately enough.
The SDR-IQ buffers are 8192 bytes and span a fairly long time.....

> and that D/A was reported as 45942 rather than 48000,
> but I ignored that!
> In any case I then disabled the Soundcard since I am not using the
> audio output.

But you have observed a serious error and that error is unacceptable
for those who listen to the Linrad output or use it to feed WSJT.

Maybe there are settings in Windows that should be changed(?)

73

Leif

w3sz

unread,
Dec 20, 2011, 8:40:33 PM12/20/11
to lin...@googlegroups.com
Note for those planning to use Linrad on a Mac:

I have gotten Linrad to work with any [standard] sampling rate of up to 192kHz on both Macs here. Previously it was so working on the iMac but not on the Mac Pro.

On my iMac Linrad doesn't care what the input sampling rate is set to in the Mac OS [see below], and i can install input and output soundcards in Linrad with no problem without worrying about the Mac OS settings. I suspect that I have long ago installed some program that is running in the background and unbeknownst to me resampling when needed.

On my MacPro I need to set the input sampling rate in the Mac OS to what i subsequently set the sampling rate to in Linrad. So if I want to set the sampling rate for device A in Linrad to 96000, then I need to first set the input sampling rate for device A to that value [96000] in the Mac OS. Then all is well and I can install both input and output soundcards in Linrad with no problem.

The sampling rate for a Mac OS device is changed by going to Finder>>Applications>>Utilities>>AudioMidiSetup.app and going to the device in question and setting the sampling rate appropriately using the pull-down menu.

Again, on my iMac this is unnecessary. But it is necessary on the Mac Pro.

This is a peculiarity of the Macs, not of Linrad.

I haven't tried this on my wife's MacBook Air…and likely won't...

73,

Roger
W3SZ

Reply all
Reply to author
Forward
0 new messages