Update change for audio playback and record to work
on bengal target with wcd937x codec.
Change-Id: I2f781e2132b018995f30f4192efd08732196cd28
Signed-off-by: Laxminath Kasam <lkasam@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: Icb18a0b5decb0c0bd9959bce7cced70a27566d41
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
For wcd937x interrupts, need to set clear_ack explicitly
for regmap irq to clear the interrupt.
Change-Id: Ieffc20db0665fa82fe088337fbdf8b518191be3d
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Use proper dev handle in print to avoid compile error.
Change-Id: Ieca116199ec4c86f2ee8c1698285fff0ecababbf
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Update AMIC4 over adc3 for wcd9375 as per HW sequences.
Change-Id: Ie7c3713bee67d32cb7fba042848f52bcded8f4b0
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Enable button click suppression port to send mbhc
events over the port to reduce glitches caused
by button events or plug removal events on the
record path.
Change-Id: I3f913ab1287f06afe6b5fc95da626f7c78ab448f
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Enabling watchdog interrupt during bind causes spurious
interrupts. Disable interrupts during bind and enable
during path setup to fix this. Also enable and
disable interrupt for ear pa for wcd938x.
Change-Id: I4a9526d7b0a63f5325cec6dfe7a4e302ae76fc40
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
OCP is resulting in mute issues during audio playback.
Talos has surge protection enabled in hw. Thus
OCP can be disabled for talos.
Change-Id: I5a7fe54ae9e77af65dd9e017b4001f2fac3cfdd4
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Add variant entry support for wcd937x and wcd938x codecs to
differentiate between wcd9370/80 and wcd9375/85 variants.
Change-Id: Ife20d14462a0b0968e0458471af3823872592e10
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Exposure of driver bind/unbind to userspace via sysfs may
lead to unexpected behavior.
Hide bind and unbind by driver attribute.
Change-Id: I20d6ee653bcc16af15d6368664aaf240c6645cd0
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Invalid memory access happens in wcd937x_suspend if
component bind for slave fails. This is because
as part of component_unbind devres_release_group is called
which removes every node from list and frees corresponding memory.
This results in invalid memory access for wcd937x in wcd937x_suspend.
Do kfree and set drvdata to NULL if component_bind fails
to resolve the issue.
Change-Id: Ia26eb36fe8b92ac0491b03d0d4a2b8def415148b
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Get Logical Address failure comes after SSR during rigorous testing.
This calls removal of swr master device attached. Once removal occurs
further headset insertion/removal does not get detected. Do not remove
swr master device attached to fix the issue.
Change-Id: Iac78b4a12ef296566d082e75ac8905f73d6b2a47
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Disable EN_CUR_DET to fix receiver noise as per hw team
recommendation.
Change-Id: Icbeea920d02279ff845072e54be1c449db7bd2da
Signed-off-by: Meng Wang <mengw@codeaurora.org>
If we start playback on special hs after record is done and perform
SSR/PDR then playback gets paused. This happens because ANA_TX_DIV2_CLK
which needs to be enabled for special hs gets disabled after record
is stopped. Maintain a count for ANA_DIV2_CLK to enable/disable it
as required.
Change-Id: Ic73475c83cb16e3c014f35b8d46ee22d2e7a2efd
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Add support for setting EAR PA gain directly using
mixer control.
Change-Id: Ifd9e31ed45d10b5ea0f9cf546806ef78ece9e181
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Enable HPHR and HPHL OCP after PA enable and disable it
before PA disable to avoid CnP issues at teardown.
Change-Id: Ic08a8862a7fb4f40ecc6060de6aa1eadc11f1c0f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Pop noise is observed at teardown when compander
is disabled. Allow proper delay after PA disable
to resolve the pop.
Change-Id: I15efa08f28bc1dd32e39b3ca1311b1e417199fd3
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Buck disable flag, which is used to indicate if suspend can disable
the buck, is not cleared during powerup if it is already enabled.
This causes suspend to disable buck even during active usecase.
Clear the buck disable flag when returning due to already enable.
Change-Id: I5118b66492dff27965a587e1bc6b916d5c26b9fb
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Stop mbhc operations during ssr down to cancel
any pending detection sequences.
Change-Id: I6aa8c61c2cc74fc08adf57c58673acaa753ac322
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Update the register names and default values to
be same as the software document of codec.
CRs-Fixed: 2334177
Change-Id: Iec3ce76dceb44cef64c1f38a6cd75cb40ee2a539
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
Handle PDM watchdog interrupt. Enable watchdog
before analog PA is enabled and disable it
after analog PA is disabled so as to prevent false alarms.
CRs-Fixed: 2336526
Change-Id: I3c16a9dcd0f4f84bf8ad0bfde9560330c143cdf9
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
MICBIAS is always set to 1.8V. Change this voltage
depending on dt value for respective micbias.
Change-Id: I8eb1e71ae0256423bfd0bcc8ba2cd6bcc4a5ee61
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Use device wakeup api exposed by soundwire to
vote and unvote for soundwire master for mbhc
operations.
Change-Id: Id83c8d3fb2eb351133790f69af56e4981bcac543
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Some alsa API are removed in kernel-4.19 which would cause
codec driver compile failure. Update codec driver to fix it.
Change-Id: Ie358ec1863082166958059c179300b453d2a03ad
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Switch audio drivers to SPDX identifier on msm-4.19.
Change-Id: Ic3f0230a516db251b8d81e8a7e73dbc04d66fe1b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
On headphone path, cold start output latency
is not met. Optimize delays during HPH DAC
and PA paths.
CRs-Fixed: 2338278
Change-Id: If96975d664fc655a4ac38a9d6ed88b6af61adfdf
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
On headphone(HPH) path, CnP spec is not met.
Handle sequences for bolero and tanggu codecs
as per HW sequences. Disable vdd_buck during
system suspend when no usecase is active.
CRs-Fixed: 2343436
Change-Id: I62f89d829715f07885a97531fdcb2cc3ca0822ef
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Pop is heard after PDR is triggered. This is
because while device down PA is still on.
Disable PA before SSR device down to prevent pop.
Change-Id: I6bfe3e731bdf60fba8fee90ab39c03a0512006ce
Signed-off-by: Vatsal Bucha <vbucha@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>