If your smartphone is equipped with infrared Blaster (emitter) all you have to do is download one of IR apps, if not you can use your smartphone bluetooth or Wifi signal through a device called wifi or bluetooth to IR bridge to control your TV.
Is it possible to use a smartphone to control my non-smart television?
https://www.quora.com/Is-it-possible-to-use-a-smartphone-to-control-my-non-smart-television