Commit Graph
633 Commits
Author SHA1 Message Date
tinno16 0bd5ad5e36 hawaii OLED: hawao audio bringup
hawao audio driver bringup

smartpa calibration add

Change-Id: Ic7b61ea858abeeaff5c4c482740b29f6f0db87d3
Reviewed-on: https://gerrit.mot.com/2136276
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
(cherry picked from commit f20f799cccbcedface54a69fdeae35bd5f97ef36)
Reviewed-on: https://gerrit.mot.com/2144882
Reviewed-by: <tinno16@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
2023-06-01 00:35:13 -03:00
huaqin95 249139754c rhode: audio: enable aw882xx algo param store in aw_skt.bin
update the lib to store the params to aw_skt.bin,
enable algo_prof switch.

Change-Id: I34e10cc27d60f6fd2bb40500f90e916f93de7e5f
Signed-off-by: huaqin95 <huaqin95@motorola.com>
Reviewed-on: https://gerrit.mot.com/2124816
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: wangzhe <huaqin96@motorola.com>
Reviewed-by: Zhengming Yao <yaozm1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:35:13 -03:00
guoyf2 feb238febf Audio bringup: asoc: add aw882xx support
Change-Id: Ia5781b73ecaceba7393379da5c38c63112e7f894
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1732545
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Reviewed-by: Xianhong Li <lixh8@lenovo.com>
2023-06-01 00:35:13 -03:00
Soumya Managoli 505430b7d1 ASoC: dsp: Synchronise adm commands
Race condition observed while processing the
get/set_pp_params and adm_close command.
Synchronise adm open, close and get/set_pp_params
by sending the apr cmd pkt using the same lock.

Change-Id: I9a1ebcedc91f78f3940846688f8569ec9088e1e7
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2021-10-06 10:52:42 +05:30
Vatsal Bucha 774957f968 dsp:q6afe: Resolve crash in q6afe_get_avcs_modules
Crash is happening in q6afe_get_avcs_modules in
APTX-Adaptive case. Check for format_id as
aptx_adaptive or lc3 to resolve crash.

Change-Id: I3e47bf38010a20df746455e35e316fa2103bc04a
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2021-09-03 12:53:34 +05:30
Soumya Managoli 96167aa481 q6afe: Fix out of bound access of clkinfo_per_port
Avoid accessing clkinfo_per_port struct with idx
when idx is invalid.

Change-Id: I45bef3381659622cdb63d076842e9d58f54da0f5
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2021-07-28 10:49:41 +05:30
Zhou Song c4b4d9d89a asoc: fix KW issue of using uninitialized variable
Set initial vaue for cfg_type to avoid possible
accessing of uninitialized variable.

Change-Id: Ib2fa91202442a656915263694bd6fbf5cd663544
Signed-off-by: Zhou Song <zhous@codeaurora.org>
2021-07-09 07:02:55 -07:00
Zhou Song e497f28945 afe: release codec port when afe starts failed
When afe port starts failed, allocated port should
be released to avoid subsequent allocation failed.

Change-Id: If0cacce296d14135d23bf45e47de5b253372ea31
Signed-off-by: Zhou Song <zhous@codeaurora.org>
2021-06-24 17:30:45 +05:30
qctecmdr e1ec3631e0 Merge "dsp: fix out of bound access for cal_data size" 2021-06-12 09:54:44 -07:00
Kunlei Zhang a323356e0c dsp: fix out of bound access for cal_data size
Add change to fix cal_data index out of bounds error.

Change-Id: I8c8e62835e496c0f35fdc09757f4206c52020727
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2021-06-01 00:46:10 -07:00
Kunlei Zhang 6c1f6c3193 dsp: update size check for set/get VI param function
In afe_set_cal_sp_th_vi_cfg and afe_get_cal_sp_th_vi_param
functions, data size is not checked properly which might
lead to out of bounds access.

Add data_size check to avoid out of bounds access.

