Commit Graph

554 Commits

Author SHA1 Message Date
Linux Build Service Account
d155d7f509 Merge "dsp: Update clk status when DSP returns error" into audio-drivers.lnx.5.0 2020-04-16 02:11:14 -07:00
Linux Build Service Account
acc2efac70 Merge "asoc: lahaina: Fix compilation issues when DEBUG_FS is disabled" into audio-drivers.lnx.5.0 2020-04-16 02:09:59 -07:00
Aditya Bavanari
3f85e825de dsp: Update clk status when DSP returns error
When DSP returns error in clock or vote request
commands, update the clock status variable properly
to bail out from error scenarios.

Change-Id: Ib50e9e33b03fd77255b8719c125612686ea11b00
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-04-16 01:25:00 -07:00
Prakruthi Deepak Heragu
6b2d8c3234 asoc: lahaina: Fix compilation issues when DEBUG_FS is disabled
Fix the compilation issues in audio drivers when CONFIG_DEBUG_FS
is disabled.

Change-Id: I6eeb2b36b054ba30431f7b045c182888997dc331
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
2020-04-09 00:29:51 -07:00
qctecmdr
4ec39896a8 Merge "dsp: Add support for EOS V2" 2020-04-08 21:02:09 -07:00
qctecmdr
457a39d314 Merge "dsp: Avoid configuring PSPD channel mixer if PSPD is already configured" 2020-04-08 21:02:08 -07:00
qctecmdr
14f4f909da Merge "dsp: Add FFECNS Freeze event support" 2020-04-08 21:02:07 -07:00
qctecmdr
dfdd0d31d2 Merge "dsp: adm: increase the length of timeout in adm_open to 2 seconds" 2020-04-08 21:02:07 -07:00
Ramu Gottipati
f2438f0d93 dsp: Avoid configuring PSPD channel mixer if PSPD is already configured
Observing audio glitch issue while trying to apply PSPD
channel mixer coefficients for already applied COPP port.
To fix this, added check condition to retun 0 without
applying PSPD.

Change-Id: I3825cacfd888f153144cc5d73eb274f4fbf5d8bc
Signed-off-by: Ramu Gottipati <ramug@codeaurora.org>
2020-04-02 23:51:34 -07:00
Ramu Gottipati
f36ffb140a dsp: Add FFECNS Freeze event support
Add support to send ffecns freeze event

Change-Id: I73bc6ff8c091427ddb398ae11c95f19c36e904b6
Signed-off-by: Ramu Gottipati <ramug@codeaurora.org>
2020-04-01 13:03:54 -07:00
Meng Wang
d114234b61 dsp: adm: increase the length of timeout in adm_open to 2 seconds
Currently, the length of timeout in adm_open for waiting response
from ADSP is 1 second. To prevent unnecessary timeout that results
adm_open failure, increase the length of timeout to 2 seconds.

Change-Id: I670f44964538c3176130c4bb5f8b7a3b3eaf8d8b
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2020-04-01 13:02:15 -07:00
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
Satish Babu Patakokila
54d42ba9df dsp: Add support for EOS V2
Use EOS V2 to avoid time out for EOS when afe port
is closed before EOS

Change-Id: I3be0aa33384d2015354b8f9a307f3e0cb200c040
Signed-off-by: Satish Babu Patakokila <sbpata@codeaurora.org>
2020-03-31 21:25:09 +05:30
qctecmdr
b8e5bd2fc8 Merge "ASoC: msm: update QUAT/QUIN TDM slot mappings for A2B" 2020-03-30 01:20:37 -07:00
qctecmdr
3efc2c5808 Merge "dsp: Make error as debug log when CPU buffer not available" 2020-03-25 09:38:23 -07:00
qctecmdr
c62bfc5f33 Merge "dsp: Correct the instance ID assignment in IIR sidetone" 2020-03-25 09:38:23 -07:00
qctecmdr
58563a41f2 Merge "dsp: codecs: Add synchronization between SSR and native encoder decoder" 2020-03-25 09:38:23 -07:00
qctecmdr
7b0c66d071 Merge "ASoC: msm: unmap and free dma memory if smmu map failed" 2020-03-25 09:38:22 -07:00
qctecmdr
7aba75ecb9 Merge "dsp: use dma handle as default input in hab export" 2020-03-25 09:38:22 -07:00
Hui Li
037acea398 dsp: use dma handle as default input in hab export
currently in hab driver, it want to hold all bufs as dmabuf for fulture implement, 
and it's hard to get dmabuf fd/handle from a kva, so hab need to generate a new
dmabuf for itself, and this will intruduce audio crash issue
in conclusion, for now hab just accept dma fd/handl as input in KHAB export path.

