Identify sot-23 smd component and possible replacement
SANYO 2SD1048. 
http://www.datasheetcatalog.com/datasheets_pdf/2/S/B/8/2SB815.shtml

It’s an PNP “audio” transistor. 20 V and 0.7 A rated. 

Given the 0.7 A rating which is a bit more than small signal standard, was it located close to the speaker/headphones output?

X denotes 2SD1048. 
7 denotes a hFE between 300 and 600. 

You can most probably replace it with any PNP with similar hFE and current capability.