Should I choose DTS HD-MA or LPCM track when ripping 5.1 Bluray audio?

A fair amount. Many of the Blu-Ray discs have LPCM versions and I guess that was the original point of this thread. DVD-Audio is in MLP but that is a lossless compression of LPCM (IIRC) and so when those are ripped, the natural result should be an LPCM and that easily goes to FLAC. There is actually quite a bit of good material from DVD-Audio and in a few cases the surround versions are very compelling. (And then there are others that are plain silly - like Santana Abraxas where it feels like the musicians are running around you in a circle).

When you mention DTS and Dolby, are you talking about on Blu-Ray or legacy disks that are in the DVD format family? There are DTS “CDs” and many folks have converted their old quad and other multichannel recordings to DTS - there is a whole community out there if you like late 60s and 1970s material especially – the sound quality is not bad albeit not pristine.