Commit Graph

26 Commits

Author SHA1 Message Date
qctecmdr
960ba2a87f Merge "dsp: adsp_loader: load proper dtb image" 2023-11-02 06:39:11 -07:00
Faiz Nabi Kuchay
9d97bbe631 dsp: adsp_loader: load proper dtb image
Load proper dtb image when fuse is not supported.

Change-Id: If87fcc715954b1526fa6718a3453357cbb8957e3
Signed-off-by: Faiz Nabi Kuchay <quic_fkuchay@quicinc.com>
2023-10-25 19:34:31 +05:30
Ganapathiraju Sarath Varma
378a3eea83 dsp : Update timeout for spf_apm_ready_check
Added timing for spf_ready_check api, rightnow
we are waiting for 10sec when apm is not ready
instead updated timing as below
during adsp loading 10sec
during add child devices 5sec
during prm send pkt 0sec
Check for q6 state at the start of gpr_send_pkt.

Change-Id: I94a93842cc0dc7fc9acd7232f413b3c3a9038536
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
2023-10-16 14:46:06 +05:30
Faiz Nabi Kuchay
3521224669 dsp: adsp_loader: Load adsp mdt using fuse-not-supported property
As per current code there isn't a way to load custom adsp-mdt image.
Use kernel api to load custom adsp-mdt.

Change-Id: I42f1186741dff0b9bd953e536eb33907d3c6cb90
Signed-off-by: Faiz Nabi Kuchay <quic_fkuchay@quicinc.com>
2023-09-22 19:49:52 +05:30
Aditya Bavanari
4e4aec5874 adsp-loader: Add support to load adsp firmware with image name
Use rproc_set_firmware API to load ADSP firmware using
image name when adsp_fw_name is set based on
fuse variant.

Signed-off-by: Aditya Bavanari <quic_abavanar@quicinc.com>
Change-Id: I529fe3f9f5f3a861c6b345a79f3ef90f517405a4
2023-02-06 18:07:04 -08:00
Phani Kumar Uppalapati
5555970830 audio-kernel: fix compilation issues for pineapple target
Fix compilation issues in audio-kernel for pineapple target.

Change-Id: I93fa4fb670989f82139dd2cd0dbe57b52ad52504
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2022-11-18 11:58:44 -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
Jyotirmoi Sarma
054c3a6191 dsp: Enable remoteproc on adsp-loader
Modify adsp-loader to use remoteproc to boot adsp image

Change-Id: I6eb481b1795c6dba5ec18938840a029f485da5bc
Signed-off-by: Jyotirmoi Sarma <jyosarma@codeaurora.org>
2020-12-16 14:20:12 +05:30
Vidyakumar Athota
584244b6ac Merge commit '5efb3a4ee3959f20ed2b697663205ec9a6bd1e5c' into audio-kernel-5-4.lnx.1.0
Change-Id: I58fbdf6b91c33ab5d147efbe5f5706616052c7fe
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2020-09-06 18:25:28 -07:00
Phani Kumar Uppalapati
726d5ea145 Merge commit '33ea77356f47c6c596c8505ca90307fc1245ef3f' into audio-kernel-5-4.lnx.1.0
Change-Id: Iacb389506a643a1ac70a3d51c2dfc1eeb47f690c
2020-07-30 19:48:24 +05:30
Aditya Bavanari
91815984c2 adsp-loader: Fix compilation error in adsp loader
Debug logs arguments are not correct in adsp loader
during an error scenario. Correct the arguments to
fix compilation error.

Change-Id: Ibdba5ce1332b287c84a38512fba8764298f4dd80
2020-07-23 15:36:36 +05:30
Phani Kumar Uppalapati
bc326d21fd audio-kernel: upgrade to ar/spf changes
Rename casa to ar and gecko to spf in audio-kernel.

Change-Id: Ia37ee0497ce043443ca70131d2739737cb8f0366
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2020-06-25 00:39:53 -07:00
Vignesh Kulothungan
8cc6e93451 dsp: replace apr with gpr api
Replace APR API to get ADSP state with GPR API.

Change-Id: I8edb8a831ef8755202fc95454af3b4210a114719
Signed-off-by: Taha Azzaoui <tazzaoui@codeaurora.org>
2020-06-25 00:33:41 -07:00
Soumya Managoli
d1a006c81e dsp: adsp-loader: Support ADSP restart recovery when stuck
Changes to support silent restart of adsp subsys
based on the apr callback when packet transfer
to adsp timesout.

