Update WSA rload, system gain, bat_cfg to get from wsa_macro device tree.
WSA Bat_cfg change to read from VPHX_SYS_EN_STATUS reg.
Add device tree parsing for these params in WSA macro
and WSA driver.
Remove machine driver method of sending the parameters.
Add default_dev_mode (spkr vs rcv) from device tree for WSA.
Move code from spkr event to userspace controls or probe.
Change system_gain and affected params when switching between
dev_modes.
These changes simplify configuration data and code and allow
more registers to be written during bootup or before playback.
Change-Id: I79966c704adfac1bf2d85aa6519ea574764c7a8b
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
audio-rounting widgets are not expected to be defined when
it is using stub soundcard in RUMI validation.
Late probe is for WCD MBHC, which is also not enabled in the
RUMI validation.
Change-Id: Ibae76ef298aaa6db25eaef3d390fe885f8a06ad7
Signed-off-by: Junkai Cai <quic_junkai@quicinc.com>
When device enters LPM, it hurts audio latency as
CPU spends more time in entering/exiting LPM.
Hence, for LL and/or ULL, LPM is disabled.
Add pm qos mixer controls for cpu affinity and
increase the delay for the cores to enter LPM mode.
Change-Id: I3aa2d17f6b3ec3ffad180205085bd2f4961858b7
Signed-off-by: Srinivas Marka <quic_smarka@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: I5800d9505a3036127097745aaa880b73b3e87f30
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
Udpate MSM DMIC power up sequence to reduce pop.
Change-Id: I5f3f2e439e31877d3f21c05575c95942b937252e
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
Fix isense/vsense gain tables to correct values.
Mark ana_wo_ctl registers as volatile.
Move VBAT_THRM_FLT_CTL to init reg sequence.
Change-Id: Ie04f302719f08b35f1ef9807dff7993c31e3aa43
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
Add PBR, CPS port types and port parameters for WSA
Update RX and TX port types to include full list of ports
Change-Id: I5b69ee777addebcf4167dccd4ce4ab0af31b754d
Signed-off-by: Matthew Rice <quic_mrice@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.
Change-Id: I013f546d7f1ca6077f0b14e875b135a27325f851
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
Update correct register mask for FIFO overflow/underflow
to avoid any potential issue.
Change-Id: Ie6220b1f653d1ec76ecc48a3dfa73aea39608e55
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>
Interrupt from wsa884x are not handle as slave_irq is not set.
Add slave_irq for wsa884x to address this issue.
Change-Id: I82edb35b55f6a46d79bd96b7f0f4bfac58583860
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
In case of error scenario for get_tdm_clk_id/get_mi2s_clk_id, storing the
return value into uint32 clk_id which is always positive and does not handle
the invalid clk ids failure. So modify the incorrect comparsion.
Change-Id: I1e606709cd3c11a24a39679bcee638a045804961
Signed-off-by: Prasad Kumpatla <pkumpatl@codeaurora.org>
When interrupts are triggered on the second or third interrupt
status register, current logic cannot clear that interrupt status
after handling it. Enable use_single_read for wsa and wcd regmap
to resolve the issue.
Change-Id: Ieac57e169505d4455dde1dcd0e80e222e3e8eb1e
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
Simplify register write logic for PCM ports due to multi-ee changes.
Update SWRM_MCP_CTRL to SWRM_CLK_CTRL(ee).
Change-Id: I36e78f3f2abdb65925b141d5192adf618697d674
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
Conforms to latest hardware DRE documentation
Change-Id: Ia08b03f519697723e9e260451c5bc68b4b45724c
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
For SVA usecase, BCS is not needed. For other usecase,
BCS is enabled. When voicecall and SVA are running
concurrently and do device switch between headset-mic
and handset-mic, BCS SWR port may not get closed when
teardown headset-mic. When closing ADC2, check BCS_STATUS_MASK
only and remove check for bcs_disabled flag to make sure
BCS SWR port is closed.
Change-Id: I01b1cadc0143a4f46eb6a04c3fc8a2509aa13ec3
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
With moisture_en flag being set as true for legacy moisture detection,
need to check if duty cycle is also enabled so as to report headset
insertion/removal properly when moisture detection enabled.
Change-Id: I6014e2e047d7c33b16bf9229ee1901fd8d042b47
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
If the userspace which has allocated & hyp assigned the CMA
memory crashes, the crash handler is just freeing the memory
without calling hyp assign to get access back. This leads
to crash when freeing the memory as HLOS driver does not have
access to memory.
Fix this by calling hyp_assign to get access back to
HLOS driver.
Change-Id: Ic04736cf241eb7e310b8ce0af260e147f4d1edc6
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
Signed-off-by: Akhil Karuturi <akarutur@codeaurora.org>
Compile for kalama chipset.
Replace wsa883x in kbuild/conf/mk files
Change-Id: I38910d7724e2b95ba79548f46dc152ccf63823ef
Signed-off-by: Matthew Rice <mrice@quicinc.com>
Driver implementation for WSA884X.
Use new script to generate register files.
Modify register naming convention.
Add wsa884x-reg-masks.h and wsa884x-reg-shifts.h
Reverting copyrights to 2019 for wsa884x.h file
Change-Id: Ic3652d6138a2f62ba59a36d4307c732ab6e8db89
Signed-off-by: Shazmaan Ali <shazmaan@codeaurora.org>
Display HDMI codec driver is not ready yet at this point.
It is not necessary for audio bringup on the kailua RUMI,
so the module is removed temporarily
Change-Id: Icca4e516b11d96252e928a4c9dda59f338e98cca
Signed-off-by: Junkai Cai <junkai@quicinc.com>
dma buffer virtuall mapping API has been updated in the kernel
update the ion driver to match the new interface
Change-Id: I3aab0609b91da7efcfb03dac99961ace498d79f3
Signed-off-by: Junkai Cai <junkai@quicinc.com>
Port drivers for Linux kernel 5.15(or after).
Remove unused headers that not present in the new kernel.
Update function interface matching API updates in the kernel.
Change-Id: Ibdffbe20c0b65b2ddda958d6a32c493696e15768
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
add kalama config file to all drivers' Kbuild, including soc/dsp/ipc
Change-Id: I56a6092da515f211a56617f0cff60079dbf0aa39
Signed-off-by: Junkai Cai <junkai@quicinc.com>
original logic will skip audio compiling even
TARGET_USES_QMAA_OVERRIDE_AUDIO flag is true when global QMAA is true.
update the logic to keep audio driver compiled if override is taking effect.
Change-Id: I21c3a9b48aea75f180eab4391d48976450944a69
Signed-off-by: Junkai Cai <junkai@quicinc.com>
In the function call get_mi2s_tdm_auxpcm_intf_index(...),
updated stream_name sanity check (if condition) to avoid
short-circuit scenarios causing FM Radio to be muted.
Change-Id: Ia3e500a49b4af2beda8af35d1f472662918d9c1b