Thanks lolita. I took the play apart again and as soon as I moved the internal speaker to one side I could see one of the solder joints on the headphone socket had gone. I've re-soldered it and it now works like a charm

, it must have been the cable detect.