Change-Id: Ibe049300c609d0d717309bccc65cac876ac075f7
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2021-06-01 00:44:26 -07:00
qctecmdr a82caad5a6 Merge "ASoC: QCS405: Additional TDM samplerates and channels" 2021-03-17 17:32:34 -07:00
Kunlei Zhang bb71648e26 dsp: update size check for get VI param function
In afe_get_cal_sp_th_vi_param functions, data size
should check with size of cal_type_header. The check
is not present which might lead to out of bounds access.

Update condition to ensure data_size is greater than
or equal to size of cal_type_header.

Change-Id: Ib2904f53243f4fb858131511812fd90de32b4656
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2021-03-09 21:02:59 -08:00
qctecmdr 5bf7be9a0a Merge "asoc: qcs405: Update clk src string from dts" 2021-03-09 09:42:48 -08:00
Manjunatha Madana a8c5685e1a dsp: Disable q6_pdr build for msm8937 and msm8953
Disable compilation of q6_pdr module for msm8937
and msm8953 SPF targets as it is not supported and also
results in secondary images build error.

Change-Id: I9590ddfdfb51c35744d4cb8e2a108f5f5449864f
Signed-off-by: Subhadra Jagadeesan <subhja@codeaurora.org>
2021-03-03 11:00:26 +05:30
qctecmdr 4315848f8e Merge "dsp: Unload the BT modules when APR handle is NULL" 2021-02-04 22:19:59 -08:00
qctecmdr db9fc7ab97 Merge "dsp: Fix improper mutex unlock in afe close" 2021-02-02 09:06:44 -08:00
Harshal Ahire 3ab64ab211 dsp: Unload the BT modules when APR handle is NULL
As a part of SSR/PDR, afe_close() is called. If APR handle
is NULL, BT modules were not unloaded. Unload the modules
to recover post SSR/PDR.

Change-Id: I69bdb3ab1d55ad9a0a8ed3eed069c97af9143722
Signed-off-by: Harshal Ahire <hahire@codeaurora.org>
2021-02-01 12:09:08 +05:30
Subhadra Jagadeesan 411c3d05fc ASoC: Audio bringup changes for msm8937_32go.
Enable compilation for msm8937_32go, 8953, sdm439, sdm429 targets.
Bring in msm8952 machine driver and SDM450 auto configs.
Update asoc, codec driver to component driver to align
with kernel-4.19 ALSA.

Change-Id: I95a6ee3dbb3b9d3b89cc6961346baf1efb3cb9c8
Signed-off-by: Subhadra Jagadeesan <subhja@codeaurora.org>
2021-01-27 11:39:25 +05:30
Sanjana B 18d788af00 asoc: Add support for QUAT and SEN TDM interface
Add FE and BE support for QUAT and SEN TDM interface.

Change-Id: Ic1fb96b1d5004f07849673e1e6369609652f0dc1
Signed-off-by: Sanjana B <sanjb@codeaurora.org>
2021-01-11 10:24:24 +05:30
Sanjana B 1b2393eba3 dsp: Add support to update and store clk src values
Add support to update clk src array from machine driver.
Update clk src for different be ids based on clock
frequency at playback.

Change-Id: Ifa09d556fd50f9e2ddef39b5e3ddd25f579f8f6e
Signed-off-by: Sanjana B <sanjb@codeaurora.org>
2021-01-10 20:28:11 -08:00
Sanjana B d747558a4a dsp: afe topology deregister
To handle erroneous sequence when HLOS audio driver registers
a FFNS topology in non-island mode instead of island mode:
Call afe topology deregister to deregister any previously
created topology before registering the topology.

Change-Id: Iff871da998847ea5d3bcee417c780b8acaf70ca3
Signed-off-by: Sanjana B <sanjb@codeaurora.org>
2021-01-10 20:26:54 -08:00
Nirav Khatri 239a93e8ab ASoC: Add external mclk mixer support
Add mixer control and callback for selecting external mclk at start of
next playback for a particular BE.

Change-Id: Ifc25eda2f14da564c6b066eb8f76049697bbd44e
Signed-off-by: Nirav Khatri <khatri@codeaurora.org>
2021-01-11 09:42:15 +05:30
Aditya Bavanari 38aa2b9e5e dsp: Fix improper mutex unlock in afe close
During SSR use cases, when AFE APR handle is NULL
and AFE close is invoked, mutex unlock is done without
locking. Fix it and bail out without unlocking the
mutex in this scenario.

