I managed to fix this problem in a risky way, but it worked for me. Read below.
Pin 11 apparently carries out the following function :
11 GND If connected to GND the iPhone sends audio signals through pin 3-4 otherwise it uses onboard speaker.
My iPhone is stuck at the function of using an onboard speaker (dock), and only produces sound when connected to a dock or a charging connector. Whenever I take it out, the phone mutes itself except for ringtones.
I am guessing that some switching mechanism is stuck at that setting. Does anyone know if there is a specific pin-like switch that needs to be adjusted to fix this ?
I noticed that sound only plays when connected to the charging dock and powered on. Using the cable with no power OR without the dock mutes the phone. If I remove the iPhone from the dock while it's playing music, it continues for a few seconds and then mutes, the music player is still running on play, but with no audio output.
When trying to connect the AppleTV, I found the following evidence that shows how the iPhone thinks the dock is connected.
The iPhone was NOT docked at this time.