AnsweredAssumed Answered

what's Wrong?

Question asked by PeterYang on Nov 7, 2016
Latest reply on Nov 21, 2016 by Jithul_Janardhanan

I use sports receive and send  audio data by DMA ,i found 1 sample delay between left and right channel ,

 

my platform:

adsp-21375:

 

DMA config:

 

.var  _samples_fix[2] =0,0;

.var _outp_buf_fix[2] = 0, 0, 

 

.var TCB_Block_ADC0[4] = TCB_Block_ADC0+ 3, 2, -1, _samples_fix + 1- OFFSET;

 

.var TCB_Block_DAC0[4] = TCB_Block_DAC0+ 3, 2, -1, _outp_buf_fix + 1 - OFFSET;

 

r0 = OPMODE | SLEN24 | SPEN_A | SCHEN_A | SDEN_A;

dm(SPCTL1) = r0;

 

r0 = TCB_Block_ADC0+3 - OFFSET;
dm(CPSP1A) = r0;

 

 

r0=SPTRAN|OPMODE |SLEN24|SPEN_A|SCHEN_A|SDEN_A;

dm(SPCTL2) = r0;

 

r0 = TCB_Block_DAC0 - OFFSET + 3;
dm(CPSP2A) = r0;

 

 

 

sport_ISR:

 

r10=dm(_samples_fix+0);
r11=dm(_samples_fix+1);

r10=r10+r11;
dm(_outp_buf_fix+0)=r10;
dm(_outp_buf_fix+1)=r10;

 

if i use core mode ,there is no delay between left and right channel. so the hardware is no problem.

 

what's wrong with me? 

Outcomes