Load proper dtb image when fuse is not supported.
Change-Id: If87fcc715954b1526fa6718a3453357cbb8957e3
Signed-off-by: Faiz Nabi Kuchay <quic_fkuchay@quicinc.com>
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>
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>
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
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>
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>
Modify adsp-loader to use remoteproc to boot adsp image
Change-Id: I6eb481b1795c6dba5ec18938840a029f485da5bc
Signed-off-by: Jyotirmoi Sarma <jyosarma@codeaurora.org>
Debug logs arguments are not correct in adsp loader
during an error scenario. Correct the arguments to
fix compilation error.
Change-Id: Ibdba5ce1332b287c84a38512fba8764298f4dd80
Rename casa to ar and gecko to spf in audio-kernel.
Change-Id: Ia37ee0497ce043443ca70131d2739737cb8f0366
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Replace APR API to get ADSP state with GPR API.
Change-Id: I8edb8a831ef8755202fc95454af3b4210a114719
Signed-off-by: Taha Azzaoui <tazzaoui@codeaurora.org>
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>