やめる can be applied only to the subject's action.
やめる can be used also for the future/unstarted action.
とめる can be applied to others' action.
とめる can be used also for the subject's action, but it's only for stopping the current/on-going action.
As for your example, 聞くのをやめる is correct. 聞くのをとめる sounds like you are going to stop someone else listening.