Commit Graph

4041 Commits

Author SHA1 Message Date
Phani Kumar Uppalapati
e7b87f2fcc Revert "soc: Fix PDR WSA auto-enumeration issue"
This reverts commit d17a0ca85e.

Change-Id: I23792f4926184f4e37afed59b08a870d7279979d
2022-06-27 23:37:31 -07:00
qctecmdr
0d5a471a08 Merge "asoc: Use VA_CORE_CLK for SVA use-cases" 2022-06-23 03:43:38 -07:00
qctecmdr
9743351d77 Merge "asoc: wcd938x: add ear pa gain kcontrol for wcd9385" 2022-06-22 23:25:28 -07:00
qctecmdr
649c828bbe Merge "audio-kernel: Add KERNEL_DLKM check flags" 2022-06-22 22:23:37 -07:00
qctecmdr
9553953215 Merge "soc: Fix PDR WSA auto-enumeration issue" 2022-06-22 21:16:16 -07:00
Prasad Kumpatla
ed84f5abe1 asoc: wcd938x: add ear pa gain kcontrol for wcd9385
add ear pa gain kcontrol for wcd9385.

Change-Id: I3ead7a76598d6cdee6223807c1720b6c66edbf71
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-06-14 11:22:01 -07:00
Josh Kirsch
cce6c43c67 audio-kernel: Add KERNEL_DLKM check flags
Add flags to only compile dlkms if system wide flags is true
or if the project specific flag is enabled.

Change-Id: I3a3bfcf4ceabef1c9d3a619de83a9a68caddf624
2022-06-13 12:26:44 -07:00
Phani Kumar Uppalapati
3b4d649430 asoc: Use VA_CORE_CLK for SVA use-cases
Use VA_CORE_CLK without LPI Enable Mixer control
for SVA use-cases on Kalama target.

Change-Id: I0ca66b786691ab3550b6cbc4ad418f2b536c58f4
2022-06-12 13:05:29 -07:00
Nimit Jain
3cc2ef661a ipc : audio-pkt: Add check to avoid invalid count size
Count should not be equal to or greater than this packet_size.
Add check to avoid invalid count size.

Change-Id: I1235425c0807f50784da9d7181c8e29d297b9013
Signed-off-by: Nimit Jain <quic_nimijain@quicinc.com>
2022-06-12 09:53:19 -07:00
Matthew Rice
d17a0ca85e soc: Fix PDR WSA auto-enumeration issue
During PDR, WSA auto-enumeration is swapped (WSA2
gets enumerated before WSA1 unlike bootup).
This causes offset1s to be swapped because dev_nums are
swapped and are used to index into device tree data.
Store dev_id during enumeration and use this instead of
dev_num to pick out offset1 from device tree data.

Change-Id: Ia98ba6554acf67055357625fc789065b60d7006b
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-06-10 11:35:44 -07:00
Prasad Kumpatla
3aa51212be asoc: lpass-cdc: fix for array out-of-bound
add fix for arry out-of-bound.

Change-Id: Ib73c41f4f9b14f21143d88b4d768285a674e5f65
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-06-06 11:38:52 -07:00
qctecmdr
806e22d256 Merge "asoc: codec: update wsa2 with wsa bat_cnfg,sys_gain,rloads." 2022-06-01 14:54:48 -07:00
qctecmdr
a041970a5d Merge "audio-kernel: select param id vote against sleep when enter to securezone" 2022-06-01 13:21:21 -07:00
Prasad Kumpatla
6a758782b1 audio-kernel: select param id vote against sleep when enter to securezone
select param id vote against sleep when enter to securezone with the help of
mixer ctl from pal.

Change-Id: Icb0d6aba4b13edc0658e676eb89c996d440e9971
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-05-27 12:51:23 +05:30
Matthew Rice
acc89c1a44 dsp: Add audio SSR traces for profiling
Adds traces before ssr shutdown and after powerup.

Change-Id: I77309be3e7598381117f6bdbf991f540a736b4f9
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-05-26 13:46:14 -07:00
Ganapathiraju Sarath Varma
ddd5081752 asoc: codec: update wsa2 with wsa bat_cnfg,sys_gain,rloads.
- update wsa2 macro with wsa bat_cnfg, sys_gain,
  rloads dt cnfg.

Change-Id: Idb579b460949a61579e8e27b8f0a4f911c271090
2022-05-23 22:09:58 +05:30
Meng Wang
14b172d92c asoc: lpass-cdc: update logic to vote during ssr
After ADSP is up during SSR, core_hw_vote may fail and audio_hw_vote
may successed in lpass_cdc_runtime_resume which is caused some timing.
When getting slave device_id, as core_hw_vote is 0, it will skip reading
swr registers and return 0 which causes fail to read correct device_id.
Make this change to avoid calling lpass_cdc_runtime_resume when adsp_up
notification doesn't reach lpass_cdc.

