You would have to ask this question to the RoKu forums.
But, the M500 has a digital output that does not do frequency upscaling to 48kHz, so that is as best as it can get. Just make sure the volume is always at 100% 😉
It’s easy on M500, M1000 and M2000 – If the SoundBridge volume setting is at 100% then there is no modification of the audio samples by the DSP if a lossless codec is used. So if you transcode to WAV using Firefly, then the SPDIF output from the SoundBridge should match the original. Note this is not the case for the M1001 which resamples all audio to 48kHz unless already at that rate.
This has previously been covered on the Roku forums in fact, but no problem.