Commit graph

12 commits

Author SHA1 Message Date
kunleiz
15c87d11b5 lsm: check payload size validity before using it as array index
Payload size validity is not checked before using it in array index.
Check payload size to avoid out-of-boundary memory.

Change-Id: Ic0b06bb331fc1753ff7543bb218ab12d6a4a3ca8
Signed-off-by: kunleiz <kunleiz@codeaurora.org>
2019-04-29 02:14:22 -07:00
Soumya Managoli
06cd2ea4b5 ASoC: msm: qdsp6v2: Update LSM param hdr size
q6lsm_pack_params requires param hdr size
to be filled and sent as argument.
Change is to update size with param_hdr_v3 struct size.

Change-Id: Id2380f3ceb887e1fc73b7f5f8e28ac93029082e4
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2018-07-06 05:01:11 -07:00
Aditya Bavanari
d17e5ec06a ASoC: msm: qdsp6v2: Update LSM driver to support Instance ID
Add support to set and get LSM module params with
Instance ID support. Maintain support for non
Instance ID set and get param structures as well.

CRs-Fixed: 2151551
Change-Id: I138cceb5165443da899e7c152fd6c8a05a6efe98
Signed-off-by: Siena Richard <sienar@codeaurora.org>
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2017-12-21 11:08:50 +05:30
Bhalchandra Gajare
8e2a6512dc ASoC: msm: qdsp6v2: allow zero size calibration for LSM
It is possible that LSM (Listen Stream Manager) could have an usecase
that does not need any audio calibration. In such cases, currently
the driver returns an error and does not allow the usecase setup with
LSM causing the usecase to fail. Fix this by allowing zero size audio
calibration for LSM.

CRs-fixed: 2031503
Change-Id: I42d89792a4fd6a0d6e1908a36720680b63ff0c30
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2017-04-17 15:38:43 -07:00
Chaithanya Krishna Bacharaju
f7b4f38b89 ASoC: msm: qdsp6v2: Extend LSM support to 48khz, 24bit and 4 channel
Enhance LSM code to support maximum configuration of 48khz, 24bit
and 4 channel.

Change-Id: I03895c983527d87389ca69e85235b1def5b4a2fa
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Signed-off-by: Revathi Uddaraju <revathiu@codeaurora.org>
2017-01-30 23:39:57 -08:00
Chaithanya Krishna Bacharaju
1f5681eec2 ASoC: msm: qdsp6v2: Add timestamp support for lsm detection event
Add support to parse LSM_SESSION_EVENT_DETECTION_STATUS_V3
in cases where event status requires timestamp corresponding
to detection.

Framework mode config is set to timestamp mode in cases where
LSM_SESSION_EVENT_DETECTION_STATUS_V3 is required.

Change-Id: Id0da3b24d55ac56ff6b61372ede9c63f50b2f4d4
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Signed-off-by: Revathi Uddaraju <revathiu@codeaurora.org>
2017-01-31 12:43:11 +05:30
Revathi Uddaraju
6df96093b3 ASoC: msm: qdsp6v2: Add support to connect LSM to ADM
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>
2017-01-30 16:54:59 +05:30
Chaithanya Krishna Bacharaju
dc9fbad38f uapi: lsm_params: Add interface to disable polling
Polling needs to be disabled when LSM connects to ADM.
Add interface to enable or disable polling through
set_params. Add support to set port.

Change-Id: If027418a6d8a1ea48dcb6a0c146f68e7dd7a2664
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Signed-off-by: Revathi Uddaraju <revathiu@codeaurora.org>
2017-01-30 15:11:23 +05:30
Walter Yang
febf4856e5 ASoC: msm: set pointers to NULL after kfree
In lsm-related driver files, some pointers are not set as NULL
after the memory is freed, which will leave many dangling pointers.
Set them to NULL explicitly to avoid potential risk.

CRs-Fixed: 997059
Change-Id: I44925240705608510266a51225cc02611637c571
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
2016-08-01 10:41:48 +08:00
Ben Romberger
b65caeaa32 ASoC: msm: qdsp6v2: Change audio drivers to use %pK
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>
2016-05-24 11:58:34 -07:00
Laxminath Kasam
6d4b0deeb6 ASoC: audio: update API name for populate upper 32bits
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>
2016-03-23 21:13:03 -07:00
Sudheer Papothi
be1a516dcb ASoC: msm: Add Audio drivers for MSM targets
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>
2016-03-23 20:11:25 -07:00