Updated WCD937x, WSA881x-analog and bolero drivers for successful
compilation on kernel6.0 for holi.
Change-Id: Ia91a999f825570b3d7123842f0aad3740c4d25ed
Clear the wcd937x interrupt ack registers in post_irq_handler.
This is needed for wcd937x, as regmap_irq is not clearing
the ack registers after the ack bits are set.
Change-Id: I105a4b423a0d01ff1bd3239e0f2d42294557ff10
Signed-off-by: Vangala, Amarnath <quic_avangala@quicinc.com>
Add range check for ucontrol value to avoid array
overflow.
Change-Id: I7b699519bec6f605e5ca5ece8f67badbefc7a094
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Update swr_tx slave port config to use slave provided port params
and remove slave port static tables.
Change-Id: Icfedf1229a88432e80c2294e13f2ccc3949417c5
Signed-off-by: Laxminath Kasam <lkasam@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>
As ADC and MIXER dapm widgets powerup sequence in soc-dapm
got re-ordered, need update same in codec driver to handle
calls to soundwire.
Change-Id: Ibc99d21e29f9e9d7195b4ba8d4c995c46d6aef6f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
WCD937x codec requires clear registers to be written '1' and
'0' for clearing interrupts. Enable clear_ack flag in regmap
irq chip structure for wcd937x.
Change-Id: I0a2e4fc85fe6dca75885b5300840669afeabc80c
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
With multicodec approach, codec widgets are added much earlier during sound
card registration than aux codec approach. The connections between bolero and wcd938x
are done via device tree at a later point. DAPM does power checkup for codec widgets
before the codec-codec path is connected. This results in wcd937x dapm inputs/output
to be considered as endpoints, which results in playback/record failure once after
bootup. Hence, add dummy output/input widgets to wcd937x dapm inputs/output which are not
codec endpoints.
Change-Id: I8589f9a33261531eaad74e8f12ef1825fa90a014
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
add machine driver for holi.
compile wsa881x analog driver for holi.
compile wcd937x and wcd938x drivers for holi.
Change-Id: Icba23cc4b1dd40f7dec6f16bb67a6fae26317f80
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
Add default case for switch to avoid the
Null pointer dereference for the map and num_ports
variable in for loop.
Change-Id: I59c9dc6e5396bcb409876378c811143da1c81551
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
Add delay in post ssr to eliminate playback pause on euro headset.On
post ssr hs detected as hp due to where pa become on before the completion
of wcd_correct_swch_plug workqueue which lead to detect plug_type
as hp.
Change-Id: Ie114fcd0458d9f5edebeee087c90600c3b0c3da2
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
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>
Pop is heard with special headset with silence record
during SSR. Resolve pop by allowing sufficient time for
wcd937x_reset post SSR and again initialize registers
post SSR.
Change-Id: I80e70a98a72b247dca878673a30651647b676659
Signed-off-by: Vatsal Bucha <vbucha@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>