Xonar D2X is covered here
http://maxedtech.com/asus-xonar-cards-and-amd-ryzen-am4-motherboards-compatibility-report/and you might want to read that along with this
https://en.wikipedia.org/wiki/Asus_Xonar because it looks to me like that card is really old and if you read this in combination with this
https://rog.asus.com/forum/showthread.php?101937-Essence-STX-II-STX-II-7-1-amp-Xonar-D2X-incompatibl.... Well it really sounds like the card is past it, I wonder if onboard sound is better in most cases.
But to summarise for you, Xonar D2X - incompatible with X370, B350, and X470 MBs and more than likely every board thereafter.
Who knows maybe you can find a way through all that information to get it working but chances are AMD will release an AGESA update and boom it's broken again or miss out on whatever is in the package. I take the AGESA update personally over trying to worry about this old thing working. There are awesome onboard sound cards these days and extremly good DAC / headset packages.
Hope you find this of help.