Try designating the device as well as the card. Device 7 is where it works for me. So change the lines you have above to
pcm.test {
type softvol
slave.pcm "hw:5,7"
control {
name "volname"
card 5
}
}
and it should work. Also, make sure you reboot to test the results. I think that once the OS has taken control of the video cards then alsa can no longer change the settings. (Though I could be wrong on that)
If you run:
amixer controls -c5
then one of the lines should read:
...
numid=25,iface=MIXER,name='volname'
...