ASoC: wcd9xxx: Synchronize button press with notifiers

Button press handler and event notification handler needs
to be syncronized so that they do not interfere in the
excution leading to incorrect register writes or threshold
updates.

CRs-Fixed: 637805
Change-Id: I51ebf1d546aa59e219ce71517970b35730589b6c
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
ASoC: wcd9xxx: Avoid enabling button polling from event notify handler

During insertion, it is possible that recording is already
enabled from handset which will switch to headset. During
POST_MICBIAS_2_ON event, though button polling is not actually
enabled, due to polling_active becomes true, the event
notification handler pauses and re-starts button polling.
This could lead to unknown state for button polling state
machine.

CRs-Fixed: 639116
Change-Id: Ie379e5ff58c2e99f8e21e534cbcdb914bc98b7ec
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
asoc: msm8974: Properly configure MBHC

 * Fix all the headset issues including:
   - Headsets detected as headphones
   - Headphones detects as headsets
   - Buttons not working properly on all headsets
   - False redetection when volume is at max

Change-Id: I270c6601e08cae0580794ca452ee2799d13c558b
Merge remote-tracking branch 'CM/cm-11.0' into ak-11.0-nightly