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

[linrad] Re: PCM2900 sound chip in Linrad



Hi David,

>       The PCM2900 has a design defect so that one channel is a clock 
> tick later on the usb line to the computer.
> Sorry I didn't make it clear.  I have played with small corrections in 
> amplitude and phase.
>    Actually in Winrad, I did the 1 clock shift and the fine adjustments, 
> and never got the image at negative frequency to be less than 15 db 
> lower than the main signal.

Have you tried the Linrad calibration procedure? I think it should
take care of this problem - but it will not work at the 
higher frequencies. At the Nyquist frequency one clock tick is
180 degrees:-(

Linrad should work and give good balance for the central region, but
at half the Nyquist frequency the phase error will be 90 degrees
and then the phase relation will be 0 or 180 degrees for upper and lower
sideband respectively and I do not know whether the Linrad routine can
handle that. If you care to give it a try I would be interested to
know over how many percent of the passband you can get good image
suppression.

In Linrad you can add a few lines in the code to shift the samples
one position for one channel. For Linux, the read is in
lsetad.c, the function thread_rx_adinput(void) and you should
add something to shift samples in the buffer rxin_isho.
  if(ui.ad_device_no < 256)
    {
    read(rx_audio_in, rxin_isho, ad_read_bytes);
    }

In Windows, the read is in wsetad.c, the function 
winthread_rx_adinput(PVOID arg) and you should also here manipulate
rxin_isho
  if(ui.ad_device_no < 256)
    {
    memcpy(rxin_isho,c1,ad_read_bytes);


rxin_isho is a short int array (16 bits) and it contains
ad_read_bytes/2 16 bit words. If your soundcard giver 24 bits,
two words in rxin_isho are used for each sample.

Save the last sample in a local variable, then shift all samples of one
channel one position, fetch the last sample of the previous read
from a global variable and finally copy the new last sample into 
the global variable.


73

Leif / SM5BSZ

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

LINRADDARNIL