What is this type of headphone icon in notification bar?
Second one is showing a line out or auxiliary audio
 icon, which means that it had recognised that a jack had been plugged in ( but it doesn't detect a speaker or maybe it detects the speaker ) but fundamentally to differentiate  between  regular headset (with or  without mic) and speaker connected with line out

If this happens when you connect to regular headphone, it indicates some dirt or pocket flint , preventing recognition of head phone. Cleaning with a tooth pick , ear bud and blowing air to dislodge muck should fix. If it doesn't, try app mentioned here 
What is this icon in my status bar?

Later versions of LG also differentiate between headphone with speaker and without speaker

I had this icon show up on a Dopod phone, owned a decade ago