Commit Graph

317 Commits

Author SHA1 Message Date
Meng Wang
c2acbee602 dsp: update copyright marking for q6afecal-hwdep and q6asm
Copyright year 2018 for q6afecal-hwdep and third party copyright
marking for q6asm are removed during updating file headers.
Add them back.

Change-Id: I0341116ca0cf82be8c3876534b98ad2c376b3531
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-02-12 08:32:44 +08:00
Vikram Panduranga
51f7fa7f56 dsp: voice_mhi: fix memory size before mapping
Mailbox memory was mapped with incorrect memory size.
Adding a fix to use the actual size while mapping.

Change-Id: If9a478ca044f68bed8e0899dfb023545585272f2
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2019-01-30 23:45:47 -08: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
Vikram Panduranga
e2db205a11 dsp: add voice MHI driver
Add voice MHI driver to support the following features -
1. Allocate and map mailbox memory needed for voice call
packet exchange.
2. Send memory mapped addresses to ADSP.
3. Vote MHI host driver at start and stop of a voice call.

Change-Id: I8ef8bc270acacab9b80bca7addccdf73bd572adf
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2019-01-30 23:39:34 -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
Linux Build Service Account
c695edde0f Merge "dsp: add support to set custom channel mixer coefficients" 2019-01-28 11:11:21 -08:00
Vikram Panduranga
24efd2a62e dsp: add dma map resource cmd
Add a new API for mapping DMA resources
that needs to be attached to existing
SMMU SID.

Change-Id: I7a513d24ea30a5ead318e856e4c5317743fd0021
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2019-01-24 17:44:04 -08:00
Dhananjay Kumar
defd81b1a5 dsp: add support to set custom channel mixer coefficients
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>
2019-01-21 20:58:22 -08:00
Linux Build Service Account
1ec5816c0b Merge "dsp: Add frame size control parameter for AAC encoder" 2019-01-08 05:32:06 -08:00
Linux Build Service Account
f6416bbf7a Merge "dsp: afe: add support for VA macro codec DMA interface" 2019-01-08 05:32:05 -08:00
Linux Build Service Account
9cdd3ad6f9 Merge "asoc: dsp: ipc: Reduce wait timeout to 1 second" 2019-01-06 06:32:24 -08:00
Linux Build Service Account
624abc38c9 Merge "dsp: update EC reference port only if channels are configured" 2019-01-06 06:32:04 -08:00
Xiaoyu Ye
8341eefc48 dsp: afe: add support for VA macro codec DMA interface
VA macro on Kona has three TX codec DMA interface. The
current AFE driver only supports two codec DMA interface.
Add support to enable the third one in AFE driver.

Change-Id: Ie0f6241ef37bc03ad9adb1c4fe82f82468caec25
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2019-01-03 14:57:47 -08:00
Aniket Kumar Lata
be83735305 dsp: Add frame size control parameter for AAC encoder
BT sink devices have a limitation on the packet sizes
they can receive and handle from BT sources. AAC encoder
can produce output frames which can vary in size based on
content being encoded. If frame size exceeds MTU size of
BT sink device, it will lead to incorrect decoding of
frames in BT sink.
Add a frame configuration parameter (MTU/Peak bitrate)
for AAC encoder to solve this problem.

Change-Id: Ia7795049e982400b0b3657b0b3a8990fc6920e38
Signed-off-by: Aniket Kumar Lata <alata@codeaurora.org>
2019-01-02 17:28:08 +08:00
Surendar Karka
de79a06acf dsp: update EC reference port only if channels are configured
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>
2019-01-02 17:23:23 +08:00
Vignesh Kulothungan
0fcf2af3df asoc: dsp: ipc: Reduce wait timeout to 1 second
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>
2019-01-02 16:04:27 +08:00
Laxminath Kasam
c910c02395 dsp: return ENETRESET error if apr is down
In SSR/PDR, return ENETRESET errno to
propagate this failure to userspace. After
audio HAL receives ENETRESET, it stops retry
for pcm_open continuously. Rate limit the logs
when apr send packet fails during PDR/SSR
usecases to avoid watchdog timeouts.

Change-Id: I03a80aef6ffedb4f15f953fff5213d6a3c9efc4b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-01-02 15:44:42 +08:00
Meng Wang
b0e04799e4 ASoC: config: add config to compile audio drivers for kona
Add config to compile audio drivers for kona.

