Commit Graph

52 Commits

Author SHA1 Message Date
Bhalchandra Gajare
bbb641427b dsp: q6adm: add ADM_LSM_AUDPROC_PERSISTENT cal type
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: Ieb2e941036595b7dff4b8bfb341f2ec152cf648a
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2018-06-19 15:50:19 -07:00
Bhalchandra Gajare
6ee5b50fd4 msm-lsm-client: decouple input and output hardware parameters
With multichannel voice activation support in LSM, it could be possible
that the input media format/hw_params to LSM would be different than
the output media format/hw_params. This change decouples the input
and output hw_params for LSM. The output hw_params are obtained through
ALSA pcm_hw_params operation, whereas the input hw_params are obtained
though the LSM_SET_INPUT_HW_PARAMS ioctl to LSM.

At the same time, the below parameter IDs are added to send the channel
information to LSM service:
	- LSM_PARAM_ID_MEDIA_FMT_V2
	- LSM_PARAM_ID_LAB_OUTPUT_CHANNEL_CONFIG

Change-Id: Ie53a087b0ec54e83c4eba93a0828f9bdd6cc147d
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2018-06-19 15:10:18 -07:00
Mangesh Kunchamwar
4e1e71885e dsp: afe: Add support for VAD in AFE native driver
Update to AFE native driver to send VAD calibration
to DSP. Add support for per service API version query
in q6core driver.

Change-Id: I6234879054e7b5622a40912da16072fd8dbd83fe
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-06-12 19:18:35 +05:30
Mangesh Kunchamwar
8c706aba34 dsp: afe: Add support for codec dma interface
New codec dma interfaces have been introduced to connect LPASS and
Codec macros. This change is to add codec dma interface related
updates to Q6 AFE native driver.

Change-Id: Ia3d1e5e80c694c8c4a7f904151adfcb504964b08
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-06-10 22:46:57 -07:00
Vignesh Kulothungan
cf6a1215b9 dsp: add support to send uevents
Add a common function handle to send uevents from q6 layer.
Add functions to initialize and cleanup the kernel object required
to send uevents.

CRs-Fixed: 2211324
Change-Id: I9dceb4eb16d6941600455602f78f4f1498171d19
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-06-07 09:01:13 -07:00
Vidyakumar Athota
94bd8731ae dsp: add support for DC detection event in afe
Add support to register with ADSP for DC detection event
in speaker protection module.
Add support to notify audio driver clients when DC detection occurs.

CRs-Fixed: 2244131
Change-Id: Ieb467f62207546a785eac2e9b96ca677e0b10565
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-06-07 08:53:00 -07:00
Linux Build Service Account
4cc52a2bed Merge "dsp: add audio event notifier support" into audio-drivers.lnx.3.0 2018-06-06 21:05:04 -07:00
Vikram Panduranga
c712c17ab0 dsp: Add support for custom encoder
Add support to set custom encoder in ASM which
can be enabled through compress capture path.

Change-Id: I563c59eb3a0213c26ce69d3c2f8d650cf3c7d32d
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2018-06-05 12:57:23 -07:00
Vidyakumar Athota
f1cba4d4b2 dsp: add audio event notifier support
Add support for audio event notifier framework to
send/receive events across audio drivers.

CRs-Fixed: 2244131
Change-Id: I1e36703a91625cd52333596d66dc21a0e8876738
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-06-01 16:09:22 -07:00
Garmond Leung
6b3f418d7e dsp: Add support for setting USB packet service interval
Add support for setting packet service interval for usb
AFE Port.

Change-Id: I2221c659f967deaccb9031a9a61b51fd475a0e22
2018-05-31 17:56:21 -07:00
Xiaoyu Ye
f0ec686d3b asoc: msm-lsm-client: add support for ADSP Generic Detection Event
ADSP detection engine module can raise Generic Detection Event to
provide variable payload data based on the information requested by
userspace. Adding new API/interface to provide support for Generic
Detection Event in LSM drivers.

Change-Id: Id5541f959ecdcf862dcfa1de1c1a1b3a796f260c
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2018-05-22 23:36:37 -07:00
Karthikeyan Mani
16b697200c dsp: afe: add interface to update dp audio stream index
For DP audio Multi Stream Transport, add an interface
to set DP controller and DP stream index for display
port audio AFE port.

