I'm using a Nexus 6P playing from Spotify to a Chromecast Audio device (optical out to a DAC/preamp). Everything works great but I can't change the volume when Spotify the foreground app (not in background/recents).
When I press the phone's Volume Up/Down buttons, I get the popover volume slider with name of device and the slider moves, but it doesn't actually change the volume.
I have to switch to another app or go to the home screen, then the volume buttons will work (and display the system volume gauge at the top).
UPDATE: I did some more testing and it does work when I use the analog stereo output and with my other Chromecast which is a standard 2nd gen Chromecast (not just Audio). So this seems be a problem with Chromecast Audio when using optical out.