Wykres commitów

3785 Commity

Autor SHA1 Wiadomość Data
Meng Wang
7fea7ac663 asoc: lpass-cdc: call runtime_suspend when vote fails
During adsp SSR, after adsp is down, lpass_cdc_runtime_resume
is called in va-marco and fails. lpass_cdc_runtime_suspend is
not called 100ms later. After adsp is up and va-macro considers
lpass_cdc is resumed and not setting clk which causes wcd not
detected. Call runtime_suspend when vote fails to resolve
the issue.

Change-Id: Ice398d0168c5c67f6c98e3122af507ca74837175
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-06-28 13:10:48 +08:00
qctecmdr
671d354cf5 Merge "dsp: audio_prm: move mutex_init to module_init" 2021-06-27 12:35:05 -07:00
Junkai Cai
9107dae9d8 aosc: codecs: set mclk flag false when mclk is disabled
the dapm_mclk_enable flag has not been set back to false
when the actual mclk is disabled.

Change-Id: Ic04756b3dcd074887dd1e93f23cf31873abc1428
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
2021-06-27 12:00:04 -07:00
qctecmdr
47b9399ea3 Merge "ASoC: include: Remove obsolete header files" 2021-06-22 20:40:25 -07:00
qctecmdr
e15f70c21e Merge "asoc: lpass-cdc: update DMIC clk when WCD DMIC is selected" 2021-06-19 11:39:00 -07:00
Amitkumar H
2daa21da03 ASoC: include: Remove obsolete header files
Remove to avoid maintenance of code.

Change-Id: I093518ff11486df229ed5276c90e463250be5679
Signed-off-by: Amitkumar H <amih@codeaurora.org>
2021-06-17 20:52:03 -07:00
Meng Wang
a982e87448 dsp: audio_prm: move mutex_init to module_init
During SSR, prm_gpr_send_pkr may request g_prm.lock and
audio_prm_probe may reinitiaze g_prm.lock. When prm_gpr_send_pkr
unlock g_prm_lock, warning log will be there.
Move g_prm.lock init and destroy to module_init and module_exit.

Change-Id: Id410e55f9dee7c0dcb487591cda8fd21e01c7255
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-06-17 09:43:31 +08:00
Patrick Lai
ea9d97a198 dsp: adsp-loader: call proper APIs to shutdown DSP gracefully
Original implementation calls rpoc_report_crash API which yanks out
ADSP abrutptly without proper shutdown. This leads to NOC errors
being reported. Update adsp-loader to call proper shutdown API.

Change-Id: Ibf4bab1e8a8b63082ab4014fff298abcb8750118
Signed-off-by: Patrick Lai <plai@codeaurora.org>
2021-06-16 12:59:30 -07:00
Meng Wang
500ce512d1 dsp: adsp_loader: Probe only after remoteproc is ready
This change checks whether the adsp remoteproc is ready or not
before probing the adsp loader. Since adsp loader is not useful
until the adsp remoteproc is ready, defer probe of the driver.

Change-Id: I659e67f0207707388c6484e58366637c1809d304
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-06-16 01:53:08 -07:00
Meng Wang
99b86b9f62 asoc: lpass-cdc: update DMIC clk when WCD DMIC is selected
When WCD AMIC is used and connected to SWR master port3,
DMIC clk div is updated by mistake. Update logic to update
DMIC clk DIV with new flag.

Change-Id: Iee01acf97f925ec54c8d189c13e63acca7ffc2f4
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-06-16 01:51:57 -07:00
qctecmdr
5fa13c2cd8 Merge "dsp: add workqueue for audio_prm and pinctrl_lpi" 2021-06-14 12:59:22 -07:00
qctecmdr
984e5cd1f7 Merge "asoc: lpass-cdc: reduce WSA digital gain when cooling is enabled" 2021-06-14 12:59:22 -07:00
Meng Wang
8b3578665b dsp: add workqueue for audio_prm and pinctrl_lpi
GPR will deregister and register to audio notifier during
SSR. When ADSP up notification comes to pinctrl LPI before
GPR is registered to audio notifier. Pinctrl LPI will
reset core vote clks however GPR is not masked as up yet
which will causes audio hold clk mutex_lock for long time
and cause kernel panic.
Add workqueue for audio_prm and pinctrl_lpi to avoid hold
clk mutex_lock for long time to resolve this issue.

Change-Id: Idcd7c7d18709dbd5ae85e19eb2abfbed009ffab1
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-06-07 05:16:37 -07:00
Junkai Cai
751d49a88b asoc: lpass-cdc: reduce WSA digital gain when cooling is enabled
The digital gain will be adjusted lower than what userspace set
during playback if the device temperature reach the threshold.

Whenever digital gain is changed from userspace, codec will check the cooling
state and adjust the gain.

Change-Id: I52df0f96cf20b90a9bdad70b9c117eed82145fb2
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
2021-06-07 05:14:17 -07:00
Meng Wang
9cf7f24da5 asoc: swr-mstr-ctrl: return when requesting hw vote fails
In swrm_runtime_resume, when hw vote fails, it still requests
clk and tries to access gfmux which may cause kernel panic.
Update the logic to return when requesting hw vote fails.

