Okay...here is what I did...assuming you are wanting to do the same as me. . .
My Goal: Control volume by controlboard/controller/joystick.
Change: Modify the RetroPie JoyPad file
/opt/retropie/configs/all/retroarch-joypads
......Modify your controller file (backup first) (mine is snes30snes30joy.cfg for example)
Added the following lines to tie up and down DPAD Actions to volume increase/decrease.
input_volume_up_axis = -1
input_volume_down_axis = +1
This will map the action to your HOTKEY
I BELIEVE, you can also edit the "retroarch.cfg" file as well in the /opt/retropie/config/all directory, but I haven't modified that since the pi1 days.
-bax