Is there a way to play 5.1 surround via Apple TV?

Yes. The Apple TV can pass through 5.1 AC-3 to a receiver if you set up the file correctly. Apple has the full details in a knowledge base article, but basically you need to set up your mp4/m4v file with a stereo AAC as the default audio track, then put your AC-3 track after it, disabled. On the Apple TV, you need to enable it by turning on Dolby Digital Out in the Audio Settings.