Topic: Setting the volume programatically

How could I get/set the main volume of the Chumby programatically from C code.
I tried to use a system("chumby_set_volume XX"); but it is too slow!

Is there a file that I can write the value to it, like there is one for the backlight?

Otherwise I will have to pull some code over from amixer.c which is quite heavy!

Thanks in advance!
Odo