I never had a laptop where plugging in headphones didn't disable the speaker (and nothing I could do about that in software).
If that really is the case you could use dmix and have audio played on both the headphone and speaker output. You would still have to mute the speakers when plugging in the headphones though.
If that really is the case you could use dmix and have audio played on both the headphone and speaker output. You would still have to mute the speakers when plugging in the headphones though.