Bus reset is creating mismatch in interrupt generation sequence
and leading to audio playback mute.
Disabling bus reset for soundwire master version 1.5
Change-Id: I1d41a8d11d1f86c8a538f0b8d234bb6d001268ad
Signed-off-by: Vijay Kumar Maddula <quic_vmaddula@quicinc.com>
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>
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
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>
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
For elite and audioreach co-exit, we need keep source file same.
This patch exit in audioreach but not included in elite, cp it to keep file same.
Leveraged from audio-ar commit id ac15eb7016aff23a2be2a57289635d741cb95340
Change-Id: I187909403e9b54c8f6836477208de5e8311bf4ff
Signed-off-by: Kogara Naveen Kumar <quic_nkogara@quicinc.com>
trace_printk is recommended for debugging purpose as it
requires temporary memory to handle strings. If used
anywhere within the kernel, memory will be allocated to it.
Hence removed it to avoid any unnecessary memory allocation.
Change-Id: If7b0cada91c97b21987f91e0ff7b7a15ce2145e2
Signed-off-by: Faiz Nabi Kuchay <quic_fkuchay@quicinc.com>
Use CONFIG_SND_SOC_AR to load ar conf for audio kernel.
Change-Id:I2598d21b28cfd02083d42116dcab4f25800bd089
Signed-off-by: Hexuan Zhu <quic_hexuzhu@quicinc.com>
Fix SWR cmd FIFO overflow error.
In 5.4 kernel there are few additional register writes added in soundwire driver,
one of the register(SWRS_DP_SAMPLE_CONTROL_2_BANK) write is causing overflow error.
Change-Id: I31f4855af52b24ceac53f55010ce1935c3bc1ea6
Signed-off-by: Shuai Zhang <quic_shuzhan@quicinc.com>
snd_event_dlkm is loaded as the first module.
Add init function and place mark in it to indicate the
start time of audio driver initialization.
Change-Id: Ie0c85b9166686d91f71ff773224eca59d85a36e5
Signed-off-by: Hongtao Peng <hongtaop@codeaurora.org>
Both APSS and ADSP are accessing CPU-0 FIFO when CPS is enabled
during speaker playback. This causes underflow issue when accessing
wsa register from APSS. Move APSS to CPU-1 FIFO to resolve underflow
issue.
Change-Id: I5ed9143bc78757468fbe4bcc686196149ca521f2
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Add support to use 4p8MHz DAC rate for receiver
over WSA.
Change-Id: Ia0811670326be8131687fbdff70464da063902b2
Signed-off-by: Laxminath Kasam <lkasam@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: Iec7c266fce76ce140a43f9e410126ad5560f5b81
Signed-off-by: Meng Wang <mengw@codeaurora.org>
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>
SSR notification may not come to swr master control
in time and cause swrm_runtime_resume tries to access
SWR registers. Update the logic to return when requesting
hw vote fails.
Change-Id: Ia85e9ce540ff88d16e8e73c48bab26fb277b86bb
Signed-off-by: Meng Wang <mengw@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.
Change-Id: I853f42d125eb5a60e3f1f065a60516877e3a463c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
LV Platform use the same LVGVM cause Kbuild mismatch issue
Change-Id: Iad092ebcbd991e52daedb87406920055528e3a1c
Signed-off-by: Hongtao Peng <hongtaop@codeaurora.org>
Remove static definitions of rx swr slave physical addresses.
Add support to read swr slave physical addresses from device
tree and store it within respective master data structure.
Revert addition of slave device address for wcd937x in soundwire
master.
Change-Id: I0eb2597b8e40a54d476cd2662bbe4f2008af899a
Signed-off-by: Vignesh Kulothungan <vigneshk@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: Ib0f6b026fe0e7fd3fbe052691db492915e436a78
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
Enable interrupt request only when the interrupt is
in disabled state.
Change-Id: I67795bf0ee344661e02b0fec3181cd7980d56652
Signed-off-by: Vignesh Kulothungan <vigneshk@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.
Change-Id: I505fcf349b45bd6f2374e5cfee83473f032e4ad7
Signed-off-by: Vatsal Bucha <vbucha@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>
At bootup device wakeup enable is called for all masters
causing issue for wsa on lahaina. This is because wsa
supports interrupts on lahaina. Thus enable device wakeup
only for tx master.
Change-Id: Ia53df31427e54d5fd981cd650e1b0f06cb2d47b5
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
When multiple slave ports are configured to a single master port,
the offset1 of master is the minimum of all slave port's offset1.
Change-Id: I102269806048ecf9982489164a7651a2cdd0661c
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
SWR overflow, underflow interrupts are seen sometimes on bootup.
Check whether devnum is 0 during fifo read and write. Also assign
read and write fifo depth before master init to resolve errors.
Change-Id: Id7b687985e320396d2f9dab69db56cc7f5426b04
Signed-off-by: Vatsal Bucha <vbucha@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>
Update sample interval in 4.8MHZ port config table of soundwire
digital mic slave and TX1 soundwire master port.
Update the block offset of soundwire digital mics 0 and 3 to handle
voip/sva dmic concurrency in both handset and speaker mode.
Change-Id: I85480c3609a72d4be3c4643b0123f09d71b97fef
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
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>
- Skip audio hm voting during bootup.
- Vote and unvote audio hm vote during swrm_runtime_suspend
and swrm_runtime_resume
Change-Id: I7a9c20f62ba0d87779b26da218bfe7373132b565