I2S on Apalis IMX8


I have a c++ program running on Apalis IMX8 that needs to receive data through I2S/TDM (PCM is also supported by the device I use).
I only have (limited) experience with I2C, SPI and Linux. I2C and SPI are listed as devices in Linux, but apparently not I2S.

Where should I start looking to get this going?
An API description and/or c++ example would be great.


Greetings @bengstrom!

Ideally your device should be supported by an ASoC device driver. That’s the Linux kernel subsystem that deals with audio codecs. You can check the documentation for this subsystem here.

For an API, there’s ALSA which is the lowest-level API you may use. I’ve found some others such as libsoundio and SDL_Mixer.

We have an Audio page on our developer website where you can find some more specific descriptions for some audio-related tasks on Toradex modules.