module-stream-restore not restoring multiple streams from same application
Summary
Recently I noticed that csgo was no longer defaulting to my headset like it always had before. My speakers are the fallback device but pulseaudio had always remembered that csgo should be on the headset. This happened at the same time that pulse was upgraded to 14.0 on my Slackware-current system.
csgo uses 2 playback streams. One called "csgo_linux64: Playback Stream" and one called "csgo_linux64: Simple DirectMedia Layer". For both streams the application name is csgo_linux64.
I can start up csgo and set the output device fine, and when quitting csgo I see that the correct device is stored in xxx-stream-volumes.tdb. But then when starting up csgo again the "Playback Stream" is correctly on the headset, but the "Simple DirectMedia Layer" has gone to the fallback device. If I now quit csgo without changing anything the device in the .tdb file will be reset to the fallback instead of the headset meaning the next time I start csgo again both streams will go to the fallback device.
While trying to figure out what went wrong I found the message
(1192.751| 0.000) D: [pulseaudio] module-stream-restore.c: Not restoring device for stream sink-input-by-application-name:csgo_linux64, because already set to 'alsa_output.pci-0000_08_04.0.analog-stereo'.
So it looks to me like csgo is starting its first stream, pulse is restoring it to my headset, then csgo starts a second stream and pulse decides to not restore that one because it just restored something for that application already.
environment
Attached pa-info.txt
Steps to reproduce
Start csgo (or something else that uses 2 playback streams)
Set both streams to a device which isn't the fallback one
Quit csgo, then start it up again
Notice that one stream is restored OK, but the other is on the fallback device
Quit and restart csgo again
Notice that both streams are now set to the fallback device
What is the current bug behavior?
Output device for the streams are not being restored
What is the expected correct behavior?
Both streams from the same application should be restored to the device they were on previously