During some concurrencies even though we are not
enabling the swrm port, we are trying to disable it.
which causes problem w.r.t clock disablement,
To avoid that we are updating the set bit only
when port is enabled, based on that bit we are taking
decision to disable or enable the port.
Change-Id: I6707c56c40dd3716917edc097c4b7bcad68261fd
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
Interrupt from wsa883x are not handled as slave_irq is not set.
Add slave_irq for wsa883x to address this issue.
(cherry-picked from commit ddfc43e7c48dcbe9bbae45b5caacdd5bca441800)
Change-Id: I6b56aa88cca895e4e0e5871a7478f6859d45b03f
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
regmap_irq_chip->irq_drv_data is shared by all attached wsa
devices and point to last probbed wsa device. This will cause
interrupt handle issue. Update irq_drv_data per wsa deviece to
resolve this issue.
(cherry-picked from commit 1852682fbcebfb9f479c3d09a91c075049b90253)
Change-Id: I6ac0520a4074d74dfb28122e06eed6a86374c0ce
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
PA_ERR can happen during speaker path setup. Log the
error status in the interrupt handler and clear the error
status for next audio playback to resume properly on
the speaker.
Change-Id: I0490d4cdd6379ed779ce7f54ec8b56d5a7af0649
Signed-off-by: Phani Kumar Uppalapati<quic_phaniu@quicinc.com>
Update to 5.15 kernel dapm api.
Pin name no longer needs prefix as it is added in API.
Change-Id: Ibf967dd01a36decdf904eff9d5af2e315aa53f1c
Signed-off-by: Kunlei Zhang <quic_kunleiz@quicinc.com>
Only UVLO_irq, PA_ON_ERR_IRQ and PDM_WD_IRQ are enabled
on wsa883x. Enable all other IRQs to monitor if WSA is in
bad state.
Change-Id: Ia78f12520eda4b26c00776583a78b14b74771e0e
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
With current setting for VBAT_ATTN1/2/3, pop is heard when
battery is low. Update default value for these registers
to resolve pop issue.
Change-Id: Ic4002a4b30ecd04b04001ca5f16bac5745a803d7
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
during devm_snd_soc_register_card(), the name_prefix can be set
if "sound-name-prefix" is provided in the DT nodes.
The original approach to set prefix would possibly cause ASoC
component probe failed if prefix has not set before probe is called
Change-Id: Ie78d042cda24b7d1d926223d476786e13d965ac7
Signed-off-by: Junkai Cai <quic_junkai@quicinc.com>
Add support to use 4p8MHz DAC rate for receiver over WSA.
Change-Id: Ia0811670326be8131687fbdff70464da063902b2
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add changes to use wsa883x for receiver with
low_noise mode settings.
Change-Id: Icfa43ebbdb1e366f365053535f541bee03751ca3
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
This change is to remove the group write so that both the WSA slaves are
updated with the corresponding values for DRE CTL register.
Change-Id: I1f9583ff1ca3988b78896087b2f8e7409e4796fd
Signed-off-by: Sairam Peri <peri@codeaurora.org>
Reduce WSA8832 SKU DRE gain offset by
1p5dB same as WSA8830
Change-Id: I949bd78e2f4e935e1aba7ce0e2319418562e14ac
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
SWR DAC_PORT string should be defined as SWR DAC_Port
This was causing "ASoC: unknown pin" issue.
Change-Id: I31ce7bf983b3793f8e4ee9702f5df021a89fd389
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
Add wsa2 backend dai links only in platforms
which has 4 wsa speakers.
add 2 to the device index parsed from hardware device id
of wsa slave to match the dai names in the msm_dailink.h
Change-Id: Iffe43842123526f4925f9d5bcd8dff0317bac7a7
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
During device probe error, ensure release supplies
as part of cleanup resources before exit.
Change-Id: Iaf173863d34de3d2151d5fa3c99cf65421e4d2f8
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Update the parent handle for event notification to receive
event notification from digital codec.
Change-Id: Ia67814eee4e0a4703c2fde6db7942757bcc2ba2d
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Add support for second instance of WSA speaker amplifier.
Change-Id: Ia0a19d86f2fdc7a4b3b42812ccba23bbf05bd6b4
Signed-off-by: Sudheer Papothi <spapothi@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>
Updating WSA883X_OVERRIDE2 default value to 0x02 breaks
speaker protection. Revert the default value update.
Change-Id: I064157a718d87b2903c10dc78e0ce99ce400b6d8
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Add a function in wsa883x which returns the sound wire
device number for a given wsa883x codec slave instance.
Change-Id: Ie3d0e309870f488b1643a853bcddcf93314d94b5
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
Update register sequence of WSA883x codec to reduce CnP
during bringup and teardown of speaker path.
Change-Id: I348a55e1324b5c26a36b8d7c78edf52a66e40381
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Check if component prefix is set before use.
Add component prefix for dai widgets before calling
ignore suspend.
Change-Id: Ifa0c727bf46af661cd19b6018bfc25af9a7e3753
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
Add dapm ignore suspend for playback DAIs to avoid
widget down during suspend.
Change-Id: I64347f9cb9d425096c5710e802805388adecd68f
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Update PDM_WD bit only at startup and teardown of
speaker playback.
Change-Id: If385c0f4d99b7f5aa4ccd8b1ee94c4afa6754518
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
In ADIE loopback, need PA enable to
avoid mute. Ensure PA enable post slave
path setup and FS clock.
Change-Id: I4df9d7b919325b50f237f31338859e1b5b34b2eb
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
In register show function, when snprintf returns a negative value
out of bounds access occurs while copying the data to user.
Add return value check on snprintf before copy_to_user
to fix this and add sizeof() for tmp_buff to avoid buffer
overflow.
Change-Id: I15f1add37987d2176a165669d7a5b40bd576004c
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
Update interrupt handling on WSA883x driver to avoid fake
interrupts during power collapse.
Change-Id: I3128e2c2d9bf84f90f472a03d2b23ca1d3b70838
Signed-off-by: Sudheer Papothi <spapothi@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>
Before access the wsa register check the spkr status bit in
power-down sequence.
Change-Id: I5e07ee56e17701275784fd4c413bc214c5893989
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>