Commit Graph

138 Commits

Author SHA1 Message Date
qctecmdr
934188e064 Merge "dsp: afe: add support for codec dma data alignment API" 2020-05-16 03:24:33 -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
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
Mangesh Kunchamwar
27baab0fb9 asoc: send VAD enable or disable
Updates to send VAD enable or disable to AFE port.
Send VAD and island configuration based on the ports
on which these features are supported in Vipertooth
machine.

Change-Id: Ib3e6d46fed3bf9e822f350c9ec0dc629cd82547e
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2019-04-15 02:51:36 -07:00
Cong Tang
b84eea3768 audio-driver: support tdm multi lane for sa8155
Support group tdm multi lane configuration for TDM interface.
With valid lane mask tdm interface support delivery audio channels
through different data lines.

Change-Id: I63e8ba1106b89c6bcaca0a8359a1def696c334ad
Signed-off-by: Cong Tang <congt@codeaurora.org>
2019-04-15 02:42:21 -07:00
Surendar Karka
7bc942b640 dsp: update error handling for Doa Tracking Monitor
AFE callback payload response for param id FFV_DOA_TRACKING_MONITOR
is not handled properly. This is resulting in 2sec
of wait event timeout delay. Updating the state event and
status event based on the payload response. This decreases
hal load time by 2sec.

Change-Id: If960ee14e264b3fe444463b47878d29aaee5e63f
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2019-04-15 02:30:15 -07:00
Karthikeyan Mani
3325ee5475 dsp: afe: check for payload size before payload access
Check if payload data is big enough before accessing
the data in it.

Change-Id: I939f205a8cebf6ef4859f81fae5429bca013d540
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-04-10 16:52:45 -07:00
Karthikeyan Mani
5670cbd6e3 dsp: afe: get apr handle before sending apr pkt
Make sure to get apr handle before sending a packet
so that it does not end up with no handle to send
the apr packet.

Change-Id: Iaaebee3ddc6c83896e4cb9dc8149d310fc7d67f1
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-03-25 17:45:17 -07:00
Laxminath Kasam
36384ecca2 dsp: get excursion logging at afe close for wsa and log data
Trigger xt logging getparam at every playback close
and store data. When app queries sys/class node, return
stored values and reset to 0 for some params as per
app requirement.

Change-Id: Ice1a3e9a7e03062390f1c36184a971635e55d450
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-03-20 00:07:28 -07:00
Aditya Bavanari
740b4839cb dsp: afe: Implement get param for excursion logging parameters
Implement get param for AFE_PARAM_ID_SP_RX_TMAX_XMAX_LOGGING
in order to get excursion params from DSP.

Change-Id: I5129938c51c6f6ede9d4703d13be60d04d26f5e3
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-03-15 15:56:01 +08:00
Laxminath Kasam
2e13d95506 dsp: q6afe: Add v-validation support for speaker
With speaker protection in v-validation mode, speaker
samples can be tested in early factory mode. Add
support for v-validation feature from driver.

Change-Id: I92493d6d2784cf4dd58021746bffe01180f89d23
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-03-13 19:53:30 -07:00
Mangesh Kunchamwar
cdd68dbe72 msm: vote for LPASS core while access LPASS registers
When ADSP is in power collapse or island state, it would fail
to access LPASS codec register.Vote for LPASS core to avoid
LPASS power collapse with pmruntime approach while accessing
LPASS registers & TLMM.

Change-Id: I74d037e499fb6f1245b9a1bd1b0a77200608c27b
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2019-03-06 08:50:31 +08:00
Linux Build Service Account
16470427d0 Merge "asoc: Add support for Aptx Adaptive decoder" 2019-02-27 01:15:33 -08:00
Linux Build Service Account
b24eed47e3 Merge "audio-kernel: dsp: Add needed exports" 2019-02-27 01:15:32 -08:00