While measuring the adc, if PA is on we will get incorrect values of
adc due to which the detection type is missmatched. So disable the PA
While measuring the adc values and restore back PA once measuring adc
done.
Change-Id: I5833452e23a71637353449bb48b937ee44be24ae
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
replace all dev(pr)_err/info logs
that could potentially flood kernel logs with
ratelimit functions dev_err_ratelimited and
dev_info_ratelimited
Change-Id: I32dc6002dead1a07622978c4de63d541c01982fd
Signed-off-by: Shazmaan Ali <quic_shazmaan@quicinc.com>
Audio is distorted during first 3 secs on headset record
while doing device switch from dmic to headset mic.
Disable BCS before slow insertion detection and enable it
afterwards to resolve the issue.
Change-Id: Ie5bc4b5292e5f69066760cab44d78989a74f13f4
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
1ms delay is needed for impedance detection after disabling hph
surge. Add delay for wcd937x and wcd938x.
Change-Id: I515fa0ca66562c91cb4aacb87cb7394122aa1c10
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
If surge protection is enabled, it interferes with HPHL
and does not give proper impedance for high impedance cable.
Disable surge protection before impedance detection and
enable it again after impedance detection on wcd937x and wcd938x.
Change-Id: I13840b0ba9fd9ce16b90f42dcd1a25ffb928b504
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
During headset playback if we trigger SSR, headset removal
is not detected. This is because after recovery mbhc
driver expects a new detection event as the driver is reinitialized.
Reset detection type to insertion to retrigger a hw interrupt
for mbhc driver.
Change-Id: Ibf6663f46e7485f5ff5c5968a71c88e59a4728e7
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Use soundwire device wakeup API to wakeup soundwire master
during headset plug detection.
Change-Id: Icddd558df382146bb2989926d2e92e627b5a844f
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Mic bias value is needed in case of special headset
detection logic and the same needs to be read and stored
from device tree to be used by mbhc driver.
Change-Id: I11c8ac6b0abc7ba04b6750c59405794bc768dc42
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Stop mbhc operations during ssr down to cancel
any pending detection sequences.
Change-Id: Iff054cf8b3099959a1be561bd937057258f57b81
Signed-off-by: Meng Wang <mengw@codeaurora.org>
WCD938x codec is a soundwire based codec that supports AMICs, DMICs,
Headphones, Ear and Aux paths. Add support to enable all device
paths of wcd938x codec.
Change-Id: I81b5e603ef73afba74b8d2274012752f9ca5cb6f
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>