Graf commitů

3911 Commity

Autor SHA1 Zpráva Datum
Matthew Rice
311264875e asoc: codecs: Change WSA config params acquisition
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>
2022-01-20 21:29:37 -08:00
Junkai Cai
6086cb0692 asoc: skip audio-routing and late probe with stub soundcard
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>
2022-01-20 13:07:19 -08:00
Linux Build Service Account
d97c5c5809 Merge "ASoC: wsa884x: Handle PA_ERR interrupt on WSA speaker" into audio-kernel.lnx.5.15 2022-01-17 06:37:00 -08:00
Srinivas Marka
86f969d03d asoc: add pm qos mixer controls
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>
2022-01-13 19:23:47 +05:30
Prasad Kumpatla
c78f788fac ASoC: wsa884x: Handle PA_ERR interrupt on WSA speaker
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>
2022-01-10 10:25:06 -08:00
Meng Wang
72189f1f59 asoc: lpass-cdc: udpate MSM DMIC power up sequence to reduce pop
Udpate MSM DMIC power up sequence to reduce pop.

Change-Id: I5f3f2e439e31877d3f21c05575c95942b937252e
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
2021-12-15 19:09:04 -08:00
Matthew Rice
f21b04af12 asoc: codecs: Fix WSA884X init and playback reg writes
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>
2021-12-09 09:09:12 -08:00
Matthew Rice
a0a83d7e42 asoc: Update SWR Port Types for Kalama chipset
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>
2021-12-09 08:54:57 -08:00
Prasad Kumpatla
2dacb122a3 asoc: wsa884x: update irq_drv_data per wsa device
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>
2021-12-07 10:29:05 -08:00
Linux Build Service Account
af2e431272 Merge "asoc: use ASoC API to set driver component name prefix" into audio-kernel.lnx.5.15 2021-12-07 10:26:29 -08:00
Meng Wang
787d1e3f92 soc: swr-mstr-ctrl: update correct mask for FIFO overflow/underflow
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>
2021-12-07 09:53:17 -08:00
Junkai Cai
97e37eeee3 asoc: use ASoC API to set driver component name prefix
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>
2021-12-07 09:53:13 -08:00
Linux Build Service Account
7795165e0a Merge "asoc: codec: enable use_single_read for wsa and wcd regmap" into audio-kernel.lnx.5.15 2021-12-07 09:51:20 -08:00
Linux Build Service Account
d8e8bd039e Merge "asoc: common: modify the incorrect comparsion" into audio-kernel.lnx.5.15 2021-12-07 09:50:20 -08:00
Prasad Kumpatla
4ed625474c asoc: wsa884x: add slave_irq for wsa884x
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>
2021-12-07 09:16:44 -08:00
Prasad Kumpatla
fd473434d7 asoc: common: modify the incorrect comparsion
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>
2021-12-07 09:16:02 -08:00
Meng Wang
0bd4c39e4e asoc: codec: enable use_single_read for wsa and wcd regmap
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>
2021-12-07 09:15:42 -08:00
Linux Build Service Account
ffbb0c4a5b Merge "ASoC: codecs: mbhc-adc: Check if moisture duty cycle enabled during elec rem irq" into audio-kernel.lnx.5.15 2021-12-07 08:54:51 -08:00
Linux Build Service Account
5309712cdf Merge "soc: Fix PCM Port Config and CLK_CTRL Writes" into audio-kernel.lnx.5.15 2021-12-07 08:54:50 -08:00
Linux Build Service Account
4f427aa9f4 Merge "dsp: call hyp_assign during clean up" into audio-kernel.lnx.5.15 2021-12-07 08:53:49 -08:00
Linux Build Service Account
57366b5e90 Merge "asoc: wcd938x: update logic to close BCS correctly" into audio-kernel.lnx.5.15 2021-12-07 08:53:49 -08:00
Matthew Rice
0209346e14 soc: Fix PCM Port Config and CLK_CTRL Writes
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>
2021-12-06 10:39:03 -08:00
Linux Build Service Account
e898bc09d6 Merge changes I08cfabaa,Ia08b03f5 into audio-kernel.lnx.5.15
* changes:
  asoc: kalama: Fix wsa configuration parameters
  asoc: codecs: Add WSA884X DRE Settings
2021-11-30 06:33:49 -08:00
Linux Build Service Account
cc3d51f79a Merge "Revert "asoc: remove HDMI codec drivers for 5.15"" into audio-kernel.lnx.5.15 2021-11-30 06:32:49 -08:00
Matthew Rice
ce3f8d5504 asoc: kalama: Fix wsa configuration parameters
Previous parameters are not valid.

Change-Id: I08cfabaa4732d6eac47ea31dfff82343eeedf902
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2021-11-24 11:23:15 -08:00
Matthew Rice
b70a4759b3 asoc: codecs: Add WSA884X DRE Settings
Conforms to latest hardware DRE documentation

Change-Id: Ia08b03f519697723e9e260451c5bc68b4b45724c
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2021-11-24 11:19:42 -08:00
Meng Wang
f48ad4780a asoc: wcd938x: update logic to close BCS correctly
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>
2021-11-24 03:47:53 -08:00
Vatsal Bucha
5f65bb9592 ASoC: codecs: mbhc-adc: Check if moisture duty cycle enabled during elec rem irq
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>
2021-11-24 01:35:45 -08:00
Vikram Panduranga
d42016b9c4 dsp: call hyp_assign during clean up
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>
2021-11-23 23:59:20 -08:00
Junkai Cai
dc11a650a2 Revert "asoc: remove HDMI codec drivers for 5.15"
add HDMI codec drivers compilation

