Discussion:
Sound card sample delay
Alberto E. Zagni
2007-10-20 15:47:06 UTC
Permalink
Hi all,
I am new to the world of Linrad, so my request can be obvious for
many...sorry.
I am using a notebook with Audigy2 ZS PCMCIA audio card running at 96000
sample 16 bit and an SDR-X I/Q receiver.
With other software (Winrad, Rocky) I must enable 1 sample delay on the
right channel to get proper image cancellation.
If I don't delay the right channel it's impossible to get more than 15 / 20
dB of cancellation, while with delay ON I can get easily 70 dB on any
specific frequency and about 50 dB on the 90k band.
I know this problem is typical of most low cost audio card and laptop
internal card, while is absent on the Delta 44.
I see no way of enabling this delay in Linrad (I am using it currently under
Windows). Any help / advice?

Best regards
Alberto I2KBD


#############################################################
This message is sent to you because you are subscribed to
the mailing list <linrad-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>.
To unsubscribe, E-mail to: <linrad-off-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
To switch to the DIGEST mode, E-mail to <linrad-digest-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
To switch to the INDEX mode, E-mail to <linrad-index-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
Send administrative queries to <linrad-request-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
Leif Asbrink
2007-10-20 19:46:46 UTC
Permalink
Hi Alberto,
Post by Alberto E. Zagni
I am using a notebook with Audigy2 ZS PCMCIA audio card running at 96000
sample 16 bit and an SDR-X I/Q receiver.
With other software (Winrad, Rocky) I must enable 1 sample delay on the
right channel to get proper image cancellation.
If I don't delay the right channel it's impossible to get more than 15 / 20
dB of cancellation, while with delay ON I can get easily 70 dB on any
specific frequency and about 50 dB on the 90k band.
I know this problem is typical of most low cost audio card and laptop
internal card, while is absent on the Delta 44.
I see no way of enabling this delay in Linrad (I am using it currently under
Windows). Any help / advice?
I do not have any such soundcard so I have no experience
with this behaviour.

In Linrad the image balancing is done in the frequency
domain in order to allow steep anti-alias filters that
are not well balanced between the channels. To invoke
the balancing you have to run the calibration procedure
"Calibrate I/Q phase and amplitude". This could give
you about 70 dB rejection over the entire 90 k band -
but I am not quite sure because a one sample delay
is a really big phase error near the Nyquist frequency....

Please report to the list whether the Linrad calibration
will give a satisfactory image suppression on your
system.

You say you "know this problem is typical of most low cost
audio card and laptop internal card". This seems odd to me,
it looks like a simple bug in the drive routine. It would
be interesting to know whether the problem exists under Linux
or whether this is a bug present under Windows only.

Is there anyone on this list who knows?

The correct data from e.g. Delta44 would be like this.
Left[n], Right[n],Left[n+1],Right[n+1],Left[n+2],Right[n+2]

Is this how the data your soundcard gives is arranged?
Left[n], Right[n+1],Left[n+1],Right[n+2],Left[n+2],Right[n+3]

If that is correct, one would just have to throw away one
sample to get the correct data (but with the channels in
reversed order)

Maybe updating the drive routine would help?

73

Leif



#############################################################
This message is sent to you because you are subscribed to
the mailing list <linrad-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>.
To unsubscribe, E-mail to: <linrad-off-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
To switch to the DIGEST mode, E-mail to <linrad-digest-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
To switch to the INDEX mode, E-mail to <linrad-index-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
Send administrative queries to <linrad-request-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
John Harrison, NI1B
2007-10-21 09:25:11 UTC
Permalink
Hi All,

Regards sound cards and sample switching.

I NEVER had this problem on my original Linrad machine, an old Pentium
100 using an ISA sound card.

However, with newer sound cards basically cheap PCI ones, occasionally
Linrad/Knoppix/sound driver would under certain circumstances skip sound
samples. So the whole FFT image would mirror image. A little while later
it would reverse again. It was never stable enough to allow calibrating.
So, I probably wouldn't have noticed the lack of cancellation effect you
speak of.

That and the total absence of ANY anti-aliasing filters on these
cheaper sound cards made for some very confusing and noise filled Linrad
displays!!

