Граф коммитов

3777 Коммитов

Автор SHA1 Сообщение Дата
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
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
Fenglin Wu
e3c6149759 asoc: codec: swr-haptics: update slave-vdd regulator control logic
Update the slave-vdd regulator control logic to avoid unbalanced
regulator_enable() regulator_disable() calls. Meanwhile, correct
the jump label when bailing out from soundwire enumeration failure.
This helps to avoid the regulator_put() call in the device remove
process throwing a warning for a dangling regulator enable status.

Change-Id: I89157f5f9177db69bbbf6aedcc8e605c43a7584e
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2021-05-08 08:55:44 -07:00
Junkai Cai
b5edf3ad18 asoc: lpass-cdc: update sequence of HIFI FIR coeff number
The number of HIFI FIR coeff will not be retained if power collapsed,
need to be written right before FIR_START is kicked off.

Change-Id: I034949eb7748f8b2e5b21445fa10f4f1df66a7bf
2021-05-08 08:48:19 -07:00
Aditya Mohan
7cc7e513af asoc: CPS mixer control
Add support for getting logical device
number using mixer control required
for CPS

Change-Id: Ia710b8cb5a5a099139b25afedb7723d93468cc6b
2021-05-05 07:22:48 -07:00
Linux Build Service Account
fe0aa26767 Merge "soc: swr-mstr-ctrl: add new lock to sync runtime_resume and runtime_suspend" 2021-05-02 22:55:47 -07:00
Linux Build Service Account
baccca3aaa Merge "asoc: mbhc: add extcon device for MBHC" 2021-05-02 22:55:47 -07:00
Linux Build Service Account
48f26271e5 Merge "asoc: lpass-cdc: Support up to 200 coefficients for HiFi FIR" 2021-05-02 22:55:46 -07:00
Linux Build Service Account
0ad49f6f8a Merge "asoc: bolero: update incorrect bolero register" 2021-05-02 22:55:45 -07:00
Linux Build Service Account
e5940a24c3 Merge "asoc: lpass-cdc: Update default tables as per v2p5" 2021-05-02 22:55:44 -07:00