In Rockbox, to charge without connecting (hence allowing playback to continue), hold down the REC key while you plug the USB cable in.
There's an unfortunate side-effect where Rockbox goes into the recording screen, so don't do this when connected to an amplifier which is turned up to 10, unless you like feedback.
pondlife