Change-Id: I6efbb6937a7849e5840a93541961414eb9049863
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2018-05-10 13:43:23 -07:00
Linux Build Service Account
40bf8e8940 Merge "asoc: dsp: Add support for adaptive bitrate" 2018-05-01 13:18:05 -07:00
Vidyakumar Athota
ddd20a414f uapi: audio: update maximum number of channels supported
Audio calibration data supports 32 channels now so update
maximum number of channels supported to 32.

Change-Id: I0b94e23fe88c4382d78db85014a81e440f720660
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2018-04-29 19:30:03 -07:00
Aniket Kumar Lata
c0c314765f asoc: dsp: Add support for adaptive bitrate
Add support for adaptive bitrate with A2DP offload.
Set up Tx feedback path on SLIMBUS_7_TX from BT SoC
to LPASS. Configure AFE encoder and decoder for ABR.
Add bit width support to configure AFE port with
32bit for BT A2DP.

Change-Id: I8e0afaf52561e5dc70318240ba238fc42844501f
Signed-off-by: Aniket Kumar Lata <alata@codeaurora.org>
2018-04-29 15:59:32 -07:00
Vikram Panduranga
770b8383d2 dsp: Mark cal block after use
After applying calibration on DSP, cal block
is marked stale to ensure same calibration is not
reused for future usecase.

Change-Id: I9f446c0602f4ab34ca71b9d2611319624fb19cd2
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2018-03-16 17:54:53 -07:00
Vignesh Kulothungan
fa497d2051 ASoC: dsp: Update audio effects driver to support Instance ID
Add support to set and get audio effects 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: I0fdba2560950c931a2ec6f152499fd4bb9f59086
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-03-04 23:22:34 -08:00
Vignesh Kulothungan
f20d5b7ea5 ASoC: dsp: Update ASM driver to support Instance ID
Add support to set and get ASM 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: I633ce10a83d9033d42fadb7bad0b26842459df84
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-03-04 23:22:19 -08:00
Vignesh Kulothungan
916967ba22 ASoC: dsp: Update dap driver to support Instance ID
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: I1633b63a1a598c0e4ea874d00655b09a240a47e3
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-03-04 23:21:47 -08:00
Vignesh Kulothungan
60cc03517f ASoC: dsp: Update ADM driver to support Instance ID
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: I5ef920448dd827d8a315e248087997f703061263
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-03-04 23:21:10 -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
Vignesh Kulothungan
85073c0432 ASoC: dsp: Update AFE driver to support Instance ID
Add support to set and get AFE 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: I15dac800bdf7f860d0fbeeff86f986c42a9eae34
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-03-04 23:06:32 -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
Vignesh Kulothungan
a65e3010a2 ASoC: dsp: 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: Id9aa5ee89bab1a4e15ff1f7868bceb42d6c25d19
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-03-03 15:14:56 -08:00
Vignesh Kulothungan
13d0d3561f ASoC: dsp: Add utility function needed for Instance ID
Add common structures and definitions used to support
instance ID.
Add helper function to populate header based on instance ID
support and pack it with payload data.

CRs-Fixed: 2151551
Change-Id: If9b7e497d0e8fdfed7d62a1ee34c415baabdda07
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-03-03 15:14:32 -08:00
Vignesh Kulothungan
5c10992ad9 ASoC: Expose APIs to get and set Instance ID support
Expose APIs to get and set instance ID support by exposing a
mixer control for userspace to set the support status as well
as APIs for kernel components to querry for instance ID support.

CRs-Fixed: 2151551
Change-Id: I3b462a4c0f31152a2865af8f4e9664a6c4d324c3
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-03-03 15:14:11 -08:00
Linux Build Service Account
ec22137f6c Merge "dsp: add cache operations for dma_buf" 2018-02-15 17:52:20 -08:00
Linux Build Service Account
95e93157f4 Merge "dsp: update MSM Audio ION wrappers to align with upstream" 2018-02-15 17:52:20 -08:00
Banajit Goswami
0f1f3f6d04 dsp: add cache operations for dma_buf
Add support for querying ION flags for dma_buf and for cache ops
on dma_buf with CACHED Flag on.

