changing the volume in kodi will change the volume of pulseaudio which will change the volume of the hw (if available). Why do you want to do it directly?
I don't know how change de volume in Kodi. I changed it with my TV control on TV.
However I have the sound duplicated in the sound tower, via bluetooth, and the television via HDMI with pulseaudio.
So with the TV control I manage the volume of the television, and in the tower the volume of the tower. But I would like to automate it and adjust a volume on the tower when connected via bluetooth so I don't have to change that volume on the tower.
I do not ask that it be synchronized with that of the television, since they have different volumes, only to be able to change the one of the tower with a script