How does my phone know it is connected to line in or headphones?

Printable View