TWSP-HFP: check earbud state while select best Mic

In below case, the earbud out of ear is selected as active Mic in the call, so
that the caller can not hear any audio.
1. Call with EB-Left and EB-Right in ear. EB-Left is active and set as MIC source
2. Call ends
3. User takes EB-Left out
4. EB-Left sends notification to TWS+ phone
5. Call initiated
6. Audio only heard on EB-right
7. MIC data being used from EB-left (which is out of ear)

Add checking earbud state while select Mic path. If one earbud is in ear state,
the other is out of ear, then in ear earbud will be selected as best mic. If both
of earbuds are in-ear or out-of ear, then select best mic based on mic quality,
just as the previous logic in twsp_get_best_mic_scb.

Change-Id: Iaae0e1f2480d90a259be27d3ca05dc67fdf7a5e2
CRs-Fixed: 2478089
1 file changed