Hi,
I am working on a noice cancellation project that would take input, speech samples along with noise, and after reducing the noise output clean(almost) speech samples.
For this i used the audioSample application provided with the DVSDK biospsp_01_30_01 for C6748. This application takes input from audio line-in and sends output to the audio line-out.
i am able to successfully take the samples from audio in and send them to audio out (i can listen the correct output using headphones).
Now, i want to clean the noise from a speech file (containing noise along with speech) using VEU component of VOLIB. For this, i integrated the VEU component in the audioSample application and provided the input from mcasp to the VEU component to be processed. However, Instead of being depleted it seems that noise has been amplified and at the same time speech is broken.
Could anybody pls guide me on this??? my configuration for the mcasp and aic3106 codec is as follows:
Mcasp_HwSetupData mcaspRcvSetup = {
/* .rmask = */ 0xFFFFFFFF, /* All the data bits are to be used */
/* .rfmt = */ 0x000080F0, /*
* 0 bit delay from framsync
* MSB first
* No extra bit padding
* Padding bit (ignore)
* slot Size is 32
* Reads from DMA port
* NO rotation
*/
/* .afsrctl = */ 0x00000000,
/* burst mode,
* Frame sync is one bit
* Rising edge is start of frame
* externally generated frame sync
*/
/* .rtdm = */ 0x00000001, /* slot 1 is active (DSP) */
/* .rintctl = */ 0x00000003, /* sync error and overrun error */
/* .rstat = */ 0x000001FF, /* reset any existing status bits */
/* .revtctl = */ 0x00000000, /* DMA request is enabled or disabled */
{
/* .aclkrctl = */ 0x00000000,
/* .ahclkxctl = */ 0x00000000,
/* .rclkchk = */ 0x00000000
}
} ;
Mcasp_HwSetupData mcaspXmtSetup = {
/* .xmask = */ 0xFFFFFFFF, /* All the data bits are to be used */
/* .xfmt = */0x000080F0,
/*
* 0 bit delay from framsync
* MSB first
* No extra bit padding
* Padding bit (ignore)
* slot Size is 32
* Reads from DMA port
* NO rotation
*/
/* .afsxctl = */ 0x00000000, /* burst mode,
* * Frame sync is one bit
* Rising edge is start of frame
* externally generated frame sync
*/
/* .xtdm = */ 0x00000001, /* slot 1 is active (DSP) */
/* .xintctl = */ 0x00000007,
/* sync error,overrun error,clK error */
/* .xstat = */ 0x000001FF, /* reset any existing status bits */
/* .xevtctl = */ 0x00000000, /* DMA request is enabled or disabled */
{
/* .aclkxctl = */ 0x00000000,
/* .ahclkxctl = */0x00000000,
/* .xclkchk = */ 0x00000000
},
};
/* McAsp channel parameters */
Mcasp_ChanParams mcasp_chanparam[Audio_NUM_CHANS]=
{
{
0x0001, /* number of serialisers */
{Mcasp_SerializerNum_12, }, /* serialiser index */
&mcaspRcvSetup,
TRUE,
Mcasp_OpMode_TDM, /* Mode (TDM/DIT) */
Mcasp_WordLength_32,
NULL,
0,
NULL,
NULL,
1, /* number of TDM channels */
Mcasp_BufferFormat_1SER_1SLOT,
TRUE,
TRUE
},
{
0x0001, /* number of serialisers */
{Mcasp_SerializerNum_11,},
&mcaspXmtSetup,
TRUE,
Mcasp_OpMode_TDM,
Mcasp_WordLength_32, /* word width */
NULL,
0,
NULL,
NULL,
1, /* number of TDM channels */
Mcasp_BufferFormat_1SER_1SLOT,
TRUE,
TRUE
}
};
Audio_ChannelConfig audioChanParamsIN =
{
/* channel 0 (RX) */
(Ptr)&mcasp_chanparam[0],
{ /* codec [0] */
{
8000, /* sampling rate for codec */
50, /* gain (%) for codec */
0x00,
0x00
}
}
};
Audio_ChannelConfig audioChanParamsOUT =
{
/* channel 1 (TX) */
(Ptr)&mcasp_chanparam[1],
{
/* codec [1] */
{
8000,
//44100, /* sampling rate */
70, /* gain (%) for codec */
0x00,
0x00
}
}
};
configuration of veuConfig that is passed to veuOpen is:
veuConfig.frame_size = frame_size;
veuConfig.config_bitfield = veu_CTLM_VEU;
veuConfig.anr_level = 12; /* set ANR max attenuation to 12dB */
veuConfig.alc_send_level = -15; /* set ALC target level to -15dBm0 in Send path*/
veuConfig.alc_recv_level = -15; /* set ALC target level to -15dBm0 in Recv path*/
veuConfig.bulk_delay = 162; /* set bulk delay to 162ms */
veuConfig.waepl = 36; /* set WAEPL to 36dB */
veuConfig.fgc_send_gain = 0; /* set FGC gain to 0dB in Send path */
veuConfig.fgc_recv_gain = 0; /* set FGC gain to 0dB in Recv path */
configuration of ctl passed to veuControl is :
ctl->ctl_code = veu_CTL_MODE;
ctl->u.mode_ctl.bit_masks = 0x121;
ctl->u.mode_ctl.bit_values = 0x121;
Thanks in advance..
Regards,
Pankaj Bamola