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>
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>
Add change to support BE DAI link based on proxy
ports.
Change-Id: Id7ca274e330f025ac015567de86403fb14781cd0
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
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>
Add variable bit rate mode support for aac codec.
Change-Id: Iedd9fe0df2d3a12e3d4e6c2916305399da10873f
Signed-off-by: Manisha Agarwal <maniagar@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Add support to switch tws channel mode for aptx adaptive
encoder.
Change-Id: Ife4170be56b152d34758a1cfd20fa4ec203742db
Signed-off-by: Zhou Song <zhous@codeaurora.org>
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>
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>
Add MI2S/TDM AFE senary port IDs for Kona target.
Change-Id: I8dafa4516c31040aad0bca30cfdc9acbdf460bf1
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
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>
Add support for speech codec which is similar to a2dp aptx adaptive.
Change-Id: Ibfbcf086f009fdb561e26aaf92cefc92f1bd16ca
Signed-off-by: Zhou Song <zhous@codeaurora.org>
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>
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>
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>
Check if payload data is big enough before accessing
the data in it.
Change-Id: I939f205a8cebf6ef4859f81fae5429bca013d540
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
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>
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>
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>
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>
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>