Check the size of ADSP payload before accessing it.
CRs-Fixed: 2380694
Change-Id: Icdc19a85b39a397ba6d7177f42ece4626b901832
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
Return error only if apr_send_pkt() function
return code is less than 0.
CRs-Fixed: 2262017
Change-Id: I98903c6c275f360d32c3af523352071d92d1ef85
Signed-off-by: Aditya Bavanari <abavanar@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: Ic8d7c63d317baba09768d08bc723a6b097322f63
Signed-off-by: Cong Tang <congt@codeaurora.org>
Update channel mixer weight controls to support maximum 32 channels
then it could configure maximum to 32 channels by apply
weight coefficient.
Change-Id: Ibf9c130ceba23fbe086c640505c8e348c40d9ffe
Signed-off-by: Cong Tang <congt@codeaurora.org>
HLOS update adm driver to support ADM_CMD_OPEN_V8 for 32 channels
playback and capture capability. The endpoint payload of this
cmd should be the real channel mapping length and aligned with
four bytes.
Change-Id: I943259108becdfd27a68ce597bee37641cfc8339
Signed-off-by: Cong Tang <congt@codeaurora.org>
The fixed issues include variable initialization missing and improper NULL
pointer checking.
Change-Id: I5302cf84f7f0414fe0cf69ccc0cafc8225142c5f
Signed-off-by: Tony Han <xiahan@codeaurora.org>
When the return value of adm_populate_channel_weight is 0, it should
keep running, not return error.
Change-Id: I447b81d6edfc89db6cb3742c1719e745c6071c12
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Add support to set and get dap modules params with
Instance ID support for both Dolby and DS2.
Maintain support for non Instance ID set and get param
structures as well. Use common pack and set param
functions to set and get parameters to DSP instead of
handling them at an individual module level.
CRs-Fixed: 2151551
Change-Id: Ic2722cf5d686a7b10c682ca7866f7900da9d0cdb
Signed-off-by: Siena Richard <sienar@codeaurora.org>
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Add support to set and get ADM module params with
Instance ID support. Maintain support for non
Instance ID set and get param structures as well.
Use common pack and set param functions to set and
get parameters to DSP instead of handling them at an
individual module level.
CRs-Fixed: 2151551
Change-Id: Ida9591e96501a2edbffe080eb8531c860bde8539
Signed-off-by: Siena Richard <sienar@codeaurora.org>
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Routing driver reuses the same adm for streams with the same
app_type, sample_rate etc. This isn't allowed for ULL streams
as per the DSP interface. We need to open a separate COPP
port for concurrent ULL streams
CRs-Fixed: 2083105
Change-Id: I569b32830145d6dae99449d0bc4148b2f60b101d
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Acked-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
Add support for set params on ASM/ADM for MFC and
Volume modules. Make PSPD mitrix set param api generic.
Change-Id: I75a5b9e3fd2316b75be41439848f89190944bc36
Signed-off-by: Varun Balaraj <varunb@codeaurora.org>
Add matrix limiter to ADM. Limiter is used to
prevent saturation when mixing multiple audio
streams. It should be applied after ADM open
but before ADM matrix map.
Change-Id: I6787fe869e8ceee13694245b744ecd74c3a49682
CRs-Fixed: 2064258
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Different COPPs can be mixed into one POPP when recording
data. Use ADM_CMD_SET_PSPD_MTMX_STRTR_PARAMS_V5 cmd to support
this requirement.
Change-Id: If079b586fafe84f7dec7732c7037af2f59f063c7
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Add DSP transcode loopback. Userspace can use this driver
to support TX to RX audio HW DSP loopback.
CRs-Fixed: 2049714
Change-Id: Ie83f5ca2c626c8fffbec4624f3e35c6c179d4c8c
Signed-off-by: Siddartha Shaik <sshaik@codeaurora.org>
Remove size checking when looking for ADM calibration.
If no calibration is active for that device a size of
0 is sent. If size is checked while finding calibration
while multiple devices on the same path are active a
device where no calibration is expected will improperly
pull calibration for a different device.
Change-Id: Idfc68e879a615873c8b23d3ec4ddf8dc1dfc777c
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Eagle driver is not in use any more.
Remove the code and associated calls
to it.
CRs-Fixed: 1103106
Change-Id: Ice5333861beda9538f0783b70b3267523d16fd2b
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Add mixer control to swap the speaker channels.
Use MFC module to update the channel mapping.
When playback is started with speaker device and
device orientation changes, swapping L/R channel
mixer control command is sent to DSP with the MFC
module.
CRs-Fixed: 1026248
Change-Id: I1d80ecc7f1e3cfb8f8cdf71c384e92a07023be5c
Signed-off-by: kunleiz <kunleiz@codeaurora.org>
Add memset of adm open v5 and v6 structure before
value assignment to avoid warning of uninitialized stack.
CRs-fixed: 1112462
Change-Id: I18681f6b191e96118fde9ae774d105dc6b677858
Signed-off-by: Derek Chen <chenche@codeaurora.org>
Add support for multi-copps for multiple BEs with independent
calibration data. This allows for more accurate calibration of device
copps.
CRs-fixed: 1110411
Change-Id: I72ce501408a474eb620a088172e3c4d789ab5ef0
Signed-off-by: Siena Richard <sienar@codeaurora.org>
LSM will connect to ADM to apply preprocessing and improve
detection performance. LSM can also directly connect to AFE
similar to the existing mechanism.
MAD polling will be disabled in case of LSM connects to ADM.
Add EC reference end channel, bit format and sample rate control
to configure far end params for Echo Cancellation.
Change-Id: I4684ae346884d656e95350b7a63929b91a843512
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Signed-off-by: Revathi Uddaraju <revathiu@codeaurora.org>
Allow MIC channel selection as the primary channel requested
by the application on Multichannel Echo Cancellation module.
CRs-fixed: 1102004
Change-Id: I94ba0f3171b4c7ebcc9936ca4f192f68de7be034
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
Signed-off-by: Derek Chen <chenche@codeaurora.org>
Add overflow check for param length to prevent
heap overflow while allocating memory for
ADM parameters.
CRs-Fixed: 1103334
Change-Id: I1163aeaabbc84dba4cd0739a35ecbdee18b42717
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
Add control via ADM set PP Params to control volume of ICC
through a mixer command "Internal ICC Volume".
CRs-fixed: 1025376
Change-Id: I2b7099fe6d3a510859af42f1ac37a6db6e1b453c
Signed-off-by: Derek Chen <chenche@codeaurora.org>
Add support for ADM_CMD_DEVICE_OPEN_V6 when the mixer path
specifies to use the multi-mic-echo-reference, which configures
the EndPoint2 for Echo Reference.
CRs-fixed: 1022080
Change-Id: I474f39a3437fa18003f4342e003d689b95837699
Signed-off-by: Derek Chen <chenche@codeaurora.org>
Since we move to GEF implementation for Dolby post processing,
disabling DAP/DAX2 driver logic on msm8998 target except for
license validation.
CRs-Fixed: 1094027
Change-Id: I33c5625026611856f6cdd8c6e0b5d7ef229ba8c7
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
With support of playback for native 384kHz, it is recommended to avoid
resampling in afe even for non fractional rates, hence enable media
format converter in all usecases whenever resampling is needed.
Change-Id: I94b9091b8349d6388fbe5c29eabe3666c86e5cce
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
Check if index is a non-negative value before it is used.
Also, initialize return variable to default value before
it is used so that it does not return uninitialized value.
CRs-Fixed: 1059495
Change-Id: I94a6fc02436734b4f398d1a72f53b3ae68612679
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
Timeout error is observed while waiting for
ADM_CMD_SET_PP_PARAMS_V5 command's response.
Fix the condition logic in wait_event_timeout()
to match the value set in adm_callback() when
response to ADM_CMD_SET_PP_PARAMS_V5 is received.
CRs-Fixed: 1030674
Change-Id: I711c860dc3de479eec0d22369d19615aef572ea1
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
Add pointer validation checks to prevent sending
invalid handles to ADSP as part of unmap memory
regions command.
CRs-Fixed: 1018367
Change-Id: I0dfb2fccb4414ed82ee10d73576fda66a273043d
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
Change all qdsp6v2 audio driver to use %pK instead
of %p. %pK hides addresses when the users doesn't
have kernel permissions. If address information
is needed echo 0 > /proc/sys/kernel/kptr_restrict.
Change-Id: I7baa9f127266726fecf9238167a1e0128a258847
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Set token value with port index and copp id so that
correct wait queue handle can be deduced in the
callback of adm_set_stereo_to_custom_stereo command.
Change-Id: Ica4c1442c1143f46de2baa6eaf1890ad0cb4b742
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
Add NULL check for the pointer to make sure memory is
allocated. Add array boundary check for the index
before using the same array.
Change-Id: Ifd35ca0c0a1cbeee18d7797ea6b43ea31be0eeba
Signed-off-by: Viraja Kommaraju <virajak@codeaurora.org>
Audio drivers to configure ADSP MFC in cases where fractional
resampling is needed.
Change-Id: Ifc85ff788347ddd893f8858064f71a07fa1ddd9c
Signed-off-by: Sidipotu Ashok <sashok@codeaurora.org>
In audio ion driver, append msm_audio_ to API
populate_upper_32bits to maintain consistency
across other API names in this driver.
Change-Id: I72aace56bf8e80c6dd83f768876253d2c7f334bb
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add snapshot for audio drivers for MSM targets. The code is
migrated from msm-3.18 kernel at the below commit/AU level -
AU_LINUX_ANDROID_LA.HB.1.3.1.06.00.00.187.056
(e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1)
(Promotion of kernel.lnx.3.18-151201.)
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>