This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UDP recv() not working at 8KHZ- working perfectly fine at 16KHz, 32KHz, 96KHz

Other Parts Discussed in Thread: TMS320C6747

Hi Team,
I am sending 8kHz audio data from a PC to the EVM OMAP L137/C6747. When I try to receive one packet for every 10msec ( packetsize =80 words, each word of 16bit length. If I need to receive 8000 or 8Kilo words in 1 sec, then I need to receive 80 words (1 packet) in 10ms.), the recv() function in the DSP board(EVM OMAP L137/C6747) wouldnt receive! (To obtain 8KHz sampling rate, I changed the crystal near codec from 24MHz to 2.048MHz)
But the same code works perfectly fine (that is, it can receive 1 packet every 5 ms for 16KHz sampling rate - of course after changing the ACLKRCTL and ACLKXCTRL to 16KHz and also the codec's sampling rate to 16KHz (that is 48KHz divided by 3). I have also tried this out for 96KHz sampling rate-with the same program what I am using for 8KHz and 16KHz- it works fine there too.
I dont think there is any mistake in the rate at which i am receiving, because I used the same program to transmit udp packets at 8KHz and I am able to transmit at 8KHZ perfect. Only recv() at 8Khz is  a problem. Also I used the oscilloscope to see if the ping pong buffer alternates every 10ms(using GPIO pins) and it does.
Can you please do a quick test to see if UDP recv()works for C6747 at 8KHz(that is, it is capable of receiving 80 word packet size for every 10ms - using oscilloscope)? I am using ndk2.0.0.0 and bios: 6.32.2.30 and xdc tools: 3.22.1.21, xdais: 7.10.0.06, interprocessor communication: 1.23.2.27
When I use recv() at 4KHz, it is working but the moment I make to recv() data from the PC to DSP board via UDP for 8KHz, even the audio pass through is not working - not working in the sense, a tic tic noise heard in background and everything is echoed.

Been going around in days for this issue. Please let me know if EVM OMAP L137/C6747 will work for UDP recv() at 8KHz. I also made McASP as slave and codec as master- but still this doesnot help.

  • Hi team,

    I think the problem might be the sender (which sends packets to dsp) doesnt strictly send 1packet every 10 ms- so, the dsp keeps waiting till the packet arrives and thats why there are breaks in the voice received from the other device (PC) to DSP via UDP. If this is the case the audio pass thro (which gets input from line in of dsp and gives that out to headphone of the same dsp) doesnt work when I use 2 recv(), one recv() is used in the ping processing side and other recv() is used in the pong processing side because, the memcpy from linein to headphone out also has to wait till recv() has finished receiving packet from external device. that's why audio pass thro is also not working when I use 2 recv(). Any thoughts?

    Do you have any examples for using the apis for packet loss concealment? Please share them. Thanks.

  • Hi again,

    I am using tms320c6747 but it looks like the "packet loss concealment" feature is not supported for c6747. this is because c6747 uses AER and not VoLIB. Then how to solve the original issue, which is, using recv() twice (one for ping buffer processsing , another for pong buffer processing) doesnot work at 8KHz?

  • We’re closing out this old thread. If you feel there is more discussion on the topic, please feel free to "Reply".