Edit: removed unneeded echoed text from script.
Edit2: when setting up card removes user slider settings.
I was trying to add a new sound device in Tahr pup and found that Retrovol wasn't being updated, the code to replace the hardware selection in the .retrovolrc just doesn't work and from what I gather has gone about doing so the wrong way, I see no point in removing and replacing any .retrovolrc entries beginning with "#", these are overwritten each time Retrovol is run.
The changes I've made simply remove the tray_control=, sliders: and card=hw then append the the selected hardware on the line after the #card=hw:0 entry, if the entry happens to be card=hw:0 then nothing is added and retrovol default is used.
This results in the tray volume level being the correct one for the device selected and no need to change the hardware device from within the Retrovol GUI.