Commit Graph

41 Commits

Author SHA1 Message Date
qctecmdr
4e91300a68 Merge "dsp: add support for CMA heap allocation during call" 2020-07-30 01:29:53 -07:00
Kunlei Zhang
d9bf6df220 dsp: add support for CMA heap allocation during call
Add support for CMA heap allocation during call.

Change-Id: I65cd291a9db56bf53d9bb9b4e6c7236da9d7288c
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2020-07-27 11:53:28 +08:00
Vangala, Amarnath
d6093c7f6c 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-16 12:47:53 +05:30
Dhananjay Kumar
02aa9f5f33 dsp: voice: Reset music_info on SSR
Reset music_info playback states during SSR to fix incall music session
failure after SSR.
Music delivery session requests are getting ignored if the state is not reset.

Change-Id: I7dd736baa538fb3697c874230c5a9c02f90b6a06
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2020-07-09 00:11:46 +05:30
Aditya Bavanari
7c7ad13625 dsp: voice: Remove common lock before sending unmap command
Remove common mutex lock before invoking unmap physical
memory command to avoid deadlock issue between voice lock
and common lock in concurrency use cases.

Change-Id: Iaca089f4ff1b6da16e0e59939088fb59516362aa
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-04-01 13:00:05 -07:00
Aditya Bavanari
f5ec84824d dsp: fix MFC config param payload alignment issue
MFC set param failed in DSP due to payload mismatch
and stereo echo reference doesn't work.
Channel type parameter in MFC config payload is an
array of uint16_t, but it is assumed as an array
of uint8_t while copying from device structure.
Fix this by copying the channel type one by one
instead of using memcpy.

CRs-Fixed: 2197468
Change-Id: I4b6959e8db56743ac98da75ddc3aa8f56964b4ca
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-11-07 23:18:53 -08:00
Meghana Reddy Mula
6420f70b2d dsp: Add new mixer control to reset ecns
Add support for mixer control to enable/disable
ecns module for voice call.

Change-Id: I085411c4a6394d27880f8055b3348c1eb5f2b6ff
Signed-off-by: Meghana Reddy Mula <mmula@codeaurora.org>
2019-10-29 16:04:27 +05:30
Ajit Pandey
9d6160b373 dsp: q6voice: Reset dma_buf pointer to NULL in case of failure
In case of voice_alloc_rtac_mem_map_table() failure no memory get
allocated for rtac but dma_buf pointer might get corrupted and may
point to some unmapped memory region. Since we are only doing NULL
pointer check for dma_buf in method is_rtac_memory_allocated() we
need to reset such pointer to NULL in failure case.

Change-Id: I5e81adad4e302620757375f87fa15344e07dccf8
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
2019-10-18 04:48:37 -07:00
Aditya Bavanari
dc3f7e4680 dsp: voice: Add support for CVD version 2.4
CVD version update is needed to support a new modem
feature. Add support for CVD version 2.4 in internal version
mapping table.

Change-Id: I26627e3c88b424acca8f85696dd58d7ce2e944d9
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-07-11 18:31:59 -07:00
Arun Mirpuri
eb1d6887b1 dsp: add incall stereo capture
Add support for incall stereo capture for voice uplink
and downlink capture

Change-Id: Id23448990170b8215f547073608cd6a998d479ae
Signed-off-by: Arun Mirpuri <amirpuri@codeaurora.org>
2019-04-29 10:38:53 -07:00
Linux Build Service Account
fb966ab3ae Merge "dsp: q6voice: Check size of payload before access" 2019-03-14 06:55:27 -07:00
Linux Build Service Account
ba543e1f8f Merge "dsp: q6voice: Check size of payload before access" 2019-03-14 06:55:22 -07:00
Vatsal Bucha
0714ffdfcb dsp: q6voice: Check size of shared memory buffer before access
Check buffer size in qdsp_cvs_callback before access in
ul_pkt.

Change-Id: Ic19994b46086709231656ec747d2df988b7a512f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-03-12 22:42:21 -07:00
Tanya Dixit
be0391da6c dsp: q6voice: Check size of payload before access
Check size of payload array before access in qdsp_cvp_callback.

Change-Id: Ic5ea6686a1a09df75ddd5e6fdcdfbd74efff83d8
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
2019-03-12 22:22:02 -07:00
Tanya Dixit
d591f497ce dsp: q6voice: Check size of payload before access
Check size of payload array before access in qdsp_mvm_callback.

Change-Id: I81d945f963cfb4a3cb26155700b82880d891ec5e
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-03-12 22:15:55 -07:00
Vikram Panduranga
7dbdc9aa69 dsp: q6voice: call voice MHI start/end APIs
Whenever a voice call starts or ends q6voice shall call
voice_MHI API to enable or disable MHI voting respectively.