Change-Id: I11715ba966036f7c02b67d0bdae97eb6d7118d5c
Signed-off-by: Hui Li <hul@codeaurora.org>
2020-03-24 17:08:05 -07:00
Saurav Kumar
d8a0703a77 dsp: codecs: Add synchronization between SSR and native encoder decoder
Add change to use global lock to make synchronization
between SSR and native encoder decoder.

Change-Id: I6c1f48c32d4c8290de8bf3dfa86e022abe2b34bc
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
2020-03-24 00:29:26 -07:00
Prasad Kumpatla
e1bb075244 dsp: check ac before access the service id
Check the audio client and apr before retrieving the
service_id and avoid the race condition b/w q6asm_session_free
and get_service_id calls with mutex lock.

Change-Id: I05c5fb872f866c79c909123b595df345da828967
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2020-03-23 20:39:36 -07:00
Derek Chen
256b05b2b0 ASoC: msm: unmap and free dma memory if smmu map failed
Unmap and free DMA memory in case of ION SMMU
mapping failure from PVM backend or MMHAB.

Change-Id: I2d2780941ba6922534654afa463a011f27ef7c66
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2020-03-23 20:26:54 -07:00
Aditya Bavanari
8c3f79680a dsp: Correct the instance ID assignment in IIR sidetone
In set param for IIR sidetone in AFE, instance ID
assignment is done to param ID. Correct the assigment
to fix this.

Change-Id: I3fc6011631a6b581facddc9c417e219ed25cc3a4
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-03-23 20:13:47 -07:00
Aditya Bavanari
3ac8fc2bff dsp: Make error as debug log when CPU buffer not available
When CPU buffer is not available, continuous error
log prints leads to excessive logging. Make the error
as debug log to avoid this.

Change-Id: Ic26006b4975fbe3d5467203d145a517c0067c296
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-03-23 19:52:59 -07:00
Manisha Agarwal
f6990bb349 dsp: Bit rate mode support for aac codec
Add variable bit rate mode support for aac codec.

Change-Id: Iedd9fe0df2d3a12e3d4e6c2916305399da10873f
Signed-off-by: Manisha Agarwal <maniagar@codeaurora.org>
2020-03-18 19:10:14 -07:00
Meng Wang
b603438690 dsp: afe: add new clk state and lock for codec clk cmds
There's some race condition when sending afe cmds between
USB playback and codec clk enablement. Add new clk_state,
clk_status and clk lock to resolve the race condition.

Change-Id: I2ccc77c20a274b797129b8b674c026ef003353d4
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-02-19 20:46:53 +08:00
qctecmdr
e60c090ca9 Merge "dsp: Add afe_close in locked context" 2020-02-17 02:58:03 -08:00
Vignesh Kulothungan
fa01a84d23 audio: correct misspelled variable and functions
Update dai link names to match with machine driver.
Update typo in audio notifier function name.

Change-Id: I8ada233bbcb1596f245cf1925691c115c2d62755
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-02-05 14:37:45 -08:00
Soumya Managoli
6b5e249af4 dsp: Add afe_close in locked context
Process port command DEVICE_STOP with
afe_cmd_lock to avoid any race condition.

Change-Id: I6e888a70e439cb6f3408d00644fb98a85ae53ef4
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2020-02-04 18:48:36 -08:00
Vignesh Kulothungan
823f0f01fe ASoC: add config check for QGKI
Add CONFIG_AUDIO_QGKI check for variables and functions
in audio drivers, so they are used only during a QGKI build.

Change-Id: Ia04232566367f196f298a49cf3962bb7927bec6a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-01-26 03:51:32 +05:30
Vignesh Kulothungan
923be76f78 dsp: compile avtimer based on avtimer config
Enable compilation of avtimer only if CONFIG_MSM_AVTIMER
is enabled.

Change-Id: I64cc8c65dbe22fafee527da80d3615fb5201665f
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-01-06 23:47:16 -08:00
Linux Build Service Account
1599fbce86 Merge changes I3c3e0f41,I1dc09c32 into audio-drivers.lnx.5.0
* changes:
  ASoC: update uapi header location
  dsp: update ion alloc header file
2020-01-02 15:20:35 -08:00
Linux Build Service Account
2370220aff Merge "dsp: update kernel version and uapi path" into audio-drivers.lnx.5.0 2019-12-31 15:27:06 -08:00
Vignesh Kulothungan
76d80b53ac dsp: update ion alloc header file
Update the header file which defines ion allocation
in kernel 5.4.