Change-Id: I15d2913ae69bf7442ef504b588e0a55917a26071
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-06-07 10:20:07 +08:00
Vidyakumar Athota
6a50edfffc Revert "Revert "asoc: lpass-cdc: Do not update VA clk muxsel register""
This reverts commit a108d5c2bb.

Change-Id: Ie7d2bc6b05c62dff251cd80b2a4e81670e43108d
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2021-06-02 20:21:04 -07:00
Meng Wang
a108d5c2bb Revert "asoc: lpass-cdc: Do not update VA clk muxsel register"
This reverts commit 57fa62e292.

Change-Id: I1afb0d2f7495d3b30fc99bb4391eda094921fa89
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-05-27 09:15:15 +08:00
qctecmdr
dbbe46ef46 Merge "dsp: audio_ion: add lock for msm_audio_ion_crash_handler" 2021-05-25 20:42:48 -07:00
qctecmdr
bd21ca526a Merge "ASoC: update mi2s/tdm/auxpcm interface names" 2021-05-25 20:42:48 -07:00
qctecmdr
798c3db8d9 Merge "asoc: lpass-cdc: Update core voting before gfmux access" 2021-05-25 20:42:48 -07:00
qctecmdr
f98485fa87 Merge "bolero: tx-macro: Fix link status not connected issue due to clk not enabled" 2021-05-25 20:42:48 -07:00
Laxminath Kasam
5a96e4bc5b asoc: lpass-cdc: Update core voting before gfmux access
GFMUX access in va clock supported in lpass-cdc v2p5
onwards. Ensure add core voting before access.

Change-Id: I36c8db86a2e7f265ab293dd6cd1f1ee3ac7722a5
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2021-05-24 01:45:01 -07:00
Vatsal Bucha
c5698c8a0b bolero: tx-macro: Fix link status not connected issue due to clk not enabled
Sometimes link status is not connected due to tx_mclk_users
not being properly updated. This is due to tx_mclk_users
enable and disable not being protected by common mutex lock.
Add mutex lock whereever it is accessed to resolve issue.

Change-Id: Ibba208be1f2d3eaf63c49e434c2ae48bc3b5b2d8
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2021-05-24 01:44:55 -07:00
Meng Wang
57fa62e292 asoc: lpass-cdc: Do not update VA clk muxsel register
Because of a HW limitation in DSP, while switching
RCG from TX MCLK to VA MCLK for SVA use cases
a glitch is seen on AHB bus leading to data
corruption in registers.
So, while doing a mux switch for VA RCG clock selection,
do not configure the muxsel register in HLOS as it is
taken care in DSP itself as a workaround for HW limitation.

Change-Id: Ie36ff239689e634f5c29ad03b343b95de2d12547
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-05-24 09:21:56 +08:00
qctecmdr
43c99c7f0a Merge "asoc: lpass-cdc: disable clk when they are enabled" 2021-05-22 11:31:19 -07:00
qctecmdr
0f7704bd0e Merge "Revert "soc:soundwire: disable pm_qos in soundwire master driver"" 2021-05-22 11:31:19 -07:00
Vignesh Kulothungan
c02fc6e8c4 ASoC: update mi2s/tdm/auxpcm interface names
Update backend interface names as required by spf.

Change-Id: I10e5d64677e9ea2b70d53697d9df09ef8cae8612
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2021-05-20 17:47:42 -07:00
Meng Wang
cc0d0bf564 asoc: lpass-cdc: disable clk when they are enabled
Check if clk is enabled before disabling it to avoid
warning log during adsp SSR.

Change-Id: I916af6f9efacfe3d08e0b05dcc0c6023944369d2
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-05-18 08:38:24 -07:00
Meng Wang
f16860d03a dsp: audio_ion: add lock for msm_audio_ion_crash_handler
msm_audio_fd_data can be freed in msm_audio_delete_fd_entry and
msm_audio_ion_crash_handler.Add lock for msm_audio_ion_crash_handler
to avoid race condition during removal of msm_audio_fd_data and dereference.

Change-Id: I49dc0a1aca45ffad76b39e06fe075185d4281d00
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-05-18 16:29:11 +08:00
Soumya Managoli
afde3b3eb2 asoc: bolero: Update PCM_RATE based delay for amic
The PCM_RATE bit field in LPASS_TX_CDC_TXn_TX_PATH_CTL
ranges from 0 to 6.
In the current implementation of tx-macro, the value
read is mapped directly to the sample rate instead of
the indices. Change is to correct this.
Add the delay based on pcm_rate in va-macro as well.

Change-Id: I6cb7e58e71f2a25356608611f1dfed83171706f6
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2021-05-17 06:03:13 -07:00
Meng Wang
c0c4216d1d Revert "soc:soundwire: disable pm_qos in soundwire master driver"
This reverts commit 068e2722da.