Change-Id: I3367a68d0109c80de8525fd74ebaef2959684865
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-21 12:19:44 +08:00
Meng Wang
19fa6defdc asoc: update kernel version for kona
Update kernel version for kona.

Change-Id: I490832f0a62f8f1b5cfe6fc6134e22cc5d8ae583
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-20 12:36:53 +08:00
Linux Build Service Account
ed9a9cce4a Merge "dsp: afe: Cleanup task_struct related implementation" 2018-12-12 08:52:06 -08:00
Linux Build Service Account
d3a0e9fcca Merge "dsp: q6afe: return error on no configuration data" 2018-12-12 08:52:02 -08:00
Linux Build Service Account
af3c54713f Merge "ASoC: Add TWS+ mono mode support" 2018-12-12 08:52:01 -08:00
Linux Build Service Account
bed688a58c Merge "asoc: add support to get Direction of Arrival target scores" 2018-12-12 08:51:56 -08:00
Surendar Karka
e7507516c4 asoc: set AFE_LOOPBACK_TX port id to EC ref port
- 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>
2018-12-11 17:07:01 +08:00
Karthikeyan Mani
0253cb9698 dsp: q6afe: return error on no configuration data
Move the return value to within the error check
condition to avoid returning error for valid
scenarios too.

Change-Id: I718786d9eb3c779a85da3a4cb3929806692f5424
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2018-12-11 00:09:46 -08:00
Chaithanya Krishna Bacharaju
8c6a184189 dsp: add support to get Direction of Arrival target scores
Add support to get DOA tracking monitor data.
This is required to support SVA LED display feature with
FFECNS/FFNS enabled.

Change-Id: I7e39c2f3998fcc3f9ed0767c0090f862e1ba7539
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
2018-12-11 00:02:27 -08:00
Surendar Karka
d47fda4407 asoc: add support for afe_loopback_tx BE dai
Add dai driver and routing driver changes for
afe loopback BE. This BE is used to capture
EC reference data.

Change-Id: Ia57f335bde5f8a47de0030fbf1cdb784c8821e17
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2018-12-10 23:58:04 -08:00
Aditya Bavanari
91674b50e6 dsp: afe: Cleanup task_struct related implementation
Cleanup task_struct related implementation in
AFE driver as it is not used anymore and
causes invalid pointer access in stability tests.

Change-Id: I97ad810f9389338af85c7cea3213432917a21106
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-12-10 23:45:11 -08:00
Manisha Agarwal
d99fac0210 ASoC: Add TWS+ mono mode support
Add support to enable mono mode when one TWS+ earbud is
connected. Change the encoder config when device switches from two
earbuds to single earbud.

CRs-Fixed: 2341876
Change-Id: I880aa6a2767d88e99be2d80afff0e5fbec94b8a4
Signed-off-by: Manisha Agarwal <maniagar@codeaurora.org>
2018-12-10 23:36:26 -08:00
Linux Build Service Account
b9c563ff6f Merge "dsp: ion: Remove smmu initialization" 2018-12-10 11:23:04 -08:00
Meng Wang
43bbb87652 asoc: Update file header to GPL-2.0-only
Update file header to GPL-2.0-only.

Change-Id: Ic1542a3209a5fe73c937a5b36491ede4a451936d
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-10 14:49:34 +08:00
Meng Wang
04dff94720 dsp: ion: Remove smmu initialization
SMMU initialization is not required to be done in client
probe process. SMMU framework takes care of creating
domain and attaching device. Remove related code from
audio ion driver.

Change-Id: I3756c5abb7488afb43e20fae698c7008461a18cb
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-09 22:44:08 -08:00
Meng Wang
ee084a068e ASoC: Change platform driver to component driver
snd_soc_platform_driver is removed in kernel-4.19.
Update snd_soc_platform_driver to snd_soc_component_driver.

Change-Id: I434b6fd173d1f4365a610d9164342d5d04d6c5bc
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-08 03:15:41 -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
Meng Wang
d6107d0bbe asoc: clean up audio drivers and remove unused files
Clean up audio drivers and remove unused files.