Change-Id: I90a97e5c47bb95180a96ba1c60b462f1fa0124b7
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
Signed-off-by: Kunlei Zhang <quic_kunleiz@quicinc.com>
2022-05-17 17:33:04 +08:00
qctecmdr
f3752c324e Merge "asoc: kalama: add wcd_disabled check in late_probe" 2022-05-16 17:12:48 -07:00
qctecmdr
2205759439 Merge "asoc: codecs: Update WSA2 Macro to Match WSA Macro" 2022-05-16 16:12:55 -07:00
qctecmdr
401747d67f Merge "asoc: codecs: support for cps soundwire port" 2022-05-16 16:12:55 -07:00
qctecmdr
0c71807fcc Merge "soc: Fix SWRM DIN Addresses and CPS offset1" 2022-05-16 15:31:02 -07:00
qctecmdr
62975d84b8 Merge "asoc: codes: Update WSA Macro compander dly to 7" 2022-05-16 15:31:02 -07:00
qctecmdr
8ee1e5960e Merge "asoc: update digital_cdc_rsc_mgr_hw_vote API" 2022-05-16 14:01:02 -07:00
Matthew Rice
b51b1435d6 soc: Fix SWRM DIN Addresses and CPS offset1
SWRM_DIN_DP_* registers are based on incorrect register values.
Update to match correct hardware addresses.
Also fix tabs/spaces mismatch in same file.
Fix CPS offset1 port parameter to be 0 instead of 0xff.

Change-Id: I641a925f1f3b454a6af0d2491d86459131bba2cf
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-05-12 14:43:58 -07:00
Vangala, Amarnath
9a5deb8cc6 asoc: codecs: support for cps soundwire port
Implement backend for CPS soundwire port in Bolero.

Change-Id: Ibbd38d067e46be1a71723de04a83bc83f0ec2925
Signed-off-by: Vangala, Amarnath <quic_avangala@quicinc.com>
2022-05-12 21:38:25 +05:30
Matthew Rice
c3cddd0b43 asoc: codecs: Update WSA2 Macro to Match WSA Macro
Propagate all changes to lpass-cdc-wsa-macro to
lpass-cdc-wsa2-macro. Leave get_channel_map alone
because it is wsa macro specific.

Change-Id: I46733a759490d488f46eda24b4006a1dec63c7cc
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-05-10 14:11:40 -07:00
Prasad Kumpatla
c9930cc8d8 asoc: lpass-cdc: fix for array out of bounds for active ch mask and ch_cnt
update check not to exceed the array index for active_ch_mask and active_ch_cnt

Change-Id: Ic6d72d7469edbd004cd34a709384d527e90cd26f
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-05-09 10:26:33 +05:30
Meng Wang
95c95b2d67 asoc: update digital_cdc_rsc_mgr_hw_vote API
Update digital_cdc_rsc_mgr_hw_vote_enable/disable API with device
info for easy debug. Also, add swrm clock enable checks during SSR.
When SSR happens, swrm->hw_core_clk_en and swrm->aud_core_clk_en will
be reset without resetting audio_vote and core_vote clk. This would
cause clk mismatch in audio driver and adsp and device fails suspending
when there's no audio usecase. Make this change to reset audio_vote
and core_vote clk when receiving SWR_DEVICE_SSR_DOWN.

Change-Id: I9875aac9f6faf8b6481457a70f31b005073369e0
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
2022-05-06 10:50:36 -07:00
Matthew Rice
68469d7946 asoc: codecs: Shorten IDLE holdoff time
Decrease idle holdoff time from 60 to 29 samples as per updated
documentation.

Change-Id: Ia8786020d6de8320f057f418e743507030c734c8
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-05-06 10:41:28 -07:00
Matthew Rice
8027610611 asoc: codes: Update WSA Macro compander dly to 7
New requirement to update compander_ctl7 again_delay
field to 7.

Change-Id: I4c5ef15c645cabded50203bf92facbe7c8ff8c5b
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-05-06 10:35:02 -07:00
Prasad Kumpatla
17130d8e4b asoc: kalama: add wcd_disabled check in late_probe
Add wcd_disabled check in late_probe to avoid checking
wcd component when WCD is disabled.

Change-Id: I0de73a09f1bdfffac1412a4c1f8f8ec5e64e4c4b
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-05-05 00:01:10 -07:00
Prasad Kumpatla
42e49611b0 asoc: common: correct buffer overflow array index Out of Bounds
Add range check for ch_cnt value to avoid buffer overflow.

