Thanks for the note! I've added an explanation of the callback arguments to the Lua docs. The C function does have the callback signature in the getHeadphoneState function:
void playdate->sound->getHeadphoneState(int* headphone, int* mic,
int (*changeCallback)(int headphone, int mic));
But maybe that's not clear enough? Do you have any suggestions for improvement?