Change-Id: I1dc09c32bf5ea611ba0e49c670d4dd32206dc1b3
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2019-12-27 11:20:57 -08:00
Vignesh Kulothungan
cc21b44264 dsp: update kernel version and uapi path
Update kernel version from 4.19 to 5.4.
Update uapi location from uapi to uapi/audio.

Change-Id: I684ce441244464a43aa641c0762e86bda2258522
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2019-12-27 10:58:18 -08:00
Meng Wang
b01eb21a49 dsp: afe: update wakeup APIs
wakeup_source_init and wakeup_source_trash are removed in new kernel.
Update these two APIs to wakeup_source_register and wakeup_source_unregister.

Change-Id: I2415fac50d6370f205450d001e45696916f3c78c
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-12-25 16:57:14 +08:00
Vignesh Kulothungan
d71ec81bb0 audio: update kernel version reference
Update kernel version references from 4.19 to 5.4.
Update symbolic links to new kernel version files.

Change-Id: I38baa52218b16e0b0c86ad898912d29ec4d3d516
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2019-12-19 17:04:52 -08:00
Vignesh Kulothungan
92187a5038 audio: Remove android make files
Remove android make files from audio tech package.

Change-Id: I21770bf64cef2bc767cdc81b0b864efff135bf84
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2019-12-19 16:55:09 -08:00
qctecmdr
3be7aef864 Merge "dsp: codecs: fix error check for q6audio aio" 2019-12-08 21:56:26 -08:00
Prasad Kumpatla
d4c151d76e dsp: codecs: fix error check for q6audio aio
Fix error check for q6audio audio pointer to
avoid Null pointer dereference.

Change-Id: Icf30cf2f670c07f3118132e378fa43256ddec530
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2019-12-05 11:17:09 +05:30
Aditya Bavanari
d6546e3044 dsp: Synchronize afe apr send pkt commands
Synchronize afe apr send pkt commands to avoid the state
variable modification for multiple commands sent in
parallel. Use the common interface afe_apr_send_pkt
to send the apr pkt.

Change-Id: I17a573a28e227cce882c3330887ae2756ca4addb
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-12-03 15:59:27 +05:30
qctecmdr
2d5f55cacf Merge "dsp: Add cmd locks to fix synchronization issues" 2019-11-27 20:28:48 -08:00
qctecmdr
0ff43491d8 Merge "dsp: adsp-loader: Add check around bytes read from nvmem cell" 2019-11-27 20:27:53 -08:00
Xiaoyu Ye
b58c0716e4 dsp: lsm: remove the size checking for sound model
Currently q6lsm driver only allows buffer to be allocated for
SVA sound model with size larger than 512 byte in function
q6lsm_snd_model_buf_alloc.This causes issue when a valid SVA
sound model is smaller than 512 byte. Since there is no
restriction in ADSP for sound model size, remove this size
checking to allow sound models with smaller size.

Change-Id: I716dc8c0e1a4e3189cd334ef692ff07f3e4635db
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2019-11-25 11:38:14 -08:00
Harshal Ahire
6b5e14d72d dsp: Add cmd locks to fix synchronization issues
Add mutex locks in q6core_send_get_avcs_fwk_ver_cmd()
and q6core_map_mdf_shared_memory() functions to fix
command-response synchronization issues in race conditions.

Change-Id: Ibdf6788b51965bd37245c611683102c600ca8eb4
Signed-off-by: Harshal Ahire <hahire@codeaurora.org>
2019-11-25 19:31:22 +05:30
Ajit Pandey
2d71d6d099 dsp: adsp-loader: Add check around bytes read from nvmem cell
nvmem_cell_read() return no of bytes read in 'len' variable and
allocates similiar bytes of memory for buffer. Copy only these
number of bytes from buf to avoid out of bounds issues.

Change-Id: I712e5058d15deba939b6a743fcf5bff33ac51f84
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
2019-11-22 17:50:27 +05:30
qctecmdr
115d436a76 Merge "dsp: q6afe: Update lpass hw votes to maintain separate handles" 2019-11-12 03:12:55 -08: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
Laxminath Kasam
688db8aa06 dsp: q6afe: Update lpass hw votes to maintain separate handles
lpass client handle variable stores latest lpass hw vote.
During PDR, core hw vote release proceed to call unvote
for stale handle since above variable is set to non-zero
as part of audio hm vote. Maintain separate handles for
respective lpass hw votes inorder to fix this.

Change-Id: I432ce38b253ce6d18a25f9845fa694912718c74f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-11-05 13:15:45 +05:30