提交線圖

23 次程式碼提交

作者 SHA1 備註 日期
Vangala, Amarnath
a267ec5239 asoc: lpass-codec: enable TX Core clock before codec reg access
Enable the TX Core clock to enable access to lpass-cdc registers.

Change-Id: I3088e06e9e77ef24b2e4e802852cc3bb65542f5c
Signed-off-by: Vangala, Amarnath <quic_avangala@quicinc.com>
2023-07-25 09:27:58 +05:30
Yuhui Zhao
6b2a5ea4d9 asoc: lpass-cdc: add null pointer check in register_notifier func
Add null pointer check in register_notifier funcion.

Change-Id: Icba3776cbf33095dc8bdf32ed7b6c749e639a11b
2023-03-29 21:41:20 -07:00
Yuhui Zhao
b78dc76483 Asoc: lpass-cdc: Synchronize lpass-cdc register macro function
lpass_cdc_register_macro can be called simultaneously by different
macros as bootup resulting in inconsistent value of
num_macros_registered. This will result in one of macro going ahead and
registering lpass-cdc component and other macro failing to register which
will cause probe of other macro to fail. Protect function with mutex lock
so that macros access it sequentially

Change-Id: I9d3811eeceb06b6a7e66d79a1b899b2c4283bb52
Signed-off-by: Yuhui Zhao <quic_yuhuzhao@quicinc.com>
2023-01-19 17:21:20 +08:00
Prasad Kumpatla
17a7fb3f4d asoc: Add support for 11P2896MHz RX clk config
1. Update RX CLK config for 11P2896MHz.
2. Add condition to update Droop sel coeffs for 11P28MHz
   and 9P6MHz RX CLK.
3. Upate SWR port config for 44.1Khz sample rate usecase.
4. Unselect RX_TOP.SWR_CTRL(0x6AC0008) for RX CLK 11P28MHz.
5. Update HD2_CTL L/R registers as per latest seq version.

Change-Id: Ifac2c03e3d1bf522fe2a4d942341d9071a1e6239
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-01-11 11:19:54 +05:30
Phani Kumar Uppalapati
dc970caadb Revert "audio kernel: add null point check for lpass cdc."
This reverts commit bfbf93e9f8.

Change-Id: Id5e9e84b18e809831618639a0bf8f0497eb82bd3
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2022-11-30 13:26:49 -08:00
yuayang
bfbf93e9f8 audio kernel: add null point check for lpass cdc.
add null point check for lpass cdc.

Change-Id: I280d4dcb5a1e28336fd1b074231b28c398808880
2022-11-14 17:09:44 +08:00
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
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
Shazmaan Ali
a20e11e0c3 asoc: codecs: Replace dev_err/info with ratelimit prints
replace all dev(pr)_err/info logs
that could potentially flood kernel logs with
ratelimit functions dev_err_ratelimited and
dev_info_ratelimited

Change-Id: I32dc6002dead1a07622978c4de63d541c01982fd
Signed-off-by: Shazmaan Ali <quic_shazmaan@quicinc.com>
2022-04-13 12:43:20 -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
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
Meng Wang
a8bd9abc48 asoc: lpass-cdc: add put_autosuspend to pair with pm_runtime_get_sync
When reading/writing lpass codec registers, pm_runtime_put_autosuspend
is missed when vote fails and it causes device fails suspending after
ssr. Add pm_runtime_put_autosuspend to pair with pm_runtime_get_sync.
When LPASS_CDC_MACRO_EVT_PRE_SSR_UP comes, core vote is needed before
resetting GFMUX reg and dev_up is not set to true yet. Add pre_dev_up
flag to indicate PRE_SSR_UP and be used in lpass_cdc_check_core_votes
to avoid false alarm.

Change-Id: Ic12ecd9645f291078e32f4921f9f77c2d85e4b8c
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-08-08 19:49:27 -07:00
Aditya Bavanari
a415d7381d asoc: Return the correct clk_div value
Incorrect check for return value of clk_div_get
causes CLK_DIV2 setting being missed. Fix the
return value check to address this.

Change-Id: Ic1b6761ab836a38c657ac7e43efda0e2f23c5fee
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2021-08-04 20:34:18 -07:00
Meng Wang
2344f44b9c asoc: lpass-cdc: add ftrace log for NOC issue
Add ftrace log to debug NOC issues.
When writing/reading lpass codec registers, add vote_lock
to make sure clk is not disabled.

Change-Id: I1df924d6aefee2899f7e5008851c1c324dabf62a
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-07-13 23:16:45 -07:00
Meng Wang
932b967501 asoc: lpass-cdc: remove old lpass cdc version check
lpass-cdc only support new codec after 2.5 version.
Remove old lpass cdc version check.

Change-Id: I54a53edf5bdb92f78b43d96e9413f64b0e06c306
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-03-22 18:25:40 -07:00
Laxminath Kasam
c5500dc6dd asoc: lpass-cdc: Add support for ADIE RTC for version 2p5
Add LPASS-CDC version 2p5 for version read.

Change-Id: I2c9fe054d18fb9f2521c0d007c1736ade31ff24b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2021-03-22 08:52:39 -07:00
Vatsal Bucha
ea36f4ea68 asoc: codecs: add child devices after completing initialization
In va, rx and wsa macros, move schedule_work call to
add the child devices to the point later to where the parent
initialization gets completed.

Change-Id: I2095f1007beae253534b2ed44f988ce55fad6b75
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2021-03-22 04:39:59 -07:00
Junkai Cai
fbfd93a2dc asoc: lpass-cdc: allow register write via debugfs
allow QTI regmap debugfs register writes for debugging purpose
on lpass-cdc, wsa and wcd codecs.

Change-Id: Icdedb8f0a5e198bbb6afecb4b6995cc0d1a35833
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
2021-03-20 21:29:06 -07:00
Meng Wang
810d3bb498 asoc: lpass-cdc: init notifier head for lpass-cdc notifier
Call BLOCKING_INIT_NOTIFIER_HEAD for lpass-cdc notifier to
reduce warning log during bootup.

Change-Id: I0aa7fec44e857cf170fcd701986f1fa2db03e170
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-03-18 16:54:47 +08:00
Sudheer Papothi
78e6d7ec4b ASoC: lpass-cdc: Update digital codec driver name
Update LPASS digital codec driver name for proper enumeration.

Change-Id: Ied6a3697a5e47c0695b6339ec7b4b4561ef6ccbd
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2021-01-13 04:22:40 +05:30
Laxminath Kasam
eca32d433e asoc: lpass-cdc: add lpass-cdc v2p5 register updates
Update lpass-cdc version 2p5 registers update and remove old
version tables.

Change-Id: I14e0efe09e3ff5ded49b91e2e226558ae444bc0f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-12-04 04:38:07 -08:00
Laxminath Kasam
9e61f25f98 asoc: lpass-cdc: Enable compile lpass-cdc
Update lpass-cdc to compile on 5.10 kernel

Change-Id: I0782c2f80531aa798794a8a4140a0b77bca7c9b1
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-12-04 04:37:52 -08:00
Sudheer Papothi
e3ab630202 ASoC: Add driver support for lpass digital codec
Add driver support to enable lpass digital codec for
audio playback and capture usecases.

Change-Id: I3d31d31f340db79334700e8fd495f40479e0ec6c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-12-04 04:36:46 -08:00