Commit Graph

149 Commits

Author SHA1 Message Date
Harshal Ahire
c702957fa2 dsp: Add support to dynamically load and unload BT modules
Add new APIs to enable dynamic load and unload of BT
modules before afe_port_start and afe_close.

Change-Id: I74da9a49aac754d4557c7206155de65cf9b6bdaf
Signed-off-by: Harshal Ahire <hahire@codeaurora.org>
2020-06-10 23:02:37 -07:00
qctecmdr
344b47efbe Merge "asoc: lahaina: add support to send power mode for voice usecase" 2020-06-05 01:54:02 -07:00
qctecmdr
1aec879743 Merge "asoc: qcs405: Add dai links for hdmi tx" 2020-06-05 01:54:02 -07:00
qctecmdr
709f0c9c23 Merge "ASOC: SPV4 set correct number of speakers." 2020-06-01 10:27:01 -07:00
qctecmdr
1cb613a506 Merge "asoc: enable TTP generator" 2020-06-01 10:27:01 -07:00
qctecmdr
5481d131cf Merge "asoc: qcs405: add support to set clock drift" 2020-06-01 10:27:00 -07:00
Sanjana B
7f953e1270 asoc: support for audio over hdmi tx
Add support for audio over hdmi tx.

Change-Id: I4f2108fd14eb22ec4e226220787e0defe512bb5f
Signed-off-by: Sanjana B <sanjb@codeaurora.org>
2020-05-29 10:47:10 -07:00
Kunlei Zhang
44c6cc4fdc dsp: Add support to set island cfg and power mode
Add new APIs to set/reset power mode along with
island config before afe_port_start.

Change-Id: Ibd9487b04b691be5ab829cfa32c89953838f3192
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2020-05-29 12:35:55 +08:00
Vangala, Amarnath
6d071a4372 ASOC: SPV4 set correct number of speakers.
Set correct number of speakers for Speaker Protection V4.

Change-Id: I66c656174bef64d3cdd64b17d994073e9ee58472
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
2020-05-19 06:27:12 +05:30
qctecmdr
934188e064 Merge "dsp: afe: add support for codec dma data alignment API" 2020-05-16 03:24:33 -07:00
Surendar Karka
6ea98f1cae dsp: Add support to set clock drift
- Add support to adjust drift in audio interface
  clock source PLL.
- ADSP adjusts the source clock based on clk id. Add support
  in AFE driver to get clk id based on the AFE port.

Change-Id: I45ceb6579bb15e32541051e0ba936a2d903e4923
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2020-05-15 02:44:36 -07:00
qctecmdr
81b18718b9 Merge "ASoC: dsp: Speaker Protection V4" 2020-05-14 22:04:36 -07:00
qctecmdr
0b521bbfad Merge "asoc: add new fe for hearing aid" 2020-05-14 22:04:36 -07:00
Surendar Karka
c238fc0d74 asoc: enable TTP generator
Add support to enable TTP generator in AFE.

Change-Id: I0186dc18809b87a912a1c3ec9dd7fcd26aa726f5
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2020-05-12 23:50:02 -07:00
Vangala, Amarnath
00ee526deb ASoC: dsp: Speaker Protection V4
Support for Speaker Protection V4 feature.

Change-Id: I2237836243a716d4ed3288c9c613bc8d4ec5a282
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
2020-05-13 12:00:26 +05:30
Meng Wang
4fed159385 dsp: afe: add support for codec dma data alignment API
Add support for codec dma data alignment API.

Change-Id: Ifcca9454fee4f65dc8787dc39a36acfd4c3af392
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-05-13 12:39:45 +08:00
qctecmdr
320ef023a6 Merge "asoc: lahaina: add proxy ports for call screening in machine driver" 2020-05-10 05:35:12 -07:00
Zhou Song
83c6033064 asoc: add new fe for hearing aid
Add a new fe dedicated for hearing aid and the support
of reading data from a new proxy port.

Change-Id: Id2e8ade6bfe5412ca6520d3cff70d6eebad7d7cc
Signed-off-by: Zhou Song <zhous@codeaurora.org>
2020-04-21 16:58:00 +08:00
Aditya Bavanari
236ff485d2 codecs: Enable clock voting logs to debug AHB/NOC issues
Enable clock voting logs to debug stability issues.

Change-Id: Ie1f995ab004778a81ea42baad15ea36858407e9a
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-04-20 10:17:02 -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
qctecmdr
b8e5bd2fc8 Merge "ASoC: msm: update QUAT/QUIN TDM slot mappings for A2B" 2020-03-30 01:20:37 -07:00
Saurav Kumar
a2efe09c14 asoc: add change for proxy playback and capture BE DAIs
Add change to support BE DAI link based on proxy
ports.

Change-Id: Id7ca274e330f025ac015567de86403fb14781cd0
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
2020-03-25 11:02:24 +05:30
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
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
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
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
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
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
Guodong Hu
395166b04b asoc/dsp: add tert_tdm_tx_0 port for lsm support
Add backend port: TERT_TDM_TX_0 to support
"LSM Mixer", "LSM Port" and "LSM Function"
mixer controls.

