Add ratelimit to supress the logs flooding at the
time of SSR.In all places defined ratelimit as,
in 1sec one debug msg prints.
Change-Id: I6dfe140848e5cecb1b311c432f8311cdf0615a58
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
When sound wire master suspend is called, it holds the mutex lock
and does lpi_gpio_write, which gets preempted during pr_err_ratelimited.
Any other calls to master suspend will be blocked waiting for the above
mutex lock resulting in timeouts.
Remove pr_err_ratelimited log when device is down.
Change-Id: I148263ddbb89d436b0ce27bdc4519f196d90679a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
When sound wire master suspend is called, it holds the mutex lock
and does lpi_gpio_write, which gets preempted during pr_err_ratelimited.
Any other calls to master suspend will be blocked waiting for the above
mutex lock resulting in timeouts.
Remove pr_err_ratelimited log when device is down.
Change-Id: I148263ddbb89d436b0ce27bdc4519f196d90679a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
HW vote and unvote is currently called from multiple
clients leading to synchronization issues
during SSR/PDR scenarios. Synchronize all the vote requests
by using digital codec resource manager.
Change-Id: I7e63f69ab5d761a3bb4c7ce70bbef2e8bfd76cfb
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
(cherry picked from commit 31aa875405)
Few Fixes on the drivers we are making are
1. snd_event is not resetting client info on deregister.
2. audio_prm is not providing the snd event up notification
3. gpr_lite reversing registration seq to avoid race condition
4. pinctrl-lpi reversing reg seq to avoid race condition.
Change-Id: I749de8874b33a528cb6b386d753f5d594139a577
Signed-off-by: Bharath Tirunagaru <bharatht@codeaurora.org>
Add 100msec delay before resetting hw vote counts in
SSR up sequence in order to ensure AVS is up when
votes are requested.
Change-Id: I0f46c60555f6bf833b1cac76f86a54afdcb78ba0
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
HW vote and unvote is currently called from multiple
clients leading to synchronization issues
during SSR/PDR scenarios. Synchronize all the vote requests
by using digital codec resource manager.
Change-Id: I7e63f69ab5d761a3bb4c7ce70bbef2e8bfd76cfb
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
From kernel 5.4, device node properties with
-gpio/-gpios suffix in the name is expected to define
gpio node properities like "#gpio-cells".
Update non-gpio property names to not have -gpio/-gpios
suffix.
Change-Id: I63fc81ce16c4e9705a08a3762aa91c7cacd174b5
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
On bengal target, audio core voting is not applicable.
Add support for audio HM voting in pinctrl-lpi driver.
Change-Id: I8661c981896c14899ca4d85f77507b417700b987
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Lito swr has three data lines for tx. Third data line is
on different lpi gpio from other data lines for tx.
Enable corresponding gpio.
Change-Id: I3213897766e3b38d3d04ca85410c8ca674efcfc6
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
If PM runtime resume fails, hardware vote will not
happen until it is suspended. So in error scenarios
set for a lesser suspend delay so that voting can
happen sooner.
Change-Id: Ia4175535e45ec291292b8d8656146826ffd05a26
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Runtime suspend gets called multiple times during SSR
scenarios leading to clock count mismatch. Add logic
to prevent this in all macros and pinctrl lpi driver.
Change-Id: I380631c1db8cd7d94a8909affd8c96c87f24817c
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
During SSR and lpi gpio read/write use cases, core_hw_vote
status flag might be checked and modified in parallel.
Protect the core_hw_vote status with mutex lock to avoid
any race conditions.
Change-Id: I313908dfa72430cc49d7d11e6ce8c1bb7af0a1c3
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
During adsp SSR, lpi runtime suspend is not called and
hw vote clks are not reset. Force LPI runtime suspend
during adsp SSR to avoid kernel panic.
Change-Id: I153c5826a282d7beb175a41a55e2d6bf5907eb62
Signed-off-by: Meng Wang <mengw@codeaurora.org>
HW vote clock may fail to get enabled. Check if hw vote clk is
enabled in lpi_gpio_read and lpi_gpio_write to avoid kernel panic.
Change-Id: I077e5c61058d9d90be98ff3a0c0834049ad7e584
Signed-off-by: Meng Wang <mengw@codeaurora.org>
System suspend is not handled in lpi pinctrl driver.
Register to system ops to release lpass hw vote
before apps suspend.
CRs-Fixed: 2439988
Change-Id: I334a993ead5d2abec5286fb5812d67b795d03f3c
Signed-off-by: Laxminath Kasam <lkasam@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>
Clock driver throws warning when clock disable is called
without enable. Disable core clock only if the respective clock
enable is successful to avoid this warning.
Change-Id: I489647a444c9be326e5805c353385240c6c6d0fc
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
When ADSP is in power collapse or island state, it would fail
to access LPASS codec register.Vote for LPASS core to avoid
LPASS power collapse with pmruntime approach while accessing
LPASS registers & TLMM.
Change-Id: I74d037e499fb6f1245b9a1bd1b0a77200608c27b
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
Add changes to read slew rate from device tree table
and set the same under set configs list.
Change-Id: I0d7e950d67d34b63c5a6436bb4d10b08a80c2c58
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>
Reduce auto suspend delay to 100ms from 1500ms for voting LPASS
NPA resource to reduce delay in entering LPASS into island mode.
Change-Id: Ic38f7b9e8d794963e51c30dfd03da586bca84bd2
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
Vote for LPASS island NPA resource before accessing any
LPASS register from LPI TLMM driver.
Change-Id: I9987b2ac60b055a7d33b3adce2b36a2fbbe2dea1
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
Add changes to support SSR in pinctrl lpi driver
based on snd event framework.
Change-Id: If4fb3085ab69ae04628ef10a8b528d0cdc20f40d
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
In order to support variable lpi offsets from different chipsets
read the lpi offset values of gpio groups from device tree. Any
target which uses LPI has to define this gpio offset table
in device tree.
Change-Id: I3bd54017e4571deb9a189cfd6903698887a6413a
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Deregister lpi with audio notifier when removing driver to
avoid crash when rmmod and insmod again.
Change-Id: Ibcaf272e6405ef8403b3ac66af5572050fa1092e
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Update sizeof lpi register offset to 32 bit to
accommodate all register offset for sdm670.
Change-Id: I9a3fdb56f9faf6c0aff627cbedaa54db606d2434
Signed-off-by: Rohit Kumar <rohitkr@codeaurora.org>
Propagate the changes based on latest snapshot
for audio kernel source tree at below cutoff of
kernel msm-4.9 -
(aed56b2df75 - "drm/msm/sde: update te vsync enable sequence change")
Change-Id: I7ed5102146986b81e5cb9ca55432360b3549b60c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>