Change-Id: Ia1125fb96c67ff6fec2242bc2b482ef7017dfb7d
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2019-01-30 23:43:02 -08:00
Meng Wang
688a867091 asoc: Update file header to GPL-2.0-only
Update file header to GPL-2.0-only.

Change-Id: If16bf92f951c6d7521f56a3e9b91da2ca2ccf6f8
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-01-29 13:43:33 +08:00
Meng Wang
61af6849e9 ASoC: switch audio drivers to SPDX identifier
Switch audio drivers to SPDX identifier on msm-4.19.

Change-Id: Ic3f0230a516db251b8d81e8a7e73dbc04d66fe1b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-07 15:47:32 +08:00
Vignesh Kulothungan
6905ecf027 dsp: add support for mic break detection
Add capability to receive notifications from voice service
when there is a change in mic break status during a voice call.
On receiving notification, send an uevent with mic status to userspace.

CRs-Fixed: 2211324
Change-Id: Ie55bd1490fd8cead7261b70169ae36eba95e4011
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-09-06 16:33:54 -07:00
Vikram Panduranga
99b0a75be7 dsp: fix total size in set ui property
Total size was incorrectly adjusted after determining
IID param size in SET_UI_PROPERTY. Fix total size with
correct APR packet and param sizes.

Change-Id: I5874b470811733e60b40cc240d4c0db995b30bac
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2018-08-09 11:24:40 -07:00
Linux Build Service Account
ec7e65b420 Merge "dsp: preload voice and copp topologies" 2018-07-01 10:20:31 -07:00
Vikram Panduranga
6e55ad86b2 dsp: preload voice and copp topologies
Set topology info to q6core service in ADSP so that the
modules in a topology can be loaded before the usecase starts,
thus reducing usecase setup latency. The same topology is
unloaded before vocproc or copp is destroyed or replaced.

Change-Id: I5f8872130fb09f049e080c61edb8bb0b05e5e2de
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2018-06-28 11:05:25 -07:00
Vignesh Kulothungan
13d5a9666a dsp: Initialize variable before use
Initialize variable before use in voice driver.

CRs-Fixed: 2209691
Change-Id: I84b51262b5c3cb12ea23372eb7c7109c6ff844b4
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-03-26 14:47:17 -07:00
Meng Wang
e60843d16c dsp: correct comparison condition for VSS_ICOMMON_RSP_GET_PARAM_V3
VSS_ICOMMON_RSP_GET_PARAM_V3 should be compared with opcode. Otherwise the
if condition would always be true. Correct the comparison for
VSS_ICOMMON_RSP_GET_PARAM_V3.

Change-Id: I204c8c71e06b13332fd5b418a40b10618e19a901
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2018-03-21 13:50:17 +08:00
Linux Build Service Account
16b93f5551 Merge "dsp: Change default topology for voice Tx path" 2018-03-08 04:02:51 -08:00
Vignesh Kulothungan
1ccc875287 ASoC: dsp: Update rtac driver to support Instance ID
Add support to set and get rtac 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: Ic96e83477e72dc5ffa4d87a1e98c34814bbd0b8d
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-03-04 23:07:03 -08:00
Vikram Panduranga
d5a6778200 dsp: Change default topology for voice Tx path
Assign default topology to NULL topology instead of ECNS topology
for voice Tx path.

Change-Id: Ie39711b43b5d94ee93debc3054c26445e7583d70
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2018-03-03 23:26:26 -08:00
Vignesh Kulothungan
cc3ff17850 ASoC: dsp: Update voice driver to support Instance ID
Add support to set and get voice 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: I045e27710d69304f234ace1ff6c80afdd4a4041c
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-03-03 15:16:04 -08:00
Banajit Goswami
08bb73698a dsp: update MSM Audio ION wrappers to align with upstream
Between Linux-4.9 and Linux-4.14, upstream has updated the
ION APIs significantly to make ION ready to bring out of
staging folder. This has changed the way ION and dma_buf
APIs used to work together for allocating, mapping and
deallocating ION buffers.
Update MSM Audio ION wrapper functions used by audio drivers
to reflect these ION API changes as per upstream ION.

Change-Id: I63097e147a397aa3a538f69ac88b6fb10871c3dc
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2018-02-04 03:41:06 -08:00
Linux Build Service Account
463b274f59 Merge "dsp: assign channel mapping to three channel voice Tx devices" 2017-12-16 03:09:17 -08:00
Aditya Bavanari
a8349a42c7 dsp: assign channel mapping to three channel voice Tx devices
Assign default channel mapping to three channel voice Tx
devices when the topology specific info cal data is NULL.