Change-Id: Ia2988b56425d8c2d5c726d5860c13e655e7e4ed1
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2021-01-06 13:30:59 +05:30
qctecmdr 6f7624eab4 Merge "Revert "dsp: avtimer: Add adsp ready check before accessing avtimer registers"" 2020-12-16 02:14:14 -08:00
Soumya Managoli d881ddaff8 ASoC: Add support to send voice UI port id to afe
As per the current design in afe, if the
afe_get_cal_topology for AFE_TOPOLOGY_CAL
or send_afe_cal_type for AFE_COMMON_TX_CAL
fails, then the voice UI calblock is fetched/sent.
This is resulting in sending voice UI calblock
on a non voice UI port during concurrent usecase scenario.

Fix is to check if the calblock for get/set is for
a voice UI port or not. Added support to send this
port id info from routing driver to afe when usecase
is enabled via mixer_control.

Change-Id: I356aae61e1b9d11324e7b9f9a57953767a64b71e
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2020-12-08 17:17:25 +05:30
Surendar Karka 53f1a319b7 Revert "dsp: avtimer: Add adsp ready check before accessing avtimer registers"
This reverts commit 1d2a04aed6e82771bbfa3aca65fda17385ab7ed5.
Get latency query is getting failed, as check added needs vote for adsp ready state.
We need to vote for adsp ready state and add the check condition. Reverting the change
until we come up with the proposed solution

Change-Id: I2cd1ea4a7cb8cc6b9386517dd4040cc91f10aa7d
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2020-12-02 05:09:36 -08:00
qctecmdr 7961f6e686 Merge "dsp: add change to enable preemption at cal_utils_dealloc_cal" 2020-11-25 18:59:00 -08:00
qctecmdr d62420bed8 Merge "dsp: add afe function to send cps configuration" 2020-11-20 02:18:50 -08:00
Saurav Kumar d775e3b2ef dsp: add change to enable preemption at cal_utils_dealloc_cal
Add change to enable preemption at cal_utils_dealloc_cal.

Change-Id: I3d9304851f4d61d7afb82c0512421159ec788db1
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
2020-11-17 17:02:35 +05:30
Saurav Kumar 10825a5129 dsp: add change to handle use-after-free in cal_utils_is_cal_stale
Add change to address the race condition between
pointer dereference and memory deallocation.

Change-Id: Ia1ed47986ec81d3dc2feb3bc874847fadddac292
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
2020-11-04 12:45:59 +05:30
Saurav Kumar 0c09e91ab6 dsp: add change to fix use-after-free issue
Add change to properly handle the pointers by setting them to
NULL after free and adding some null checks before dereferencing.

Change-Id: I3e52b9a6885a8d8a91c09f75fe92ba69e3eb555f
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
2020-10-27 13:57:53 +05:30
Faiz Nabi Kuchay b721459e0c dsp: add afe function to send cps configuration
Define cps hw interface configuration structures.
Add AFE_PARAM_ID_CPS_LPASS_HW_INTF_CFG parameter id.
Add a function to send afe cps speaker protection
configuration.

Change-Id: I865e9981b6dd1da4b9ef1a3e18be82cea2996309
Signed-off-by: Faiz Nabi Kuchay <fkuchay@codeaurora.org>
2020-10-08 18:25:49 +05:30
Sujin Panicker 48d4085242 dsp: Add param header size based on the instance id support
Add param header size to the actual parameter size
based on the instance id support.

Change-Id: I8937e71254265dbc9faf00b9cfc7c40c88f4388a
Signed-off-by: Sujin Panicker <spanic@codeaurora.org>
2020-09-28 00:02:00 -07:00
qctecmdr d5bff1117f Merge "ASoC: dsp: Synchronise adm and rtac commands" 2020-09-27 03:08:59 -07:00
Laxminath Kasam d123e76ff3 dsp: q6core: Check q6core avs state to be modules ready
During PDR, in dynamic load module if attempted
before all module state ready on AVS it may fail.
Add AVS state check before send load module cmd.

