What audio codec does your laptop use?
It will be listed in device manager. The VEN DEV combo will be enough information.
You'll find it in the device properties details tab, specifically, the "Hardware IDs" section.
It will resemble this:
Usually the audio codec chip itself will detect an external speaker is plugged in. Have you checked your audio device's configuration software? It should have a shortcut in the classic control panel.