SGTL5000 Codec Not working with Linux 5.4 on IMX8X

Thanks again to @jeremias.tx for the sanity checks. I finally found the problem. Hopefully I can document it clearly enough to help future people hitting this issue.

The problem is a bad /var/lib/alsa/asound.state file that I was injecting into my build in an attempt to make the system start up with the desired sound mixer settings. I just configured what I wanted in a an older b2qt reference image for the IMX8, rebooted to get the settings to be written to the asound.state file, then grabbed that file and put it in my meta layer to jam that specific file in my image in place of any default.

I’m guessing that with the latest Linux build especially that the driver is different, has different options/configs/etc (I have yet to dig into these details) and so the loading of the asound.state was getting the mixer config into a bad state or some such thing. If any alsa experts want to chime in on how best to accomplish this properly in a yocto build, that would be great, but for now my plan will be to remove this file from my build, create a new image, repeat my old process and inject that new file again. It’s certainly ugly, but I bet it’ll work.

Also if anyone is interested in debugging the details, let me know and I’ll post the good and bad asound.state files.