BF548 Audio signal processing (AD1980 Callback)

Hi,

I'm currently trying to extract audio input data, perform some signal processing, and output something at the end. (Much like the talkthrough on the 533 boards).

I have been using the audio loopback project to attempt this, and for starters, I've tried something very simple: Set all left audio out to zero. (Just to make sure I am actually able to manipulate the data somehow).

In regards to the code, this is what I've done:

            /* copy the source (ADC) data to DAC channels */
            for (i = 0;i < (BUFFER_SIZE_PER_CHANNEL * NUM_ADC_CHANNELS); i++)
            {
                /* copy ADC left channel data to PCM out Left */
                *(pDest+(NUM_DAC_CHANNELS*i))    = 0;
                /* copy ADC right channel data to PCM out right */
                *(pDest+1+(NUM_DAC_CHANNELS*i)) = *(pSrc+1+(NUM_ADC_CHANNELS*i));

However, this does not silence the left output at all.  I am very confused, am I doing something wrong? Or have I modified the whole thing incorrectly?

I've also noticed that after I press PB4 (to terminate the program), it says "Done!", but audio is still coming in and going out.

Other than what I've written above, I have not changed the program.

I realise it is only a basic operation I am trying to achieve at the moment, but I want to take it one step at a time.  It will get much more difficult in the future (planning to write functions which will process a 2 second audio input, and analyse the data, to detect speech), so if you guys could help me get over this hurdle, that'd be great.

Cheers,

D.

Additional information: Using VisualDSP+++ V5 (with update 6 applied).

File edited is Audio_Loopback.c

Codec: ad1980

  • Where we are at with 548

    We have also been playing around with the BF548 processing -- we have a 2 buffer version going using a co-operative scheduler so that we can launch other tasks in syncronism with the audio interrupts.

    The co-operative scheduler has two processes being launched and these transmit the Blackfin signal -- over an FPGA board to a TigerSHARC for high speed processing using an ultra-fast s-transform.

    Re -- still hearing the signal

    I have destroyed a number of audio chips associated with the blackfin ez-lite kits -- not the BF548 yet  :-)

    One property of those destroyed chips is that you can still hear the audio -- some sort of break-through.

    Suggested approach

    Assuming that is not the problem -- I would suggest that you leave the output buffers alone -- and set the input bffers to 0. What I suspect is happening is that you are changing the output buffers to 0, but before they are getting played, they are being rewritten by the unmodified code.

    Changing the input to 0 may fix this.  Except then you might change the input buffers to 0 "after" the values have been moved to the output  :-)

  • My graduate student developed the co-operatives scheduler using the BF548 audio.

    She suggests looking at the multi-audio channel (pseudo and virtual etc) setting to see if you are unintentionally picking up the signals from there. She can provide more information if you ned to follow up that route.

  • Thanks for your replies Mike.

    I don't think it would be the pseudo/multi channel outputs, because I've deleted those completely from the code (only leaving left/right output).

    I've also tried setting the input to zero (pSrc = &InboundData0[0];), I've included, after that line, InboundData0[0] = 0;

    I've put a breakpoint in the code to make sure the program actually reaches that stage, but even though it breaks at that point, audio still plays.

    I hope it's not a broken chip.  If you can think of anything else that may be an issue, let me know.

    It's frustrating to think that I can't even null an output, let alone process signals yet.

  • Oh, I've reloaded the original code a few times.

    It has exactly the same result.  I have two boards (one at home, and one at university), and both continue to play audio despite having terminated the program.  Also, both boards are unresponsive to changing output/input values to zero.

    I've done a printf of the values (just to see if they are zero), and the indeed are (printf("value of inbounddata0 is %u",InboundData0[0]);).

    Have you managed to extract audio data and perform some form of signal processing on it yet?

    I'm trying to find a simple program like the talkthrough of the bf533 boards, but there doesn't appear to be one for the 548.

  • Sounds like you have not got TOO far into the recoding. In this

    situation, I normally reckon that I have, somehow, made a change in the

    code that I had not intended. I then employ the rm . approach --

    meaning download the BF548 code again and hope that this time, when I

    modify the code, I don't make the same mistake again.