Mute is observed in amic record sometimes in concurrency with
sva. This is because if record is over tx0 then digital clk
is not enabled. Enable clk after enabling micbias to resolve mute.
Change-Id: Iba3aa4fade0ac5889218eaee2c5d2c4bd4431d50
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Enable compander based on mixer ctl set for ear path.
Change-Id: Ie6287469f1baa9dba239d369bd5a29ed8e44522f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add rouleur codec support in bengal machine driver
to create codec entry and invoke mbhc hs detect
functions for respective codecs. Correct the logic
for headset detection pull up current and
volatile registers for digital part of rouleur codec.
Change-Id: I22545dc796c215c1501e883796546c97d8ca8698
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Headset is corrected as lineout during SSR/PDR. This is
because adc voltage is not measured correctly due to SSR state.
Enable flag deinit_in_progress during SSR down to check if
device is not reported and disable it after device up.
Change-Id: I6fc4fff4149c36ba16aa668a960505504a5d811f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Add dynamic port enablement for wcd938x and
wcd937x targets to support unified swr tx port
mapping added as part of SWR 1.6 updates.
Change-Id: If0cf823dc51028fd5bd95f5a49ffe05998526be6
Signed-off-by: Ramlal Karra <rkarra@codeaurora.org>
Clock disable at aux dac event is not needed
as rx3 widget already disables it.
Change-Id: I67feec194cdae5c6d84efcde0a2931ba8f8440dd
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
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>