DSPRelated.com
Forums

Re: FW: Re: problem with speech quality for tms320c54cst & msm7716 codec

Started by Jeff Brower September 4, 2006
Ashok-

> Thanks for your prompt response and suggestion about problem. We have
> played sine wave to speaker thru codec and it is working fine.

Ok, if you can do that, then you have a good debug start point. Now try to output
square wave, then try simple .wav speech file (downloaded through CCS into DSP
memory).

Maybe you have an issue with sign-extension or left-justification. You say the sine
wave works -- what was the maximum value? How many bits can your codec support? One
problem I had once was the codec needed to see 14 bits left-justified, but I was
feeding it 16-bit values. For a sine-wave that didn't matter too much, but when I
played speech I could hear some "fuzz". When you try the .wav speech file, try using
a low amplitude level first, like +/-4000, then go up from there.

> Please refer attached file for McBSP0 initialization
> We spent lots of time to debug this problem but couldn't resolve
> it. I agree with you that if we debug more, we may resolve this
> problem but we already cross deadline to deliver this to customer.
> It would be a great help if you can provide consultancy service
> to resolve this problem. If you don't have bandwidth, I would
> appreciate any referral for same.

Well, you are learning about the art of debug -- and the value of online tech groups.
Definitely you don't need a consultant for this. What you have to do is start with
something simple that works, go step-by-step on a steady path from that point, and
continue posting your results and questions to online tech groups. You are fortunate
that basic sine wave output appears to be working -- although I would make dead
certain of that, for example try different frequencies, vary the amplitude, try a
square wave, etc.

-Jeff

> ------------
> From: Manish Varma [mailto:m...@yahoo.com]
> Sent: Tuesday, August 29, 2006 5:26 PM
> To: ashok hirpara
> Subject: Fwd: [c54x] Re: problem with speech quality for tms320c54cst & msm7716
> codec
>
> Jeff Brower wrote:
>
> To: Ahsok Hirpara
> CC: c...
> From: Jeff Brower
> Date: Tue, 29 Aug 2006 07:45:14 -0500
> Subject: [c54x] Re: problem with speech quality for tms320c54cst & msm7716 codec
>
> Hirpara-
> > We are using TI DSP TMS320C54CST and CODEC from OKI(MSM7716) to
> > build a simple pstn phone. We are having problem with audio quality
> > when call on pstn line and playing audio to speaker using codec. We
> > are using McBSP0 to communicate with CODEC and McBSP2 for DAA(line)
> > interface.
> >
> > We have tested loopback and audio quality is fine. What we did in
> > this test is sent audio packets received on line to line so
> > basically we can hear whatever we speak. So audio packets from line
> > are received fine and also send back fine. When same audio packets
> > send on speaker, it adds lots of noise so we can hear whatever we
> > say but with lots of noise. Same thing happen when we send audio
> > packets from mic to line.
>
> What happens if you download sine wave file to DSP memory, then run some code that
> plays the .wav data directly to codec? You should use an precise waveform so you
> know what to expect, and then look at what the codec outputs using a digital scope.
>
> With a sine wave, if the codec messes up, you can see it more clearly.
>
> My guess is McBSP0 is not initialized correctly for the OKI codec. Maybe polarity
> of
> clock, framesync pulse width (N-bit delay), other setting. Did you ask OKI for
> reference example for TI DSPs? Any McBSP code initialization they can give you
> would
> be helpful.
>
> > Please let me know if you can provide any consultancy help to help
> > me fix this problem. If you can, please send me your contact info.
>
> I don't think you need a consultant to fix this problem. You guys just have to
> debug
> more.
>
> -Jeff
>