Digital Signal Processing Reference
In-Depth Information
Mono Audio
Source
Mixing audio
and tonal noise
Corrupted
Audio
dn
()
sn
()
Left Line In
LCI1
Left Line Out
LCO1
TI TMS320C6713
DSP Board 1
Right Line In
RCI1
Right Line Out
RCO1
xn
()
Tonal
Reference
Noise
sn
()
en
()
dn
()
Enhanced
Audio
Left Line In
LCI2
Left Line Out
TI TMS320C6713
DSP Board 2
Right Line In
RCI2
Right Line Out
xn
()
FIR adaptive filtering
FIGURE 10.24B
Tonal noise cancellation with the adaptive filter.
interrupt void c_int11()
{
float lc; /*left channel input */
float rc; /*right channel input */
float lcnew; /*left channel output */
float rcnew; /*right channel output */
int i;
//Left channel and right channel inputs
AIC23_data.combo ¼ input_sample();
lc ¼ (float) (AIC23_data.channel[LEFT]);
rc
(float) (AIC23_data.channel[RIGHT]);
// Insert DSP algorithm below
s[0]
¼
¼
lc;
x[0]
¼
rc;
x[0];
// End of the DSP algorithm
lcnew ¼ d[0]; /* Send to DAC */
rcnew ¼ rc; /* keep the original data */
AIC23_data.channel[LEFT] ¼ (short) lcnew;
AIC23_data.channel[RIGHT] ¼ (short) rcnew;
output_sample(AIC23_data.combo);
D[0]
¼
s[0]
þ
}
(b) Program segment for DSK 2 (LMS adaptive filter).
float x[20] ¼ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; /*Reference input buffer*/
float w[20] ¼ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; /*Adaptive filter
coefficients*/
float d[1] ¼ {0.0}; /* Corrupted signal*/
float y[1] ¼ {0,0}; /* Adaptive filter output */
 
Search WWH ::




Custom Search