This problem may happens if the receiver speaker is already busted or the flex ribbon cable is already damaged. You may need to check these said components or parts first or try to replace with a new replacement spare.
nokia asha 501 ear speaker not working solution ways
nokia 501 earspeaker jumper track ways solution
Nokia 501 Earpiece Speaker Solution
You may then trace each of the corresponding line paths and components where the said earpiece audio signal is being feeds.