Apple has included support for spatial and lossless audio in the latest HomePod 15 beta, but the options may not be available to everyone.
How to listen to lossless audio on your HomePod and HomePod mini!
Some HomePod 15 beta testers have noticed new toggles for Dolby Atmos and Lossless Audio in the latest version (beta 5). With both spatial and lossless audio being tested, it’s clear that Apple plans to roll out these features to all HomePods soon. HomePods can currently use Dolby Atmos when connected to an Apple TV 4K, but this update would expand the functionality beyond that specific limitation.
9to5Mac notes that these features aren't rolling out to all HomePod 15 beta testers. There's no pattern to the distribution, but if you're running the latest HomePod 15 beta alongside iOS 15, you may be able to check for them in the Home app. The toggles can be found in Home Settings > Your Profile > Media > Apple Music, if they're available to you.
Once powered on, your HomePod can play music from a supported device in either format. You can then listen to your favorite songs without any audio compression (lossless) or with immersive surround sound (Dolby Atmos). It doesn’t appear that you can combine the two at the same time, however.