Revīziju grafs

3974 Revīzijas

Autors SHA1 Ziņojums Datums
Shazmaan Ali
572fd25838 asoc: codecs: Add Idle detect source select condition
Use LEGACY source if any of the below use cases is met:
EAR, PBR OFF, IDLE, NG2 and PA GAIN <= 13.5dB
Use PRE-LA when: All other cases

Change-Id: Iace0c1f6fea367a73cd604b958bd5c8905d29509
Signed-off-by: Shazmaan Ali <quic_shazmaan@quicinc.com>
2022-04-11 07:04:48 -07:00
qctecmdr
99585c50e4 Merge "soc: Fix SWRM_VERSION_2_0 value" 2022-04-07 11:06:22 -07:00
qctecmdr
dde20c8484 Merge "asoc: codecs: Change LPASS DRE to use WSA sys_gain and bat_cfg" 2022-04-07 11:06:22 -07:00
qctecmdr
dc6389ce69 Merge "asoc: codecs: Add nullptr check" 2022-04-07 11:06:22 -07:00
qctecmdr
f1833cf0e8 Merge "asoc: Add dummy PCM backend" 2022-04-07 11:06:22 -07:00
qctecmdr
a35ade3c7d Merge "asoc: wsa883x: add slave_irq for wsa883x" 2022-04-07 11:06:22 -07:00
Phani Kumar Uppalapati
cd3f734089 asoc: wsa883x: add slave_irq for wsa883x
Interrupt from wsa883x are not handled as slave_irq is not set.
Add slave_irq for wsa883x to address this issue.
(cherry-picked from commit ddfc43e7c48dcbe9bbae45b5caacdd5bca441800)

Change-Id: I6b56aa88cca895e4e0e5871a7478f6859d45b03f
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2022-03-31 19:13:06 -07:00
Phani Kumar Uppalapati
2f03655808 asoc: wsa883x: 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.
(cherry-picked from commit 1852682fbcebfb9f479c3d09a91c075049b90253)

Change-Id: I6ac0520a4074d74dfb28122e06eed6a86374c0ce
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2022-03-31 19:12:51 -07:00
Phani Kumar Uppalapati
cace0a8255 ASoC: wsa883x: 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: I0490d4cdd6379ed779ce7f54ec8b56d5a7af0649
Signed-off-by: Phani Kumar Uppalapati<quic_phaniu@quicinc.com>
2022-03-31 19:12:33 -07:00
Kunlei Zhang
d007a64c4b asoc: codecs: update WSA dapm_ignore_suspend pin names
Update to 5.15 kernel dapm api.
Pin name no longer needs prefix as it is added in API.

Change-Id: Ibf967dd01a36decdf904eff9d5af2e315aa53f1c
Signed-off-by: Kunlei Zhang <quic_kunleiz@quicinc.com>
2022-03-31 19:12:14 -07:00
Meng Wang
2a7c4c286e ASoC: wsa883x: Enable all WSA interrupts
Only UVLO_irq, PA_ON_ERR_IRQ and PDM_WD_IRQ are enabled
on wsa883x. Enable all other IRQs to monitor if WSA is in
bad state.

Change-Id: Ia78f12520eda4b26c00776583a78b14b74771e0e
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
2022-03-31 19:11:51 -07:00
Meng Wang
b19ddc0ca2 asoc: wsa883x: update default value for VBAT_ATTN
With current setting for VBAT_ATTN1/2/3, pop is heard when
battery is low. Update default value for these registers
to resolve pop issue.

Change-Id: Ic4002a4b30ecd04b04001ca5f16bac5745a803d7
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
2022-03-31 19:11:37 -07:00
Annemarie Porter
bb89ad1722 asoc: Add dummy PCM backend
Add dummy PCM backend definition for virtual devices.
This is being added to support echo reference capture.

Change-Id: I7830f9adf963397d06b837add3f9e1c0fe31563c
2022-04-01 07:37:47 +05:30
Meng Wang
e13418a3ca asoc: wsa883x: add support for updating analog gain
Add support for updating analog gain.

Change-Id: Icb090a86672d154bb0a8e22ce7fffeccea060604
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2022-03-31 18:51:47 -07:00
Shazmaan Ali
b9c1e1fc66 asoc: codecs: Add nullptr check
fix for nullptr deref issue

Change-Id: I55b49354b17bcf32e6bd4651c297a8fd71dc68c2
Signed-off-by: Shazmaan Ali <quic_shazmaan@quicinc.com>
2022-03-31 18:50:59 -07:00
Srijan Magapu
77363afeba audio-kernel: I2S/TDM backend dai-links tertiary MI2S
Change-Id: I56cb744c0399b3f8e049c13c68ad0dbd7ead94a6
2022-03-31 18:48:37 -07:00
Matthew Rice
f97140fce0 asoc: codecs: Change LPASS DRE to use WSA sys_gain and bat_cfg
Can now set these registers during init once these values are
acquired.
Method called again before playback in case there are
speaker/recv changes.