This reverts commit a36cfd915c.

Change-Id: I7ca345d066494303c9a66dec82cd8e98e8b5e6cc
2021-11-17 11:45:38 -08:00
Matthew Rice
1b69ddf3c3 asoc: Replace wsa883x with wsa884x in machine driver
Add bat_cfg, system_gain, and rload parameters to properly configure wsa884x

Change-Id: Ibb4de17a9935f178293bc17314784ff87a978815
Signed-off-by: Matthew Rice <mrice@quicinc.com>
2021-11-09 15:33:09 -08:00
Matthew Rice
cb9ebaa0b7 soc: Initial Register Updates for SWRM2p0
Change-Id: If4bc240017cbec8c536ecfbbdb327231caa037da
Signed-off-by: Matthew Rice <mrice@quicinc.com>
2021-11-09 15:32:53 -08:00
Matthew Rice
08ad1635a5 asoc: codecs: Initial lpass-cdc 2.6 implementation
Update register headers, add version 2.6 string.

Change-Id: I6236ddebba3fcbb37f2a64c8638d4eea4f6cc062
Signed-off-by: Matthew Rice <mrice@codeaurora.org>
2021-11-09 15:32:30 -08:00
Matthew Rice
364ecf5de5 audio-kernel: Enable compilation of wsa884x
Compile for kalama chipset.
Replace wsa883x in kbuild/conf/mk files

Change-Id: I38910d7724e2b95ba79548f46dc152ccf63823ef
Signed-off-by: Matthew Rice <mrice@quicinc.com>
2021-11-09 15:25:45 -08:00
Matthew Rice
da73d84e5a asoc: codecs: Update SWR Ports with CPS & PBR
Reflecting latest hardware SWR updates.

Change-Id: I8a4c647e3a0a4e4b958dd102efa04a66fbce4618
Signed-off-by: Matthew Rice <mrice@codeaurora.org>
2021-11-09 15:24:38 -08:00
Matthew Rice
e9193b07c0 asoc: codecs: Update wsa884x dev_index to match uniq id
WSA884X has different uniq id than WSA883X

Change-Id: Ibb785f3edcc0ae4e8a79849bd8f01a891f5b46ae
Signed-off-by: Matthew Rice <mrice@quicinc.com>
2021-11-09 13:33:56 -08:00
Matthew Rice
cdcdcac0df asoc: codecs: Update register initialization sequence
Add latest register sequence.
Remove version 1_2.
Update header files with latest registers.

Change-Id: I92f56e5ec2be4e695d42cec8610b9b9300410b02
Signed-off-by: Matthew Rice <mrice@codeaurora.org>
2021-10-28 16:52:38 -07:00
Junkai Cai
179ce4f13f asoc: codecs: Implement codec driver for WSA884X
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>
2021-10-28 16:52:18 -07:00
Junkai Cai
a36cfd915c asoc: remove HDMI codec drivers for 5.15
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>
2021-10-28 16:51:43 -07:00
Junkai Cai
9e6c568c5d asoc: Add machine driver for kalama target
Add a new machine driver file for kalama target

Change-Id: Id0087e3b4ce9c39398853d5cfa2318756f75c007
Signed-off-by: Junkai Cai <junkai@quicinc.com>
2021-10-28 16:51:34 -07:00
Junkai Cai
d51e529a44 dsp: update audio ion driver to support new kernel
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>
2021-10-28 16:51:22 -07:00
Junkai Cai
11b2aeb0c9 asoc: update asoc and ipc drivers for kernel 5.15
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>
2021-10-28 16:47:53 -07:00
Junkai Cai
bd4a663a65 asoc: add config files to support kalama
add kalama config file to all drivers' Kbuild, including soc/dsp/ipc

Change-Id: I56a6092da515f211a56617f0cff60079dbf0aa39
Signed-off-by: Junkai Cai <junkai@quicinc.com>
2021-10-27 14:37:34 -07:00
Junkai Cai
1c386e34fc QMAA: comiple audio driver when OVERRIDE_AUDIO is true
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>
2021-10-15 09:49:19 -07:00
qctecmdr
0344535630 Merge "asoc: msm_common.c: update stream name sanity check" 2021-10-03 06:07:26 -07:00
qctecmdr
8f8cb16a84 Merge "asoc: lpass-cdc: reset RX_TX_CORE_CLK and WSA_TX_CORE_CLK during SSR/PDR" 2021-10-03 06:07:25 -07:00
Harold Tan
31b4d5b834 asoc: msm_common.c: update stream name sanity check
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
2021-09-30 22:55:20 -07:00
qctecmdr
265371da54 Merge "soc: swr-mstr: Fix headset detect issue during clk stop wakeup" 2021-09-29 21:34:47 -07:00
qctecmdr
5241d83570 Merge "asoc: waipio: Initialize rtd value's before calling it." 2021-09-29 21:34:47 -07:00
qctecmdr
71e390c5c6 Merge "soc: copy new header file for pinctrl and regmap from kernel" 2021-09-29 21:34:47 -07:00