By default, MX player doesn't support ac3 audio due to licensing issue. Using a custom codec solves this.
Click to Read More
Don't download and install the «NEON Codec 1.8.9 for Android 6+» usually suggested for MX player in order to support AC3 (available on Google play as «MX Player Codec for ARMv7 NEON CPUs»).
Instead, download the custom codec for arm v7 neon 1.8.6 (available here). Unzip that file, open MX Player, click on the menu ..., go to settings > decoder. Scroll down to the very bottom and select Custom Codec. There, pick the file libffmpeg.mx.so.neon.1.8.6 you have just unzipped.
MX Player will next restart. You can now try a video with ac3 codec. Ex.: download a sample from here.