first save all your contacts,photos,videos what ever you want then go to settings click on reset button and the select master reset. the E or edge network symbol will be removed forever in your samsung mobile.
On the rear of your TV connect, with a phono/RCA cable to the Audio R + L sockets, connect the other ends to your Yamaha using the TV in sockets. See photos attached
Hope that helps. HDMI is for video unless the extra pins are added for audio.
Normally makers don't play ball between each other. Yes if it was a Samsung Television and a Samsung Receiver A/V System. Or if you have something like a Cable Box or Satellite System that is made to interact with other makes. Or if it is a Universal Remote.
I think you were just lucky that it happened to use the same frequency. Look in the manual for a scan command.
https://www.google.com/search?q=Connect+Samsung+OLED+S90+remote+to+Yamaha+RX-V361+via+optical
..