When ext clk stop wakeup and slave_pending_irq come together
then interrupt at swrslave is cleared due to calling
enable_slave_irq. Do not clear interrupts for enable_slave_irq
when its called from clk stop wakeup.
Change-Id: Ia710030ab80306d6750bea7264f0d4c07053d701
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Add support to use 4p8MHz DAC rate for receiver over WSA.
Change-Id: Ia0811670326be8131687fbdff70464da063902b2
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
When swr master is in clk stop mode, the value of interrupt_status
is not actual interrupt value. Add check for pm_runtime status to
avoid endless interrupt handler.
Change-Id: I4cd7fe5f01ffdca2a441521088ea39f8804d6b51
Signed-off-by: Meng Wang <mengw@codeaurora.org>
the APSS would suspend within ~120ms after audio off, if system suspend
swrm_suspend() is called before swrm_runtime_suspend. The clock stop
sequence require writing IPC and expect interrupt, which would stop
the APSS to be suspended. Reduce the auto suspend time specifically when
swr event is done can call the swrm_runtime_suspend
Change-Id: Iee0c9143d65e5a8e68a8e20ab73bea9def1920bd
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
Underflow is observed sometimes with CPS spkr prot enabled.
Reduce no of retry count for wsa to 1 so as to optimize delay
between reads on wsa and prevent underflow.
Propagated from the 5.0 branch.
Change-Id: I9b20a242ad4e8375718844c9dfeb0e4996588a19
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
During SSR up event handler, if soundwire state is
already up or auto suspend jiffies is not completed,
ensure put in suspend/SSR state.
Propagated from the 5.0 branch.
Change-Id: I2a8a995399e7844cbc1d6a5676f0d57d97577862
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
At bootup device wakeup enable is called for all masters
causing issue for wsa. This is because wsa
supports interrupts. Thus enable device wakeup
only for tx master.
Propagated this change from previous target.
Change-Id: Iade70defc599952b77b664b752cc55570b4aed27
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
propagated from component audio-drivers.lnx.5.0 with same time.
However, original 5.10 code includes the change functionally already.
Adding check when irq_get_irq_data returns NULL.
Original comments:
Enable interrupt request only when the interrupt is
in disabled state.
Change-Id: Ic5048d2fbddf53bd0e42536677bf5d935f4e0683
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
Add ftrace log to debug NOC issues.
When writing/reading lpass codec registers, add vote_lock
to make sure clk is not disabled.
Change-Id: I1df924d6aefee2899f7e5008851c1c324dabf62a
Signed-off-by: Meng Wang <mengw@codeaurora.org>
In swrm_runtime_resume, when hw vote fails, it still requests
clk and tries to access gfmux which may cause kernel panic.
Update the logic to return when requesting hw vote fails.
Change-Id: I15d2913ae69bf7442ef504b588e0a55917a26071
Signed-off-by: Meng Wang <mengw@codeaurora.org>
0 is invalid slave swrm device_num and it should
avoid config swr frameshape.
Add check for port_id_offset to avoid overflow.
Change-Id: I1eae8936c90bb7b66c27f2ff549eef099c25f011
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Check for fifo availability before writing slave registers
during swrm master bulk write so as to prevent swr
overflow, underflow errors.
Change-Id: I97a914cac289b3f1215ccf5c1abec88b959a9f21
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
runtime_suspend may get from multi functions and reslock is
unlock and lock inbetween which may cause clk count mismatch
with multi rutime_suspend called. Add new lock to make sure
runtime_suspend is run in sequence.
Change-Id: Ie465ded6dc1db1244035e9f4d216466b630df82b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
In soundwire v1p7, CPU1 register bits used from Apps EE.
Update interrupt status and mask bits for CPU1 also to
be included.
Change-Id: Ied86e11756db8609fcd5b81e505f07a4c066c2b8
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Some soundwire register dump is skipped with current logic.
Update ppos logic to dump all soundwire registers correctly.
Change-Id: Id053e2b71705ca17caf2de2bb85f8c987790099a
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Register SWRM_DP_PORT_CTRL_BANK only has sample interval low.
When disconnecting swr port, only update sampleinterval low for
active port.
Change-Id: I79e52a54c5ff1d08cf320835a8401041a10b8181
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Change default swrm mstr version to 1.7 for waipio.
Change-Id: Ide746806363e6fa8abfe142ca4462ac938491257
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
swrm->num_cfg_devs is never changed and it would cause
swr_remove_from_group doesn't work. Remove swrm->num_cfg_devs
to fix this issue.
Change-Id: Id3e39e3e95dfa32e1d81234b1669af3d2b6737bf
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Auto suspend timer for core vote is triggering before read write complete.
Move the auto suspend of core vote to post read write operation.
Change-Id: I758cf57bde4e0b56320ef18f6f17adc655fc8fcb
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
In one of failure for swrm probe, swr unregister
is not done causing crash. swr unregister device
in respective error case.
Change-Id: Idbf50b2ae1d66eafa1db8dbbd386db7982c3b0f8
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
In soundwire version 1.7, rx soundwire port2/3
are extended to 32bits to use as PCM port too.
When using for PDM port as well, need to ungate
the ports for functionality to work.
Change-Id: I1815a9337ab21e0000ca7dbfeaac4c01dadec0dc
Signed-off-by: Laxminath Kasam <lkasam@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>
Remove static tables for master port params for soundwire TX.
As master port params are dependent on slave port config,
determine master port settings runtime and apply for
TX soundwire master ports.
Change-Id: I5e606404521abd514097ddf7500ba4e427024914
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Change symbolic links of header files
Update kbuild file to include waipio config
Upgrade to new QoS APIs
Change-Id: Idbbc734e79e50bfae8aa5baa0a5cd4b566f02e50
Signed-off-by: Jyotirmoi Sarma <jyosarma@codeaurora.org>
remove macro for supported auto_enum slaves and
read from master comp_params. Update num_dev logic
to compare with supported auto enum slaves.
Change-Id: Iedadde5a3ee83645c4d8d16e738376e1797fc649
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
for PCM_OUT/IN dataport, update enable bit logic
using default value based on SWR version.
Change-Id: Ibfd342d9046834d074a12003f15e868c5336798c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Enable interrupt request only when the interrupt is
in disabled state.
Change-Id: I67795bf0ee344661e02b0fec3181cd7980d56652
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
- Skip audio hm voting during bootup.
- Vote and unvote audio hm vote during swrm_runtime_suspend
and swrm_runtime_resume
Change-Id: I7a9c20f62ba0d87779b26da218bfe7373132b565
Add fixes for 4-ch config and other misc fixes.
Change-Id: I393ed7b9ea70cc8cd3d301984bee430135507905
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
in swrm_runtime_suspend, current_state is not updated and
causes audio_core_vote is not disabled. Update to check
swrm->state to resolve this issue.
Change-Id: I2c5be360fe5ddd964d7bc45696e254579aae5392
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Add slave device address for wcd937x in soundwire master.
Update slave port configuration for wcd937x for holi.
Change-Id: I1f953e47b1520efd99b6f400593242ae5fc6158a
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
Transaction slot is not freed when failure happens. Accumulated
error may lead to breach of transaction slot limit. Free the
transaction slot at failure.
Change-Id: I8588be18a820306d2a596fe2bf4a97346076b9b9
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>