Resolve warning log when hph pa mutex lock is destroyed before
unlock. Initialize hph pa locks as global lock and do not destroy
during SSR to resolve issue.
Change-Id: Idc5af793294f7fdc8dbcc17770f68fe2c46ab337
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Add enum names defined for callback between wcd and bolero in
separate file and include that file in order to have same enum
across wcd and bolero.
Change-Id: I808c2ad3de37655c1ba2b8e096def60703ced7f2
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Register to power supply framework to get soc capacity.
Reduce ear and hph gain for reduced voltage to optimize
power consumption. Also set LD22 voltage to lower value
for low SoC.
Change-Id: I94de9341b8c7307128d3cd41c7398c31d57fa685
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
During SSR, when usbc analog device is disconnected, the
respective disconnect interrupt is not handled and hence userspace
is not notified. When ADSP recovers, fsa driver sends a disconnect
notification. So handle device disconnect and notify jack/userspace
through this notification.
Change-Id: Ic695c2267c9289f9528d50202938ec09f634de8a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
When current source mode is enabled, comparator auto
zeroing should be turned ON by HW. As rouleur codec HW
doesn't do this automatically, add this support
in SW to set the auto zero enable before FSM enable
and reset to auto once FSM is enabled.
Disable surge protection before ADC measurements
and change HPHL and HPHR thresholds while
identifying cross connection for proper
accessory identification.
Change-Id: Ib775de0f0bdb6c655a3c0eb4775276acfbca1e84
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Current source mode in rouleur does not work
properly leading to issues in button interrupts
and fake electrical removal interrupts.
Enable pull up mode instead of current source
mode to fix these issues. Modify the headset
max vref voltage to 1.7 volts and micbias
calculation logic.
Change-Id: If3e4a2fdcf080b07fe3c363b6eb6115f101b91f4
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Add additional pinctrl states to support alternative function.
This change enables support of alternative pins through pinctrl
framework.
Change-Id: I1f3f9a13345846f1714b4ecaeecde975b5cf6813
Signed-off-by: Sanjana B <sanjb@codeaurora.org>
For power saving during RBSC, need to vote for minimum
or zero current on load for respective regulator to
enter LPM mode. Add required support from audio WCD/WSA
to vote accordingly during suspend/resume.
Change-Id: I578195b84ba18a0b69dde3b93a3f6461efa85f7f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
ANC headphones are no longer supported, removed dead code related to the feature.
Change-Id: I3dd51b5b1d9f77fd870947608f8a14fc3f7aeed0
Signed-off-by: Akhil Karuturi <akarutur@codeaurora.org>
On lagoon, vdd-buck need to be dynamic supply.
Add required support to handle buck as dynamic supply.
Change-Id: If6c27fffe0d0c44f178e61a6eae6ef63775c8988
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add CONFIG_AUDIO_QGKI check for variables and functions
in audio drivers, so they are used only during a QGKI build.
Change-Id: Ia04232566367f196f298a49cf3962bb7927bec6a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
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>
Max limit of 60k ohms was set for cable to be detected as lineout
to fix headset detected as lineout issue on legacy targets.
This was because of large impedance detected for headset.
This is not applicable for adc based targets as headset is
detected based on mic adc voltage. Remove max impedance limit for
lineout detection.
Change-Id: If73bbe2cd78d04d1fcb359a3e5ed5cd69f3ab9f0
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Some clock and data gpios are also treated as wakeup source capable
interrupts. Add support to control the wakeup capability based on
the usecase.
Change-Id: I32a12f004afbf04f82e40be62747b0af8836be82
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Update TX requantizer gain coefficients to center
gain errors around zero. To reduce click and pop
on audio playback enable reference buffers of
headphone path in hifi mode and then put it to
the usecase specific power mode.
Change-Id: I0013d6258d5e5a8c92fd0f951d1d89e5906b2faf
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Defer codec macro probes if soundwire pins are not
ready to be accessed yet during boot up.
Change-Id: I20173e49043a076d73cdbb811863afbff87d4a3b
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add codec enable and disable sequences for class ab
low power modes.
Change-Id: If5b54075985c2d4d1a24423c03e78bee119862bc
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add inline keyword to stub functions to compile them
inline when the corresponding feature config is disabled.
Change-Id: I933d508fc0fd5c2ad8daa26be7d39eea2a3434b9
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
When detecting special headset, vref for special headset is
set based on headset threshold reference 1800mv or based on
regular micbias settings from device tree. Scale threshold
reference as per the special headset micbias voltage.
Change-Id: Ic4cc24e18efeb420b53a2154707c9399eb886181
Signed-off-by: Meng Wang <mwang@codeaurora.org>
cdc pinctrl needs to be loaded for both v1 and v2 wcd
core objects.
Change-Id: I4742e96b54bbd481583a6d12fd32fddb63216077
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Switch audio drivers to SPDX identifier on msm-4.19.
Change-Id: Ic3f0230a516db251b8d81e8a7e73dbc04d66fe1b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
The two arguments in functions wcd_request_irq, wcd_free_irq,
wcd_enable_irq and wcd_disable_irq have same identifier names.
Correct wcd_irq_info identifier name to fix compile error
Change-Id: I6f240d3af1cd253336d070d0f3228eae96a4fcb6
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Add new class-H driver with sequences to support
both class-H and class-AB modes on wcd937x variants.
Change-Id: Ie109f3d951af1e8a0079dd39ab2fe1e9883bd6c2
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add irq utils support for tanggu codec. It is
based on regmap-irq framework.
Change-Id: I93ad71f41a8bf62313bee5b6c374809c93219f5c
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Switch to DLKM for all audio kernel modules.
Change-Id: I6a96023a21f655f873531af9ace81f2b01eb0f58
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>