Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Two audio codecs

Hey guys,

I'm working on a DSP acoustic echo cancellation senior project. I have the DSP Verilog core working, the SOPC Wrapper interface working, and I have a pretty good idea of the software functions to communicate with everything.

The only problem I'm facing now is how to recieve two audio inputs and output to two audio outputs.

The DE1 board that I'm using only has one audio codec which only supports one audio input/output channel.

As a result I'm trying to hook up two DE1 boards to use the audio codec on another board so I can have two channels.

I tried using the GPIO. I connected the GPIO_0 of both boards together, making sure the pin alignments were obeyed. I then wrote basic Verilog assign statements to connect the pins of the codec to the GPIO so the main board could communicate with the second chip via the GPIO.

I ran into the problem of the I2C signals. They are bidirectional and obviously assign statements only work in one directional. Since the I2C signals are only used for initialization of the codec, I decided to put the auto-initialization module in the second board.

I've double checked all of the assign directions and all of the pin assignments. I made sure that now of the pins were used were the GPIO Vcc/GND pins. I don't understand why it doesn't work.

The main board is using the DE1 Media computer. I put two audio cores in the SOPC. One of the audio cores is connected to the appropiate GPIO pins that should lead to the audio codec on the second board. And the auto-initialization module is directly connected to the I2C signals on the second board.

Despite all of these checks the system still doesn't work. Could it be that the audio data signals are going so fast that there is signal integrity issues? I can't hear any sound at all when I write C commands to send output sound to the Audio core that controls the codec on the second board.

Any help would be greatly appreciated.

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Just to mention, I considered using two seperate CPU systems on both boards. But, I really don't want to introduce the complication of software handshaking between the boards.

    Another option is switching between Line In and Mic In everytime I want to recieve the signal from one of the two channels. But, I need two outputs. Also, the signals will be mono small powered signals, and Line In is for Stereo signals.

    It makes more sense to "indirectly" connect the 2nd audio codec on the other board to the main system through GPIO pins. And the I2C bidir initialization signals could be easily taken care of by putting the auto initialization circuitry on the second board.

    But, this configuration doesn't seem to work. Can anyone offer suggestions why it doesn't work?