In both situations I have HDMI audio to Yamaha AV receiver.
If you have a spare pi you might try volumio with pre-built chroot?Is the soundquality difference not an ALSA issue? Different settings or something?
Here some info: Advanced Linux Sound Architecture/Troubleshooting - ArchWiki