Change-Id: Icedb76907a441792d1953a08dd071791e5b08706
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2020-06-11 12:05:42 +05:30
Aditya Bavanari
d053d56f50 dsp: Fix a memory leak issue when nvmem read returns invalid length
When nvmem cell read returns invalid length the allocated buffer
is not freed. Free the buffer in this scenario to fix
memory leak issue.

Change-Id: I2e0010c1cfb2ea03cb4f25abf55e94ce4f0c5fcf
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-05-27 13:03:35 +05:30
Aditya Bavanari
315e4b16e2 adsp-loader: Add support to load adsp fw name
When adsp variant read from fuse registers is not
supported, add support to read the fw name
and load the same.

Change-Id: Icf9aeee8b4c607a6f768f0d73ab0e55d78dc8ac9
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-05-12 23:42:31 -07:00
Ajit Pandey
2d71d6d099 dsp: adsp-loader: Add check around bytes read from nvmem cell
nvmem_cell_read() return no of bytes read in 'len' variable and
allocates similiar bytes of memory for buffer. Copy only these
number of bytes from buf to avoid out of bounds issues.

Change-Id: I712e5058d15deba939b6a743fcf5bff33ac51f84
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
2019-11-22 17:50:27 +05:30
Ajit Pandey
72066d3ab6 dsp: adsp-loader: Support dynamic size for array priv->adsp_fw_name.
Current implementation allocates fixed size for array priv->adsp_fw_name
but this may result in out of bound access if source adsp_fw_name_array
dts property size exceed this fixed size. This patch fixes this issue by
allocating priv->adsp_fw_name array with dynamic size of source array.
Also fixes bytes copied in strlcpy.

Change-Id: Iea031952224672c34eb7245996687985e18ef8be
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
2019-09-27 19:56:30 +05:30
Aditya Bavanari
380e08eeac dsp: adsp-loader: load adsp based on nvmem idx
Load different adsp images based on nvmem property
of sku variants. Read fw image name mapped to
nvmem property's value and load it based on sku
variant.

Change-Id: I99ffe171ec8c42c0ee9e148f171c557353d72910
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-07-24 11:44:18 +05:30
Xiaojun Sang
53cd13a1ab ASoC: hide bind/unbind in sysfs
Exposure of driver bind/unbind to userspace via sysfs may
lead to unexpected behavior.
Hide bind and unbind by driver attribute.

Change-Id: I20d6ee653bcc16af15d6368664aaf240c6645cd0
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-05-17 15:00:33 +08:00
Meng Wang
688a867091 asoc: Update file header to GPL-2.0-only
Update file header to GPL-2.0-only.

Change-Id: If16bf92f951c6d7521f56a3e9b91da2ca2ccf6f8
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-01-29 13:43:33 +08:00
Meng Wang
61af6849e9 ASoC: switch audio drivers to SPDX identifier
Switch audio drivers to SPDX identifier on msm-4.19.

Change-Id: Ic3f0230a516db251b8d81e8a7e73dbc04d66fe1b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-07 15:47:32 +08:00
Shaikh Shadul
9850fb1429 dsp: Add restart interface for adsp
User space sensor daemon requires to restart the audio dsp
during some of the sensors usecases. Add sysfs interface to
do adsp subsystem restart from user space sensor daemon.

Change-Id: I07c78892cb6e6f99ae93c04eddbc321681b52a70
Signed-off-by: Shaikh Shadul <sshadu@codeaurora.org>
2018-10-12 11:45:10 +05:30
Banajit Goswami
cb3ee0e10b dsp: adsp-loader: avoid updating APR state after ADSP loading
APR state update should happen only after ADSP up
notification recieved by APSS, and not just after
ADSP is loaded and booted up.
Avoid setting APR state to loaded after PIL loading
of ADSP image is complete.

Change-Id: I9b9f073279c306562e427ec2c7e73dfa7d71f956
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2018-04-16 18:34:52 -07:00
Laxminath Kasam
605b42f92c audio-lnx: Rename folders to new flat structure.
Kernel audio drivers can be categorised into below folders.
asoc - ALSA based drivers,
asoc/codecs - codec drivers,
ipc - APR IPC communication drivers,
dsp - DSP low level drivers/Audio ION/ADSP Loader,
dsp/codecs - Native encoders and decoders,
soc - SoC based drivers(pinctrl/regmap/soundwire)

Restructure drivers to above folder format.
Include directories also follow above format.

Change-Id: I8fa0857baaacd47db126fb5c1f1f5ed7e886dbc0
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-08-18 16:56:12 -06:00