IR Transmitter for smartphone
This is for the old timers and also for those younger persons who are not followed smartphone hacks. This time is attempted to insert IR leds into the earphone socket to make IR remote controller possible. There's a problem. IR remote systems need about 36...39 khz pulsed led drive voltage and normal audio systems can only output about 20 kHz due the sampling frequency 44,1 kHz

This is outsmarted by pushing to left and right outputs 90 degrees phase shifted signals and by using two leds in parallel between LEFT HOT wire and RIGHT HOT wire. In the following picture is illustrated, how there still can be 38 kHz pulses available altough both audio channels output 19 kHz. 



To get IR pulse from both positive and negative "Difference" pulses, two parallel, but opposite IR leds are required plus a series resistor to keep the current low enough.

I have drawn squarewaves. In reality only sinewaves are available over 10 kHz due the limited frequency band, but that does not change the basic idea. It works, if the signal is driven hard enough to get enough distortion (the difference of sinewaves is a sinewave)

The IR add-ons for the earphone socket are widely available and the remote control application software, too.

ADDENDUM: Seemingly I forgot the main question "How this can work with one diode at least at few centimeters"

In the IR receiver ICs the right pulse frequency is discriminated by bandpass filter. That filter can get enough 38 kHz signal altough the pulse is 19 kHz by the following principles:


2nd harmonic in this narrow L-R difference pulse is >0 altough in symmetric pulse it's =0. Thus one led between L and R can be enough  for short distance
severe ringing in smartphone's DAC output filter can create the missing pulse
at high IR intensity the receiver can generate the 2nd harmonic


It is maybe not at all the 2nd harmonic, but you have Bidirectional IR LED. It is 2 opposite parallell leds in one case. Thislike devices are available easily. EDIT: Not easily. They are common only for light and in YouTube videos they can be fake.

Which of these reasons are the remarkable ones in practice, must be checked by measurements. All other is only quessing.