Change-Id: I1b544633a660e98acadf94b9589b7656edebdd56
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-03-31 12:35:56 -07:00
Matthew Rice
f23bc97308 soc: Fix SWRM_VERSION_2_0 value
Update version value to match swrm HW_Version register
Fixes an error message seen in logs.

Change-Id: Ia2d6f97b8f11305d73705e2c401af1f013af94bc
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-03-31 12:35:00 -07:00
Matthew Rice
5be0a8ab7d asoc: codecs: Fix lpass_cdc_dmic_clk_div arg type
Update mode argument type from int to u32 to avoid
any potential data loss since input is also u32 type.

Change-Id: I9541a7da20d2a22a0066622736268adffde5adbf
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-03-31 12:35:00 -07:00
Matthew Rice
448e5c5a77 asoc: codecs: Implement WSA IRQ retry/shutdown scheme
Whenever there is an interrupt,
mute the PA, then wait 1ms and unmute the pa and
check for another interrupt. Then if there are still interrupts,
retry muting and unmuting the pa with delay.
If interrupts persist, the PA will remain muted until there is a
usecase teardown or reset.

Change-Id: Ic59fc33d4606c1c630a61796d513a9ec99a4979c
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-03-31 12:34:31 -07:00
qctecmdr
2e08677b22 Merge "asoc: codecs: Add WSA init reg writes" 2022-03-30 22:27:10 -07:00
Matthew Rice
5403d47a9a asoc: codecs: Add WSA init reg writes
Update to latest sequence from WSA hardware systems team.
Add writes for VADC, BG, Boost

Change-Id: Ic61e1c36154ff673fce05546332e89fe683a3075
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-03-24 22:30:07 -07:00
Matthew Rice
f5d8dd3262 asoc: codecs: Add RX 6,7,8 to WSA Macro
Add new lpass RX paths. Needed to fix
WSA ADIE Loopback.
Update DAPM enum length to include these RXs.

Change-Id: Ie174cfab20b8beb103eefa94636e76ad756c7345
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-03-24 22:24:35 -07:00
Srijan Magapu
4a4b666ba0 audio-kernel: I2S/TDM backend dai-links
Add support for I2S/TDM backend dai-links for Kalama target

Change-Id: I0504a030afc534207d2d40ba6fd7fcebb2bb40f1
2022-03-24 22:15:51 -07:00
Shiv Maliyappanahalli
cb778a4ecd asoc: add ext-display module dependencies
Enable CONFIG_MSM_EXT_DISPLAY and link external display module
in audio to enable displayport audio.

Change-Id: I43f8821ec7612422b6a09c9631b038ceb17b1e44
2022-03-15 05:26:21 -07:00
qctecmdr
906c4aaa44 Merge "asoc: codecs: Resolve checkpatch errors" 2022-03-15 04:03:28 -07:00
Josh Kirsch
abf15450cf audio_kernel: update for techpack related compilation
Change-Id: I7440bf5c0f78c1889112a4de92f5341c817dd713
2022-03-15 02:39:24 -07:00
Shazmaan Ali
b62c934b61 asoc: codecs: Resolve checkpatch errors
Change-Id: I33dca97f388b524c7476e0da0ea8b1cbca4b849c
Signed-off-by: Shazmaan Ali <quic_shazmaan@quicinc.com>
2022-03-15 02:39:22 -07:00
Matthew Rice
2e70df2efe asoc: codecs: Add checking of WSA SWR dt params
Add to avoid crashing related to device tree parsing
of SWR port params.

Change-Id: Id839cc908fb5f7843e5fd6260b3205c8844349ba
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-03-10 10:18:23 -08:00
Matthew Rice
9d7405ec04 asoc: codecs: Fix Bolero and WSA out-of-range variables
Found potential issues relating to uninitialized or out-of-bounds variables
present in codec drivers. Place checks to ensure proper ranges are used.

Change-Id: Ib68cba2413788a57237f1f18fc5ce5fb5c6bfb0a
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-03-02 22:02:03 -08:00
Meng Wang
018369d65f soc: swr-mstr-ctrl: remove FIFO_Flush for overflow
FIFO_Flush should only be for SWRM_INTERRUPT_STATUS_CMD_ERROR.
For other usecase, it should not be flushed otherwise it would
cause register write mismatch and cause some sideeffect.

Change-Id: I6d40a30129dfdf48993125fb57042ab97a13a631
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
2022-03-02 22:02:00 -08:00
Matthew Rice
3a6ef472dd asoc: codecs: Enable custom WSA SWRS port settings
For PBR and CPS ports, need the ability to customized slave
SWR frame OFFSET1 settings. Add similar method to WCD TX where
offset1 and lane_ctrl parameters are parsed from WSA device tree
and configured in SWRM.

