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>
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>
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>
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>
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>
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>
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>
Switch audio drivers to SPDX identifier on msm-4.19.
Change-Id: Ic3f0230a516db251b8d81e8a7e73dbc04d66fe1b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
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>
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>