Change-Id: I50559ac3c5f4a1f4336e4480cd3ff235d015441e
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-06 15:04:09 +08:00
Linux Build Service Account
506d3c19c6 Merge "dsp: fix configuration of EC reference" 2018-11-22 20:08:56 -08:00
Linux Build Service Account
d07fc81d86 Merge "dsp: audio_ion: Update IOVA start address from dt entry" 2018-11-21 20:45:53 -08:00
Linux Build Service Account
06fa13565c Merge "dsp: avtimer: Update function pointers for camera isp to use avtimer" 2018-11-21 20:45:46 -08:00
Dieter Luecking
4162083535 dsp: fix configuration of EC reference
The check open_v8.endpoint_id_2 != 0xFFFF can only
be true if changed after initializing open_v8.endpoint_id_2
to 0xFFFF. If not, EC reference will never be configured
correctly. Fixing code to account for that.

Change-Id: I8d2aba19ae1f60ace118c828a98d5fecb149be18
Signed-off-by: Dieter Luecking <dieterl@codeaurora.org>
2018-11-21 09:12:30 +01:00
Linux Build Service Account
3b193e414d Merge "dsp: q6adm: fix boundary check for copp idx" 2018-11-20 19:53:13 -08:00
Linux Build Service Account
56d0f0500e Merge "ASoC: dsp: correct return value check" 2018-11-20 19:53:09 -08:00
Laxminath Kasam
356b68c1e2 dsp: avtimer: Update function pointers for camera isp to use avtimer
After DLKM, avtimer functions cannot be invoked directly
from kernel driver. Camera driver exposes API to get the
function pointers to use avtimer. Update the function
pointers by calling respective camera set API.
AVTIMER_LEGACY config should be enabled in audio conf
to enable this support.

CRs-Fixed: 2201340
Change-Id: I165e7ea0226e174288f3e8b81ef01fce137e2e35
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-11-20 11:52:27 -08:00
Linux Build Service Account
d72c877e31 Merge "soc: vote for LPASS NPA resource from LPI TLMM driver" 2018-11-17 09:56:49 -08:00
Meng Wang
d9fa69c9e7 ASoC: dsp: correct return value check
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>
2018-11-16 12:23:30 -08:00
Laxminath Kasam
61cd502c9d dsp: audio_ion: Update IOVA start address from dt entry
In sm6150, LPASS has Agg NOC before SMMU transactions.
Agg NOC has HW limitation which considers IOVA as
physical DDR address and resulting in failure
for particular memory range. Update IOVA address
start address for audio to use different range.

CRs-Fixed: 2346788
Change-Id: Ieac3b8bdd6295a56039d9bca422d2f41e0d94944
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-11-16 17:29:23 +05:30
Florian Pfister
f4fd5f33d1 dsp: add SBC support for BT sink mode
Update SBC sample frequency and number of channels
from IPC library to set AFE port accordingly.

Change-Id: Ibca385b0fc0ba4c3122053559b1116bd4c31336d
Signed-off-by: Florian Pfister <fpfister@codeaurora.org>
2018-11-15 01:32:22 -08:00
Mangesh Kunchamwar
70c29ec0dc dsp: update q6core driver to vote for LPASS island NPA resource
Add interface functions to vote for LPASS island NPA resource
from clients.

Change-Id: I532dd697f986aca48c3125b1bab3435b890d4039
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-11-14 18:38:26 +05:30
Karthikeyan Mani
95be5b145e dsp: q6adm: fix boundary check for copp idx
Check for maximum boundary limit for adm parameters
before using the parameter array.

Change-Id: Idf4961c547cd38e3525c255cca849e5e4280ac29
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2018-11-09 14:59:59 -08:00
Mangesh Kunchamwar
1face6aa6d dsp: fix issue with MDF shared memory access in CDSP for QCS403
SMMU is not enabled on CDSP and shared memory to CDSP doesn't need
SID. Default SID from audio ION was being added in 32bit builds.
Avoid adding default SID for MDF shared memory for CDSP.

Change-Id: I5e35396fc90071f96e1042c5e08eafe4226c240b
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-11-06 18:03:46 +05:30
Linux Build Service Account
ab1a6c2a63 Merge "dsp: afe: change lock sequence to avoid deadlock" 2018-11-05 21:39:03 -08:00