Even given all this, you could still use linrad to listen to signals
once you found one, at least until they 'flipped' to the other side :)

Lots of fun,
john
Post by Leif Asbrink
Hi Alberto,
Post by Alberto E. Zagni
I am using a notebook with Audigy2 ZS PCMCIA audio card running at 96000
sample 16 bit and an SDR-X I/Q receiver.
With other software (Winrad, Rocky) I must enable 1 sample delay on the
right channel to get proper image cancellation.
If I don't delay the right channel it's impossible to get more than 15 / 20
dB of cancellation, while with delay ON I can get easily 70 dB on any
specific frequency and about 50 dB on the 90k band.
I know this problem is typical of most low cost audio card and laptop
internal card, while is absent on the Delta 44.
I see no way of enabling this delay in Linrad (I am using it currently under
Windows). Any help / advice?
I do not have any such soundcard so I have no experience
with this behaviour.
In Linrad the image balancing is done in the frequency
domain in order to allow steep anti-alias filters that
are not well balanced between the channels. To invoke
the balancing you have to run the calibration procedure
"Calibrate I/Q phase and amplitude". This could give
you about 70 dB rejection over the entire 90 k band -
but I am not quite sure because a one sample delay
is a really big phase error near the Nyquist frequency....
Please report to the list whether the Linrad calibration
will give a satisfactory image suppression on your
system.
You say you "know this problem is typical of most low cost
audio card and laptop internal card". This seems odd to me,
it looks like a simple bug in the drive routine. It would
be interesting to know whether the problem exists under Linux
or whether this is a bug present under Windows only.
Is there anyone on this list who knows?
The correct data from e.g. Delta44 would be like this.
Left[n], Right[n],Left[n+1],Right[n+1],Left[n+2],Right[n+2]
Is this how the data your soundcard gives is arranged?
Left[n], Right[n+1],Left[n+1],Right[n+2],Left[n+2],Right[n+3]
If that is correct, one would just have to throw away one
sample to get the correct data (but with the channels in
reversed order)
Maybe updating the drive routine would help?
73
Leif
#############################################################
This message is sent to you because you are subscribed to
#############################################################
This message is sent to you because you are subscribed to
the mailing list <linrad-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>.
To unsubscribe, E-mail to: <linrad-off-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
To switch to the DIGEST mode, E-mail to <linrad-digest-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
To switch to the INDEX mode, E-mail to <linrad-index-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
Send administrative queries to <linrad-request-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
Alberto di Bene
2007-10-21 13:03:00 UTC
Permalink
Post by John Harrison, NI1B
However, with newer sound cards basically cheap PCI ones, occasionally
Linrad/Knoppix/sound driver would under certain circumstances skip sound
samples. So the whole FFT image would mirror image. A little while later
it would reverse again. It was never stable enough to allow calibrating.
So, I probably wouldn't have noticed the lack of cancellation effect you
speak of.
Hi all,

what you have experienced John is still another variation on the theme. There are some sound cards, mainly from
Creative, but also from other brands, that *do* delay one channel by one sample constantly with respect to the other.
Many hypothesis have been done about the why. Maybe they have a cheap ADC with just one channel which is multiplexed
between the left and the right audio channels... just a guess... or some drivers have a common base code with that error
in it... who knows...

Anyway if you are unlucky enough to have one of those cards, you must compensate in software for that delay. It is not
difficult, a few instructions and an extra position in the input buffer. Only after this compensation the normal image
rejection routine can be applied.

73 Alberto I2PHD
P.S. In the beginning Winrad did not have this compensation. But when the number of emails asking for it surpassed a
given threshold, well, I was somehow forced to implement it....:-)


#############################################################
This message is sent to you because you are subscribed to
the mailing list <linrad-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>.
To unsubscribe, E-mail to: <linrad-off-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
To switch to the DIGEST mode, E-mail to <linrad-digest-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
To switch to the INDEX mode, E-mail to <linrad-index-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
Send administrative queries to <linrad-request-gxPnyqAYbxlppp2RfTnSCVfCHZ+Y+***@public.gmane.org>
Loading...