Do you get audio in both the speakers and the earphones at the same time? Are you getting a notification when the headphones are being plugged in?
When a set of earphones are plugged into the socket usually a signal is sent to the audio controller which should switch the audio to the speaker off.
It may be that the headphone socket is either faulty or has become disconnected from the motherboard. Unfortunately the only way to prove this is to open the laptop and inspect it.
Here is a link to the service manual for your laptop. On p.65 it shows that the earphones socket is mounted on the motherboard.
Alternatively, how long have you had the laptop? Verify that it is still within the warranty period and if it is consult the documentation that came with the laptop as to what you have to do to make a claim for a warranty repair.