Change-Id: I70a5a5b11f5661042d704222759608179ba9d47c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-09-23 23:13:27 -07:00
Soumya Managoli 0c317f309c ASoC: dsp: Synchronise adm and rtac commands
Race condition observed while processing the
set_pp_params command responses sent back to back
by adsp for commands sent from adm and rtac.
Handle this by synchronising the get/set pp_params
command in both the drivers.

Change-Id: Id89d98217dc5cad3703e5d545ddee21cb145c874
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2020-09-22 09:49:10 +05:30
Vangala, Amarnath 7122b041a2 dsp: Feedback path cfg to support 3rd party spkr protection algorithms.
Backward compatibility change to set 'feedback path cfg' to AFE_MODULE_FEEDBACK,
to support 3rd party spkr protection algorithms.

Change-Id: I9af731902fbc5bc69f130a4f30d8fc5f18ceaace
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
2020-08-28 11:04:48 +05:30
Vangala, Amarnath a33a287d97 ASOC: SPV4 set correct number of speakers.
Set correct number of speakers for Speaker Protection V4.

Change-Id: I66c656174bef64d3cdd64b17d994073e9ee58472
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
2020-08-27 22:32:04 -07:00
Harshal Ahire 099eb5cb4a dsp: fix compilation issue in q6lsm_callback function
Change format specifier for param_size requested
from adsp while printing.

Change-Id: I133b474de8567414c1d9cc1de99dbb9f6d45e58f
2020-08-19 00:40:46 -07:00
qctecmdr d5ce106054 Merge "asoc: dsp: Fix possible invalid memory access due to race condition" 2020-08-17 02:36:41 -07:00
qctecmdr 715239272c Merge "dsp: Add support for GET_PARAMS" 2020-08-11 05:58:21 -07:00
Vangala, Amarnath 63e3506834 asoc: dsp: Fix possible invalid memory access due to race condition
Fix for possible double free issue in speaker protection implementation.
Replace vulnerable code with safe call flow.

Change-Id: Id96cf97dd60d85897d64f1d8f2440a5b6de3ba61
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
2020-08-11 17:42:47 +05:30
qctecmdr 73d67e6681 Merge "ASoC: sdm660 audio changes" 2020-08-04 23:06:56 -07:00
Harshal Ahire 33bc91026b dsp: Add support for GET_PARAMS
Add support to query module parameters from ADSP.

Change-Id: Ie63dd95cf27277f9c836becc98952d48971a3ec3
Signed-off-by: Harshal Ahire <hahire@codeaurora.org>
2020-08-04 21:36:54 +05:30
qctecmdr cf2f4518e2 Merge "adsp-loader: Fix compilation error" 2020-07-30 01:44:59 -07:00
qctecmdr 23bae5f1dc Merge "dsp: fix mute for AptX Adaptive A2DP streaming" 2020-07-30 01:44:59 -07:00
Vangala, Amarnath 4732998c6d dsp: fix to race condition in voice call mute command handling.
Apply the cached value of device mute setting to dsp,
after voc state moves to RUN.

Change-Id: I82bc9ab2d49a199f0277b1694cd00311eddd6115
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
2020-07-28 09:30:19 -07:00
Soumya Managoli d11d6f06c9 ASoC: sdm660 audio changes
Enable compilation for sdm660 target.
Bring in sdm660_cdc codec driver.
Bring in sdm660 machine driver.
Update codec driver to component driver to align
with kernel-4.19 ALSA.

Change-Id: I927a032d077bcce6b3dcc4a95445e8b1e86d461a
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2020-07-28 00:39:26 -07:00
Xiao Li da73727233 adsp-loader: Fix compilation error
Print the variables of size_t length using '%zu' to fix compilation error.

Change-Id: I56b15d56a213d994d278d353336afefe0907a426
Signed-off-by: Xiao Li <xiaolee@codeaurora.org>
2020-07-27 17:02:19 +08:00