Add change to address the race condition between
pointer dereference and memory deallocation.
Change-Id: Ia1ed47986ec81d3dc2feb3bc874847fadddac292
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
AUDIO_RX_MONO_VOIP module in COPreP topology doesn't support
stereo input. Update channel number to mono for
AUDIO_RX_MONO_VOIP_COPP_TOPOLOGY.
Change-Id: I23632808cfcf82496f0e8f9618e28915974fc584
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
Add support for CMA heap allocation during call.
Change-Id: I65cd291a9db56bf53d9bb9b4e6c7236da9d7288c
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
For multi COPP feature it could only allow POPPs with same app_type
to connect single COPP. But it's possible to connect different POPPs
with different app_type to single COPP, to achieve this, it should
skip the app_type check when create copp_idx.
Change-Id: I9da6e84b8ef4a5e13d29d71c016b114ea759b94f
Signed-off-by: Viraja Kommaraju <virajak@codeaurora.org>
Remove reset of rx ec ref channel for adm after using,
if the channel value is not changed, user space won't
set it to driver again, then causing adm opening failed.
For Source Tracking adm_get_param, param_hdr (struct param_hdr_v3) size
being sent was different as param_hdr(struct param_hdr_v1)size used for
offset of virtual memory to copy the param data in out-band case get_param.
Change-Id: I01dd4f704cc5b6994f1203a0e28199a6936cba7f
Signed-off-by: Avinash Chandra <avicha@codeaurora.org>
Add support for DSD in MI2S interface and corresponding api updates
from ADSP.
Change-Id: I494205763fa429f95e43497ed5b8f91332f5a2a3
Signed-off-by: Sanjana B <sanjb@codeaurora.org>
FLUENCE_SM module in COPreP topology doesn't support
stereo input. Update channel number to mono for
VPM_TX_VOICE_FLUENCE_SM_COPP_TOPOLOGY.
Change-Id: I7de7b49706387b09031f67e1a0271db1825cb81d
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
There's no need to include sound/asound.h directly.
Remove it to work with KERNEL_HEADER_TEST and
UAPI_HEADER_TEST.
Change-Id: If09b58f683ad224b549f6f53dd34157ba0956ea4
Signed-off-by: Meng Wang <mengw@codeaurora.org>
ADM supports certain modules that can have very large calibration sizes,
in such cases the calibration is expected to be persistent in memory.
Add new cal type for this purpose.
Change-Id: I2d1fb219a3748d0ead5ca2199da2b55669f2550e
Signed-off-by: Ramlal Karra <rkarra@codeaurora.org>
Currently, the length of timeout in adm_open for waiting response
from ADSP is 1 second. To prevent unnecessary timeout that results
adm_open failure, increase the length of timeout to 2 seconds.
Change-Id: I670f44964538c3176130c4bb5f8b7a3b3eaf8d8b
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
Some ECNS topologies can't support sample rate of 48KHZ,
reset it to 16KHZ for such use cases.
Change-Id: I5d0457feb2e74929546746fd4b184f2d7e065fbb
Signed-off-by: Yunfei Zhang <yunfeiz@codeaurora.org>
In programable channel mixer, path type is derived based on
afe port id. Due to this, wrong path type is obtained in case
of loopback usecase where Rx port is used to capture ec ref
signals. This leads to wrong channel map being set in channel
mixer. Instead use session type to obtain path type.
Change-Id: I5292ed5eed1366ac28d72e4ca0815ab62e91fa60
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Reset ec ref port id to invalid port after use to ensure
it is not picked for other adm sessions.
Change-Id: I802326122ad6dc63c7f2df16169da3f50559202f
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Add interface for userspace to control FFECNS effect.
Change-Id: I78010899e6c193726a79d74e86f13a1546106eff
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Remove the dependency on dedicated config flag for the
use of new API versions in ASM and ADM open commands.
Dependency is now on ADSP service version only.
Change-Id: I2e7bcec675bafb9ad9e2a10df4ccc1e52bb72c92
Signed-off-by: Dieter Luecking <dieterl@codeaurora.org>
Define channel map for channel count 14 for adm and asm to
support capture usecases for this configuration.
Change-Id: Ieb43dafd05f88bf34fa512fd7268258163e9ac92
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Add check for mfc channel count before issuing mfc
media format command.
Change-Id: I0541d6651ecfcc90562ec0d9a632d039e34658cf
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Add multi channel map support per afe port.
Change-Id: Ib032d1c81d918417f516131f11c500e4f6668b39
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Validate payload size before accessing data from ADSP.
Modify payload size checks to accommodate for variable
payloads, payload size vary from size of one integer to
many based on opcode and other variables.
CRs-Fixed: 2380694
Change-Id: Ic5e0eb72441da8f29cf645968c9df09e7803701a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
Add support to process ec at channel count other than the
playback channel count by providing ability to set downmixed
channel count and downmixing weights to be used to downmix
ec ref data obtained from playback path.
These configs would be used to explicitly configure MFC module
present in ec ref path, for usecases where ec processing cannot
be done at playback channel count due to algorithmic or resource
limitations.
Change-Id: Iaa80a0f0da3697c55751b2201578252d6466d3b5
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Allow to mark entries in a channel map as unused to prevent mixing other
channels in that slot.
Change-Id: I06f7de932dec4d30b2d6cfe04460d07ddad89049
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
echo reference value reset after open leads to second SVA session
without echo. Undo the value reset.
Change-Id: Ie6ae357108beed0c8f034a3408c494475376e486
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Check the size of ADSP payload before accessing it.
CRs-Fixed: 2380694
Change-Id: Ib0c0f0bf6c7f7cf659df0eb70a3f66cee580cb66
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
FLUENCE_EF module in COPreP topology doesn't support
44.1Khz sample rate. Set sample rate to 16Khz for
VPM_TX_DM_FLUENCE_EF_COPP_TOPOLOGY, which contains
FLUENCE_EF module.
Change-Id: I527da1a70cacba1014b2a706216172d12066b909
Signed-off-by: kunleiz <kunleiz@codeaurora.org>
ec ref rx port is defined as integer and it is
set to 0xFFFF (AFE_PORT_INVALID) when ec controls are reset.
Due to this the current check against -1 (0xFFFFFFFF) in
adm open will always return true even after controls are reset.
This leads to adm open failures in case no ec ref channels are
set as part of record usecase. Avoid this by checking ec ref rx
port against AFE_PORT_INVALID.
Change-Id: I0d52bbe2a980d495933239315e6bba193a18567e
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Enhance Channel Mixer control for MultiMedia Frontends to
get custom channel mixer coefficients from userspace and
use it during device routings to control stream to device
channel mappings.
Change-Id: Ifedac25de5ae6bad1092b66ec405bba66a80f608
Signed-off-by: Cong Tang <congt@codeaurora.org>
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
ADM open is failed due to payload size not getting updated
with ec reference size. Update EC reference port only if
EC reference channels are configured.
Change-Id: Ic2dd6a3cf805c1ea40d71d0b62b6e867167d169e
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
Reduce the amount of time driver waits to get a response from ADSP.
Current wait time in some cases is 5 secconds, which might cause
user space crashes in Android P. So reducing the timeout to
1 second.
CRs-Fixed: 2318751
Change-Id: I6b6789aa5b408659dd57f8f6b017df52d14b28aa
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
- AFE_LOOPBACK_TX BE is the dummy backend created to
establish the EC reference capture path. While
opening COPP pass playback port id instead of
AFE_LOOPBACK_TX to get reference stream data from
AFE RX port.
- Add session type support in creating new COPP and
while checking for existing COPP.
CRs-Fixed: 2080421
Change-Id: I979f3ce1009cc18ff14130bebb8bd51a78fbe5ac
Signed-off-by: Surendar Karka <skarka@codeaurora.org>