Hi davidshearsby,
Welcome to the HP Forums!
I would like to take a moment and thank you for using the forum, it is a great place to find answers.
For you to have the best experience in the HP forum, I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
I understand that you no longer have sound from the speakers but still have sound from the headphones. Here is a link to No Sound from the Speakers (Windows 7) to assist with that issue.