Change-Id: I2725889bc3feb83642a6da57e2b2e02b51cf28f5
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-05-16 23:43:21 -07:00
qctecmdr
f1b8ccfee3 Merge "asoc: remove makefile for Rouleur codec" 2021-05-16 02:18:46 -07:00
qctecmdr
9da8af1eaf Merge "asoc: swr-haptics: Toggle swr-slave-vdd supply for SSR recovery" 2021-05-16 02:18:46 -07:00
qctecmdr
9607f2fa36 Merge "asoc: msm_common: Fix pinctrl state during shutdown" 2021-05-16 02:18:46 -07:00
qctecmdr
aba8840968 Merge "soc: swr-mstr-ctrl: add check for dev_num and port_id_offset" 2021-05-16 02:18:46 -07:00
Fenglin Wu
0538dab88c asoc: swr-haptics: Toggle swr-slave-vdd supply for SSR recovery
After ADSP SSR happened, toggle swr_slave_vdd before play to reset
haptics HW so that it can function properly.

Change-Id: I48bc07c923d1af2041c6c156c699e329084f0d34
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2021-05-13 06:50:19 -07:00
Meng Wang
8a3a9fcd5d asoc: remove makefile for Rouleur codec
Remove makefile for Rouleur codec.
Remove usage of shell command and update absolute path cmd
for AUDIO_ROOT.

Change-Id: I1589c688639892b7628914a3777632466949d000
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-05-13 04:17:13 -07:00
Rohit kumar
3b528eff50 asoc: msm_common: Fix pinctrl state during shutdown
Move pinctrl state to sleep instead of active during
mi2s shutdown.

Change-Id: I9dc1097a698d6ebd34ac3cedac99e95799a7fb66
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
2021-05-13 04:17:09 -07:00
Meng Wang
b16ebebc97 asoc: mbhc: avoid unregister extcon device when ssr happens
MBHC extcon device is unregistered when adsp ssr happens and causes
kernel panic. Avoid unregistering MBHC extcon device in mbhc_deinit.

Change-Id: I69fa057a480ebadaf324ca1f61bf399c176e3b2d
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-05-13 04:17:03 -07:00
Fenglin Wu
7d939baa46 asoc: swr-haptics: add non-HBoost regulator support
Haptics module is supplied by HBoost regulator by default, it requests
voltage to HBoost regulator through hardware channel. Haptics module
can also be configured to use other regulator device, in this case, it
requires software to request the voltage from the regulator before
enabling the play. Add support for this.

Change-Id: I4a8305ff2732a92bc8be90bd3ed197fa643a101e
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2021-05-13 04:16:27 -07:00
Meng Wang
2042476ef0 soc: swr-mstr-ctrl: add check for dev_num and port_id_offset
0 is invalid slave swrm device_num and it should
avoid config swr frameshape.
Add check for port_id_offset to avoid overflow.

Change-Id: I1eae8936c90bb7b66c27f2ff549eef099c25f011
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-05-13 04:15:22 -07:00
Junkai Cai
6b298688f8 asoc: update soc component for soundcard info and irq
NULL component is incorrectly used to create codec entry
and to register wake irqs, which causes issues including MBHC detection.

Change-Id: I2df5bef3b739637c41b9653458161e3facf89dd2
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
2021-05-13 01:29:44 -07:00
Meng Wang
5c96dd01a1 Revert "asoc: disable pm qos voting in machine driver"
This reverts commit b81a91d450.

Change-Id: I98a7adc941f626bd467c6ecf7cf1120f1b9d0a33
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-05-12 10:50:58 -07:00
qctecmdr
1a5b8a5899 Merge "dsp: address deadlock situation in prm driver during subsystem restart" 2021-05-11 06:51:11 -07:00
qctecmdr
468257a3a6 Merge "asoc: lpass-cdc: update sequence of HIFI FIR coeff number" 2021-05-11 06:51:11 -07:00
qctecmdr
0bc153d441 Merge "soc: swr-mstr: Check for fifo avail before bulk write" 2021-05-11 06:51:11 -07:00
qctecmdr
aff52a9d38 Merge "asoc: codec: swr-haptics: update slave-vdd regulator control logic" 2021-05-11 06:51:11 -07:00
Meng Wang
f70e2d8de4 asoc: initialize rx_ch and tx_ch array before use
Initialize rx_ch and tx_ch array before use.

Change-Id: Id31c65101be2630a55b5b96bd3e35199758e243e
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-05-11 12:34:18 +08:00
Vatsal Bucha
fa2a8f1b26 soc: swr-mstr: Check for fifo avail before bulk write
Check for fifo availability before writing slave registers
during swrm master bulk write so as to prevent swr
overflow, underflow errors.

Change-Id: I97a914cac289b3f1215ccf5c1abec88b959a9f21
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2021-05-10 09:34:27 -07:00
Patrick Lai
504884e349 dsp: address deadlock situation in prm driver during subsystem restart
When ADSP crashes, prm driver can get audio PD down notification from
audio notifier in one thread while prm device instance is being removed
in another thread. This leads to two threads acquiring two locks
(audio notifier & prm) in reverse order. Update audio_prm_remove function
to deregister audio_notifier without acquiring prm lock.

Change-Id: I76dda54340973dc8c4005c741b273dfbdbb1610d
Signed-off-by: Patrick Lai <plai@codeaurora.org>
2021-05-09 15:54:33 -07:00