Chosen Solution

Even after replacing the port and jack the phone is still in hadphone mode. anyone have any ideas?

check the fpc connector of charging port,if there is no problem with it,then change the audio ic.