Change-Id: Iad18ea2fa42057211dc98c9d80465687cbc62776
2022-05-04 03:30:39 -07:00
qctecmdr
6642ce7a89 Merge "asoc: swr-haptics: Handle VMAX_CLAMP notification" 2022-05-03 18:09:41 -07:00
qctecmdr
0cbf88ed1d Merge "asoc: codecs: Set WSA884X Compander ON by default" 2022-05-03 13:28:07 -07:00
qctecmdr
a6c0e859aa Merge "asoc: codecs: Change WSA SPKRRECV control to bool" 2022-05-03 13:03:17 -07:00
qctecmdr
372908eb84 Merge "asoc: codecs: Add bat cfg check" 2022-05-03 12:37:52 -07:00
qctecmdr
a69a167322 Merge "asoc: codecs: Fix WSA Offset1, BP Mode SWR config" 2022-05-03 11:43:03 -07:00
qctecmdr
995cee83f6 Merge "asoc: codec: Fix WSA SWRS Reg Dump" 2022-05-02 21:08:21 -07:00
qctecmdr
f6b4d8a856 Merge "asoc: codecs: Revamp dev_index uses" 2022-05-02 20:41:28 -07:00
qctecmdr
86e51fdfde Merge "asoc: codecs: Fix PBR Battery stack settings" 2022-05-02 20:11:51 -07:00
qctecmdr
a487c04610 Merge "ASoC: kalama: Add support for WSA883X speaker amp" 2022-05-02 14:37:33 -07:00
qctecmdr
caf87b0f27 Merge "asoc: codecs: Update types of dmic_clk_enable call" 2022-05-02 11:27:36 -07:00
qctecmdr
e1150e5ac2 Merge "ipc: gpr-lite: Add wake lock with timeout while handling callback" 2022-05-02 08:28:25 -07:00
Matthew Rice
4a43e97d76 asoc: codecs: Set WSA884X Compander ON by default
Due to certain write-once registers needing to be set during
bootup, assume that compander on will be the default usecase, unless
haptics SKU is used.

Change-Id: I7903f3a4bf1eae82b4b9302ddc4f1e4c59d2cad3
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-04-27 14:36:54 -07:00
Matthew Rice
c117389d88 asoc: codecs: Change WSA SPKRRECV control to bool
Update from SOC_ENUM to SOC_SINGLE to match rest of driver
implementation. Also remove remaining dev_mode enum references
in wsa884x driver.

Change-Id: I2a477c4fa8c29373ffa1e8e2eb599a0f1c61653d
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-04-27 10:52:03 -07:00
Shazmaan Ali
16a78f8cb3 asoc: codecs: Add bat cfg check
Add check to validate bat cfg,
bat cfg register read compared to dts read

Change-Id: Ib62ae3b3535a75dbc7c71b2b2ac3752fb2e61156
Signed-off-by: Shazmaan Ali <quic_shazmaan@quicinc.com>
2022-04-21 19:08:30 -07:00
Matthew Rice
ba5d48660f asoc: codecs: Fix WSA Offset1, BP Mode SWR config
Update settings to match how swr_mstr_ctrl driver is using the
SWR settings to set the registers. Previously, an offset1 of
0xFF would write 0xFF to the register instead of skipping it, unlike
other swr settings. This is similarly true for SWR Slave setting
for bp_mode.

Change-Id: I3c5b2635c5a88a52639cbac9455a544d5cfee154
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-04-21 14:58:38 -07:00
Matthew Rice
f07906e34d asoc: codec: Fix WSA SWRS Reg Dump
Add missing 0x60, 0x70, 0xC0, 0xC1, 0xC8
to reg dump for better debugging.

Change-Id: I6e7174e432d562c44eba2282ff3c03f513ebc960
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-04-20 10:03:13 -07:00
Matthew Rice
22d45f2149 asoc: codecs: Revamp dev_index uses
Add mod % 2 to allow dev_index to work with WSA2 Macro.
Also fix issues associated with incorrect parameter
checking of dev_index leading to potential array index
out-of-bounds issues.
Change WSA MODE mixer control to be SOC_SINGLE_EXT for
extra parameter validation.

Change-Id: I030ee64d87fa60c6b44feebf5ccb1265f4291cc1
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-04-18 14:03:07 -07:00
Matthew Rice
0642af910a asoc: codecs: Update types of dmic_clk_enable call
Match datatypes of variables in
lpass_cdc_va_macro_enabl_dmic() with
lpass_cdc_dmic_clk_enable() to prevent CFI issues.

Change-Id: Id378476b1aa6231c8542ca754124716af2b1f50b
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-04-18 13:41:11 -07:00