Change-Id: I86d83ba96ee79bbffef4aee2f31a6d16eb09d78f
Signed-off-by: Guodong Hu <guodhu@codeaurora.org>
2019-10-29 10:38:18 -07:00
qctecmdr
15e89245c3 Merge "dsp: afe: call get params with afe cmd lock held" 2019-10-16 23:46:59 -07:00
Karthikeyan Mani
daf7d7af99 dsp: afe: call get params with afe cmd lock held
If get params is called without afe cmd lock, it
leads to race conditions with other callers calling
afe_apr_send_pkt and the status values read back
are getting overwritten wrongly by the callers that
call without lock.

Change-Id: I5af4d7bbbe01357dd9b6ae8efbe1831401003508
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-10-06 23:06:40 -07:00
Aditya Bavanari
81a54a220e dsp: Reset core hw vote client handle in SSR
Reset core hw vote client handle in SSR use cases
and do not unvote when the client handle is 0.
This is to clean up the client ids in SSR in
order to avoid unusual client deregistrations.

Change-Id: Id0cee50f7ca27e29db6134b7a70ae75334e0d765
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-10-04 01:08:58 -07:00
Vatsal Bucha
ff83a9e205 dsp: Change condition for cal_data for v_vali_param
V-Validation is not working due to different
size for cal_data and data_size. This is expected as
same callbacks are used for ftm and v validation.
Change condition to ensure data_size is less than
or equal to size of cal_data.

Change-Id: I78b4e6778de9cfa5f95830fc6d48b84e608ba3a5
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-09-24 12:08:31 +05:30
Ralf Herz
43c0abd0c0 dsp: Add support for META MI2S ports
QCS405 can group data lines of several MI2S interfaces.
This feature is used with new META MI2S ports.

Change-Id: I0d8c2de742e04d7348e40e1026b1640c3f987479
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
2019-08-23 20:12:48 +02:00
qctecmdr
5467317e15 Merge "dsp: q6afe: add tws mono switch for aptx adaptive encoder" 2019-08-11 03:14:55 -07:00
Zhou Song
450ee1b712 dsp: q6afe: add tws mono switch for aptx adaptive encoder
Add support to switch tws channel mode for aptx adaptive
encoder.

Change-Id: Ife4170be56b152d34758a1cfd20fa4ec203742db
Signed-off-by: Zhou Song <zhous@codeaurora.org>
2019-08-06 10:17:23 +08:00
Cong Tang
04a6cfa44e audio-driver: update to support 32 channels
update asm/adm/afe drivers to support 32 channels.

Change-Id: Ia231eb6a0fb545569f0f8e1f2442432d761866e9
Signed-off-by: Cong Tang <congt@codeaurora.org>
2019-07-19 14:28:47 -07:00
qctecmdr
5a08ced93b Merge "dsp: Remove param_size from pkt_size of apr header" 2019-07-10 04:45:19 -07:00
Aditya Bavanari
b778846e50 dsp: Remove param_size from pkt_size of apr header
As param_size is included in apr header pkt_size, out of
bounds access occurs in glink. Remove the param size addition
to fix this issue.

CRs-Fixed: 2472208
Change-Id: If8b34aeacd3bc9ba67ac9276eb1a8ebf0933f9f9
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-07-02 20:10:34 +05:30
Aditya Bavanari
3c259b5e62 dsp: Add size check for afe set and get functions
In afe_get_cal_sp_th_vi_param and afe_set_cal_sp_th_vi_cfg
functions, data size check is not present which might lead to
out of bounds access. Add size checks to fix the same.

Change-Id: I99eca6065e6f5a050527f1bfce2bfcba28123b53
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-06-26 11:01:38 +05:30
qctecmdr
cbadda916f Merge "dsp: add senary MI2S and TDM port IDs" 2019-05-21 20:36:44 -07:00
Ramprasad Katkam
14efed6eb7 asoc: Ratelimit error logs
Ratelimit error logs to avoid excessive logging during
ssr/pdr.

Change-Id: Icdc9823cef5b070ed70cdd002bb3cd00d482a869
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2019-05-14 17:42:22 +08:00
qctecmdr
d12578a0ab Merge "asoc: send VAD enable or disable" 2019-05-07 22:35:09 -07:00
Karthikeyan Mani
3bbd2ee907 dsp: add senary MI2S and TDM port IDs
Add MI2S/TDM AFE senary port IDs for Kona target.

Change-Id: I8dafa4516c31040aad0bca30cfdc9acbdf460bf1
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-05-06 11:19:29 -07:00
qctecmdr
1ae80f7aa4 Merge "dsp: Fix payload mismatch issue in AFE clock setting" 2019-04-30 10:57:39 -07:00
qctecmdr
c38cf58d38 Merge "asoc: dsp: add support for aptx adaptive speech" 2019-04-25 06:48:14 -07:00
Aditya Bavanari
23513e0973 dsp: Fix payload mismatch issue in AFE clock setting
IID support is set from user space during boot up
which can come in parallel with AFE set clock requests
due to which param payload is set in difference with
the actual set param command as per instance id support.

Change-Id: I07e45fda0943cac814f25c16da930dfae5d209a6
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-04-25 09:36:36 +08:00
qctecmdr
7bf19b93d3 Merge "dsp: update error handling for Doa Tracking Monitor" 2019-04-23 20:41:27 -07:00
Zhou Song
caa541d688 asoc: dsp: add support for aptx adaptive speech
Add support for speech codec which is similar to a2dp aptx adaptive.

Change-Id: Ibfbcf086f009fdb561e26aaf92cefc92f1bd16ca
Signed-off-by: Zhou Song <zhous@codeaurora.org>
2019-04-22 14:43:00 +08:00