Specific audio codec via I2S on ROM5721 SMARC module

Hello,

we want to use audio via I2S on the ROM5721. However, this does not work out of the box. We loaded several kernel modules, however they all lack a missing definition in the device tree, I assume, for “aplay -L” and “cat /proc/asound/cards” to deliver sensible output and a usable audio interface.

How can we achieve that? Are there some generic or at least specific instructions? In detail, we aim at audio codec MAX98357A. There is some very rough explanation available at Solved: Re: MAX98357A audio on i.MX8M Plus - NXP Community, but this is not specific to Advantech and its 5721. Is it possible to provide some kind of ready or at least predeveloped setup and instructions, e.g. “pull kernel from here, make config, adjust device tree exactly here, make, mkimage”? We do not want to spend hours on compiling Yocto, nor do we want to find out which simple audio drivers or dummy drivers to load. Advantech has the knowledge to develop such example setups and also the hardware environment and finally the customers. This would be very great for the entire Advantech iMX8 community, I assume.

TIA!

1 Like

Hello,

From ROM-5721 manual, there is a sgtl5000(EG51 audio daughter board) codec that has been tested with ROM-DB5901 carrier board.
(https://advdownload.advantech.com/productfile/Downloadfile1/1-20HNOYC/ROM-5721-manual_202010105.pdf)
image

[Template_V4.12_EC_User_Manual (advantech.com)]
image

ROM-5721 user guide:
ROM-5721 user guide - ESS-WIKI (advantech.com.tw)
Yocto 3.0 BSP user guide:
Yocto Linux BSP Ver.A User Guide for iMX8 series -Yocto 3.0 - ESS-WIKI (advantech.com.tw)

Kernel device tree:
linux-imx/arch/arm64/boot/dts/freescale/imx8mm-rom5721-a1.dts at adv_5.4.70_2.3.0 · ADVANTECH-Corp/linux-imx (github.com)
image

OK, thx so far, but for the eval board DB5901, not even the sgtl500 works for the 1 1/8" audio jacks. Maybe we should consider using this as the first step before changing the device tree to the codec attached to I2S_CN3. We are not going to attach the audio daughter board.

Or is there no other audio available from the ROM5721 than I2S via the I2S_CN3, as we can assume from the ROM5721 manual (which, however, is broken at many places and therefore does not pose a reliable source of information, unfortunately). In contrast, the ROM5721 datasheet indicates 2 I2S channels, so we assume the ADVANTECH-delivered standard kernel of the VC0056 release to be compatible to the evaluation board.

We succeed at modifying the kernel config, building modules, modifying the device source tree and panel-simple.c already

Hi @Fabian_Nowak, do you have the extra audio daughter board of ROM-EG51? You may have to plug in that daughter board as the SGTL5000 Codec IC is on that daughter board. It is not included in the ROM-DB5901 package and it’s a separate part to be purchased. Thank you.

Best regards

Eunice