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>
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>
Set initial vaue for cfg_type to avoid possible
accessing of uninitialized variable.
Change-Id: Ib2fa91202442a656915263694bd6fbf5cd663544
Signed-off-by: Zhou Song <zhous@codeaurora.org>
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>
Add change to fix cal_data index out of bounds error.
Change-Id: I8c8e62835e496c0f35fdc09757f4206c52020727
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
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>
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>
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>
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>
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>
Add FE and BE support for QUAT and SEN TDM interface.
Change-Id: Ic1fb96b1d5004f07849673e1e6369609652f0dc1
Signed-off-by: Sanjana B <sanjb@codeaurora.org>
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>
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>
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>
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>
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>
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>
Add change to address the race condition between
pointer dereference and memory deallocation.
Change-Id: Ia1ed47986ec81d3dc2feb3bc874847fadddac292
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
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>
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>
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>
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>
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>
Set correct number of speakers for Speaker Protection V4.
Change-Id: I66c656174bef64d3cdd64b17d994073e9ee58472
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
Add support to query module parameters from ADSP.
Change-Id: Ie63dd95cf27277f9c836becc98952d48971a3ec3
Signed-off-by: Harshal Ahire <hahire@codeaurora.org>
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>
Print the variables of size_t length using '%zu' to fix compilation error.
Change-Id: I56b15d56a213d994d278d353336afefe0907a426
Signed-off-by: Xiao Li <xiaolee@codeaurora.org>