Change-Id: Ib973ed93d9daa5ba02461a156e5b0a8c816d371e
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-03-02 22:01:34 -08:00
qctecmdr
8d3fde6573 Merge "asoc: Fix PBR SWR port config" 2022-03-01 20:51:35 -08:00
Matthew Rice
dd886964e0 asoc: Fix PBR SWR port config
Update HSTOP from 0 to 8 to match configuration.
Also fix slave ch en from 2 ch to 1 ch.
This fix resolves port collision/bus clash issues.

Change-Id: I91c6fe80a9db88d029e4ef81c7a06480a767b170
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-02-28 08:36:55 -08:00
Matthew Rice
0aca66e5fe soc: swr-mstr-ctrl: Add a uniq CMD_ID for every slave action
For all FIFO_WR/RD_CMDS, add function that increments cmd_id
every time for easier sw debugging.

Change-Id: I53d133d9b427dd6b80201aab3c6f367600e82bfc
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-02-28 08:36:52 -08:00
Phani Kumar Uppalapati
2b5f3e4778 va-macro: Use DT property for selecting the clock ID
Use device tree property "qcom,use-clk-id" for selecting
the clock ID for VA Macro operation.

Change-Id: I759c690ab7f6dc7ca023d5954e9b445a7b91b1b6
2022-02-28 00:18:39 -08:00
Phani Kumar Uppalapati
0ceec6c1ac audio-kernel: select RCO clock if lpi PCM logging is enabled
Select clock root as RCO for VA use-case whenever LPI
PCM logging feature is enabled.

Change-Id: I461b2afb9eeb595975d550d56c54e7548f0f2130
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2022-02-27 23:55:47 -08:00
Matthew Rice
b6785ab5bc soc: swr-mstr-ctrl: Remove SI_HIGH write if > 0xFF
Slave reg SAMPLE_CONTROL_2_BANK (0x23) should only be written
when sample interval is > 0xFF otherwise we get CMD_Ignored IRQ.
Also add handling for this CMD_IGNORED_AND_EXEC_CONTINUED Irq.

Change-Id: I4693fb17ba78c73d4fda2e4ddce9fa6e0311309d
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-02-27 22:01:38 -08:00
qctecmdr
b622e92a38 Merge "asoc: codecs: Fix WSA dapm_ignore_suspend pin names" 2022-02-25 22:58:48 -08:00
qctecmdr
5239aa7d5c Merge "asoc: return correct index id for secondary mi2s stream-name" 2022-02-23 23:42:07 -08:00
Phani Kumar Uppalapati
69448e2228 asoc: return correct index id for secondary mi2s stream-name
Check and return correct index id for secondary mi2s
stream name.

Change-Id: I4df832e6cfc0e5eeac047e8cd4ce42def3be4061
2022-02-23 09:15:50 -08:00
qctecmdr
fb5143b4e5 Merge "asoc: Update secondary mi2s interface type and index" 2022-02-20 06:34:06 -08:00
qctecmdr
e87e6718f2 Merge "swr-haptics: Add new compatible string for Kalama target" 2022-02-20 06:34:06 -08:00
Phani Kumar Uppalapati
f51bed35f2 asoc: Update secondary mi2s interface type and index
Update secondary mi2s interface type and index
for kalama target.

Change-Id: I5b0bb1ab4458fbd3b7e8f36a0ca63e330e3bbc02
2022-02-17 21:45:23 -08:00
Matthew Rice
f3d67be087 asoc: codecs: Fix WSA dapm_ignore_suspend pin names
Update to 5.15 kernel dapm api.
Pin name no longer needs prefix as it is added in API.

Change-Id: I5c1378839f4c4d2aa70fb11706c5bb65d4eb0952
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-02-17 17:51:57 -08:00
Matthew Rice
72f737377e asoc: codecs: Fix lpass_cdc_wsa_macro_read_array
Update function to correctly read array from device tree.
Previously not reading values and returning -EINVAL.
WSA bat_cfg/rload/sys_gain are now correctly configured.
Also add softclip clock enable during pbr config.

Change-Id: Ia1b93acfde3e799b3b72e05966d0fa955c3f49ac
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2022-02-17 11:41:34 -08:00
Phani Kumar Uppalapati
f5d67429ea swr-haptics: Add new compatible string for Kalama target
Add new pmic soundwire haptics compatible string for
Kalama target.

Change-Id: I7c3f85b90176633fb0117577fd97193d929f6452
2022-02-16 13:09:42 -08:00
qctecmdr
110af4933f Merge "asoc: Fix speaker swr port config" 2022-02-11 01:17:37 -08:00
qctecmdr
97edd2c1b6 Merge "dsp: fix issues related to caching of dma_vmap data" 2022-02-11 01:17:37 -08:00
Shiv Maliyappanahalli
964187d31d dsp: fix issues related to caching of dma_vmap data
Local variable is used for dma_vmap and same value is used for caching
which becomes invalid after going out of scope. Store in heap instead.

Change-Id: I2e291137dd461d0cdb49209a6c1d804f1e806457
2022-02-10 18:50:33 -08:00