Change-Id: I219e564c477af8ba3b8676db1c9555a2b5b9ebab
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2018-02-04 03:43:17 -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
Aditya Bavanari
5106b5627c dsp: fix low volume in audio recording
ADM calibration is not sent in audio recording
use case which leads to low volume issue.
Since the LSM port ID is same as audio recording
port ID in case of internal codec, driver tries to
send LSM calibration for non LSM use case in which case
no calibration will be sent.
Instead of using port ID, use the pass_thr mode to
differentiate between LSM and non LSM use cases.

CRs-Fixed: 2167317
Change-Id: I1b6ea51d83330f6439791cf1bb6170306f6895b0
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-01-29 21:36:26 -08:00
Linux Build Service Account
9c81253780 Merge "dsp: add support for new ADM LSM cal types" 2017-12-16 03:09:26 -08:00
Linux Build Service Account
7bae55be7c Merge "dsp: add LDAC encoder support" 2017-12-16 03:09:23 -08:00
Aditya Bavanari
2a627ae4bb dsp: add support for new ADM LSM cal types
Add support for new ADM LSM cal types in order
to avoid topology and cal block overriding during
concurrent use cases like SVA with speaker
protection.

CRs-Fixed: 2085865
Change-Id: I155d29ff0b77b069aa5970408332064c5c2aebd7
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2017-12-12 12:22:09 +05:30
Preetam Singh Ranawat
0a087aff7b dsp: add LDAC encoder support
Add support for LDAC encoding in dsp to
enable LDAC encoder over split a2dp path.

CRs-Fixed: 2143086
Change-Id: Ia5ed981f5cd9cc61621d667362585ec7a7e64fa1
Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
2017-12-11 21:01:26 -08:00
Preetam Singh Ranawat
f746a87965 dsp: add scrambler support in DSP over split a2dp
Add support to enable scrambler in COP Packetizer module
over split A2DP path to fix 44.1Khz playback.

CRs-Fixed: 2143142
Change-Id: I52fec39e10a1c0939fd49d1e1303b03312544abf
Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
2017-12-11 21:00:31 -08:00
Xiaojun Sang
12120ab1ad ASoC: add support for speaker protection 3.0
Add a new AFE API to send limiter threshold to ADSP.

Change-Id: Ibcd795d7c0edb4f081636c621e51e5a1eaa036b1
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2017-11-07 01:36:20 -08:00
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
Linux Build Service Account
953c2b88b1 Merge "dsp: add support for aptX dual mono" 2017-10-25 09:56:58 -07:00
Linux Build Service Account
22f45372f5 Merge "dsp: add support to set topology specific info in voice usecases" 2017-10-18 04:49:39 -07:00
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
Preetam Singh Ranawat
899b78bd18 dsp: add support for aptX dual mono
Send sync mode parameter to DSP for supporting aptX dual mono.

Change-Id: I1c43b0dec6661a77644e28df45ca6c1a182745de
Signed-off-by: Aniket Kumar Lata <alata@codeaurora.org>
2017-10-11 13:43:44 -07:00
Rohit Kumar
c08b14f78c dsp: add quinary interface support in q6afe
Add support for quinary interfaces in q6afe. Also,
fix routing for quinary tdm rx port.

Change-Id: I5db68da1cc8bc17bc5e7b743282abf83fb100bbc
Signed-off-by: Rohit Kumar <rohitkr@codeaurora.org>
2017-10-06 10:52:17 +05:30
Rohit Kumar
a507793028 asoc: msm: add support for quinary interfaces in dai and routing driver
Add support for dais and routing for Quinary MI2S, AUXPCM and TDM
interfaces.

Change-Id: I50c3099a658998bab805c4c6a5aa447e85f3e7c6
Signed-off-by: Rohit Kumar <rohitkr@codeaurora.org>
2017-09-26 01:37:41 -07:00
Linux Build Service Account
19d7949681 Merge "dsp: allocate contiguous memory for version information" 2017-09-20 17:55:21 -07:00
Linux Build Service Account
4b813164fc Merge "dsp: add CELT encoder support" 2017-09-14 04:20:54 -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
Preetam Singh Ranawat
5402849018 dsp: add CELT encoder support
Add CELT encoder support to enable audio broadcast over split a2dp.

Change-Id: If0d927913c5e525ff1cebf857323ab70be2122a1
Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
2017-09-06 03:58:45 -07:00
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