Change-Id: Ic9d572edc1d7de07a2bd5e11d82f875368c35854
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2017-12-12 22:20:10 -08:00
Asish Bhattacharya
5faacb3a7e ASoC: allow drivers to compile both static and dynamic
Based on where the code is synced the driver should allow
both static and dynamic linked compilation.
Also remove __exit for modules loaded from another common
init/exit functions.

Change-Id: Ib58f152002aba3af4446f9bbd9b82c279212bd0a
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2017-12-07 19:57:27 +05:30
Laxminath Kasam
8b1366a648 Audio: DLKM support for all audio modules
Switch to DLKM for all audio kernel modules.

Change-Id: I6a96023a21f655f873531af9ace81f2b01eb0f58
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-11-02 13:42:09 +05:30
Aditya Bavanari
88513a31e5 dsp: add support to set topology specific info in voice usecases
Add support to set number of channels and channel mapping to DSP
as per the info received from ACDB files along with topology
for a device in voice usecases instead of reading from
backend configuration. When topology specific channel info is
not supported, send the default no of channels and
channel mapping as per backend to support backward compatibility.

CRs-Fixed: 2110934
Change-Id: Iad512474fc25c906d97513f6648cd8ba6244eda1
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2017-10-14 11:51:35 +05:30
Linux Build Service Account
19d7949681 Merge "dsp: allocate contiguous memory for version information" 2017-09-20 17:55:21 -07:00
Siena Richard
2d0102dd44 dsp: allocate contiguous memory for version information
Allocate contiguous memory for version information instead of splitting
it across the stack and heap to centralize memory and improve
readability.

CRs-Fixed: 2104576
Signed-off-by: Siena Richard <sienar@codeaurora.org>
Change-Id: Id7b5942522da6312da57bfef3d3c0b55934fe1d7
2017-09-13 11:15:43 -07:00
Aditya Bavanari
245361df38 dsp: fix 2nd channel mute in VPRx out for Stereo EC ref
In Stereo EC reference, mute is observed in VPRx output
of 2nd channel when only speaker device uses custom MFC topology.

When handset and speaker use the same custom topology, issue is not
observed. Because when DSP VPRx module creates the
custom topology with handset configuration (1 channel and
center channel mapping) and device switch to speaker occurs
MFC conversion from center to left and right channels is successful.

But in case where handset uses default topology, when device
switch to speaker occurs, VPRx creates the custom topology
with speaker configuration(2 channels and left mapping). So,
when MFC config is received, only left->left mapping is done which
leads to mute in right channel.

Fix is to send the channel mixer configuration to MFC module
so that both left->left and left->right mapping is done.

CRs-Fixed: 2102374
Change-Id: If9be09866615e6623e78f48b9841eb068c825992
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2017-09-11 23:02:33 +05:30
Aditya Bavanari
f0cb90b1f7 dsp: assign channel mapping for Quad Mic use case
Assign channel mapping for Quad Mic voice use case
in channel info command during voice setup
as DSP requires channel mapping to be sent with
default values.

CRs-Fixed: 2097341
Change-Id: I661f845c26f8639e5e8dffa430ecc8cb3b3e8780
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2017-09-11 23:02:26 +05:30
Laxminath Kasam
8f7ccc2e6f audio-lnx: Add latest snapshot for audio drivers.
Propagate the changes based on latest snapshot
for audio kernel source tree at below cutoff of
kernel msm-4.9 -
(040750bfa78 -
 "Revert "ARM: dts: msm: Add DT node for aop-qmp
  clock controller on SDM845 v2"")

CRs-Fixed: 2104096
Change-Id: I0927c40b3a188dbf892e7ec4c1c7810953724929
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-09-04 20:12:56 +05:30
Laxminath Kasam
38070be30b audio-lnx: Add latest snapshot for audio drivers.
Propagate the changes based on latest snapshot
for audio kernel source tree at below cutoff of
kernel msm-4.9 -

(aed56b2df75 - "drm/msm/sde: update te vsync enable sequence change")

Change-Id: I7ed5102146986b81e5cb9ca55432360b3549b60c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-08-24 03:53:42 -07:00
Laxminath Kasam
605b42f92c audio-lnx: Rename folders to new flat structure.
Kernel audio drivers can be categorised into below folders.
asoc - ALSA based drivers,
asoc/codecs - codec drivers,
ipc - APR IPC communication drivers,
dsp - DSP low level drivers/Audio ION/ADSP Loader,
dsp/codecs - Native encoders and decoders,
soc - SoC based drivers(pinctrl/regmap/soundwire)

Restructure drivers to above folder format.
Include directories also follow above format.

Change-Id: I8fa0857baaacd47db126fb5c1f1f5ed7e886dbc0
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-08-18 16:56:12 -06:00