Transreceive Audio data from SGTL5000 to EIM bus

Hello ,

I am using Colibri iMX6 DL, I want to transfer sgtl5000 audio data to EIM bus and read simultaneously(Example like telephone system)
i have used this command to loopback audio from mic to speaker within processor :

“arecord -Dhw:0,0 -f S16_LE -c 2 -r 44100 | aplay”

Kindly suggest me how to read and write audio data from sgtl5000 to EIM bus.
And please provide any sample code.

Thanks

Hello @Priya_J and Welcome to the Toradex Community!

Could you provide the Software version ( uname ) of your module?

Kindly suggest me how to read and write audio data from sgtl5000 to EIM bus.

What is your application? What are you trying to do?
Please provide some details about your system?

And please provide any sample code.

Please have a look here?

Best regards,
Jaski

Hello,

The Linux board version is : (4.1.44-2.7.4+gb1555bf)

We are using SGTL5000 audio codec for recording the audio data and using Colibri iMX6 DL.

We need to store the audio data into the buffer and then send it to the EIM bus(and then to FPGA),
and all these functions need to be executed real time as we want to use it in a telephonic system.

Can you provide any example as how it can be executed ?

Thanks,
Priya

Hi Priya

Thanks for this Information.

We are using SGTL5000 audio codec for recording the audio data and using Colibri iMX6 DL. We need to store the audio data into the buffer and then send it to the EIM bus(and then to FPGA), and all these functions need to be executed real time as we want to use it in a telephonic system.

If you record audio with a Codec, then it will already encoded for saving and transmission. So what exactly is the use of the FPGA? Will the buffering be done in FPGA or do you want to do it in Linux?

Can you provide more Information about the telephonic System? Are you trying to do something similar to DECT?

Best regards,
Jaski

Hello,

Whenever we get command from EIM , we will send data from mic to processor and then to FPGA (via EIM) , in real time.
We want to send real time mic audio data processor to FPGA.
We need to buffer the data in Linux so that the audio data is sent in real time.

Thanks.

In Linux, the sound subsystem is called ALSA. It looks like what you want is not really the FPGA to be a codec (e.g. like the SGTL5000) but rather it’s own dedicated audio controller (more like I2S, PCM or TDM inside SoC). So, I guess you need to write a driver taking care of the exact way your FPGA expects audio data and does its handshaking.

BTW: I would suggest for you to upgrade to our latest stable BSP 2.8 rather than using the older BSP 2.7 before beginning to write any driver code.