Is there a way to know wether the sound is being routed to the a minijack socket or to the speaker?

Mi problem is as follows: I have a laptop that suddenly stopped playing any sound through its speaker, but then, you plug the earphones in the minijack socket and... voilá!! you have sound.... unplug it, and the sound isn't re-routed to the main speaker.

My thoughts:

1: Speaker is broken
2: The minijack is broken and detecting something attached to it when there is nothing....

I've tested with diferent systems/setups: i.e.: With windows, i happen to have the same situation: And there is no enable/disable hardware button for the audio in the laptop so, i want to know if alsa is redirecting the sound to the speaker or not!!