Commit Graph

12 Commits

Author SHA1 Message Date
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