ASoC: wcd9304: Turn off mclk during clock transition

The clock is not usable when either the clock source changes between
external MCLK and internal RCO or the bandgap mode changes to fast mode.
In such cases, turn off master clock and turn on again later to avoid
codec from going into bad state

CRs-fixed: 442464
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
(cherry picked from commit 02c2d647196461282b5426fc777df1792fff6b76)

Change-Id: Ida5c0270d6eccb0fbc25f7fac5acf22fc8df527a
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
Signed-off-by: shao2610 <1358410784@qq.com>
ASoC: WCD9304: Fix register sequence for analog mic recording

Found that the register sequence for enabling recording on analog
microphone was updating a wrong register. Fix by correcting the
register sequence

CRs-fixed: 378189
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
(cherry picked from commit 5d260e319eac177e7fc4ba991433f22384742afa)

Change-Id: Ie6cb196af5b5ce689919ce98c7d181628ab6c986
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
Signed-off-by: shao2610 <1358410784@qq.com>
ASoC: wcd9310: Disable Mic Bias Pull down prior to enable micbias

Pull down Mic Bias and add a delay of 250ms to avoid issue
of something else pulling up the mic voltage other than mbhc
polling prior to enable micbias when recording starts.

CRs-fixed: 431573
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
(cherry picked from commit 1b9a309c9a58bfd47d0e6dee75cfd6fea12e0760)

Change-Id: I575cc61c1f0d9956958768f8852b87695bb2211c
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
Signed-off-by: shao2610 <1358410784@qq.com>
ASoC: msm: Apply cached volume and mute at call start.

Volume and mute settings before voice call is started are cached
in the driver, apply the cached settings at call start.

Signed-off-by: Neema Shetty <nshetty@codeaurora.org>
(cherry picked from commit 12a56bda514f7a3bec3b2c0ae703ecef8dfe6d03)

Change-Id: Ia73bec252633db67fcd7cf8c853749e9d5f109ab
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
Signed-off-by: shao2610 <1358410784@qq.com>
Bluetooth: Resolved a race condition

Due to simultaneous disconnects from HCI and SCO
this race condtion arrives. While doing SCO disconnect
a null pointer check for HCI connection should be present
to avoid any crash due to this condtion.

CRs-Fixed: 415887
Change-Id: I23f0a7a256e267650db0abc2fc510b964b64c50c
Signed-off-by: Nitin Srivastava <nitinsr@codeaurora.org>
(cherry picked from commit 744098c26b667ae4599c2aabe7459a09b7a4d43d)

Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
Signed-off-by: shao2610 <1358410784@qq.com>