Some alsa API are removed in kernel-4.19 which would cause
codec driver compile failure. Update codec driver to fix it.
Change-Id: Ie358ec1863082166958059c179300b453d2a03ad
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Switch audio drivers to SPDX identifier on msm-4.19.
Change-Id: Ic3f0230a516db251b8d81e8a7e73dbc04d66fe1b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Paths using WDMA3_OUT widget are currently not marked to be ignored
during suspend, which results in the path teardown during suspend.
Due to this the audio use-case is broken. Fix this by marking
WDMA3_OUT widget as ignore_suspend.
CRs-fixed: 2176596
Change-Id: I72a2dda21aabfe9b13ea8660d4e3a51b3185d9ea
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
During bind/unbind of ngd_msm_ctrl power_gate_digital_core
is called. Simultaneously tavil_remove is also called
making tavil pointer as NULL. Check for tavil as not NULL
at the start of function to avoid NULL pointer dereference.
CRs-Fixed: 2267796
Change-Id: I6fc476cc8b706b556836f30838983de0f34d4fc1
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Currently, the fs_cntr for MAD is enabled whenever the MAD
audio path is enabled. But, a new issue is reported where
MAD fs_cntr is required even for some of the non-MAD paths.
As per hardware requirements, enable the MAD fs_cntr always
from the codec default registers.
Change-Id: I6fe8f663b82e711b4194aa51a3e21150aa98cf02
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
When micbias is enabled set curr to higher value for
vreg bob bypass and when it is disabled set it
to default value for sm6150.
CRs-Fixed: 2315478
Change-Id: I451506002f382e666d47bc83944bdc8dbbedcad8
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
During SSR, when the playback on speaker gets started before codec
is out of digital core power collapse, results in soundwire
register read/write failures. Check for codec power state before
enabling the soundwire during speaker device path enablement for
playback usecase to avoid soundwire register read/write failures.
Change-Id: I3b45ef0c34ad4f97aad89afaf719989ffbda7485
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
For new swr master controller to recover WSA on wcd934x variant,
trigger events from wcd934x driver for ssr down and up.
Change-Id: I8f0163178708760ef3ad2a765a80682611693e9b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
When codec probe is not correctly completed and ADSP SSR happens
before sound card is registered, calling SSR callback may result
into NULL pointer dereference and kernel panic happens.
Check sound card state when calling device_down and post_reset to
avoid NULL pointer dereference.
Change-Id: I35fd84af51edf45db6fd451dc68dbcaaed11fee7
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Add support for SSR/PDR handling using SND event framework.
Change-Id: Ia96858ed6dc43cbb80d01a7797abb57442813d3b
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
When ssr is in progress, during some race conditions
mbhc events are getting reported when codec is still
coming up. Ignore such events without reporting.
Change-Id: I3d3f78f97c2b855fc36a480f38c166bda2d979f0
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Cancel any pending delayed work in device down call
to ensure no work is scheduled during or after a
SSR/PDR sequence.
Change-Id: I4cc89cb1a9d8be732c978044d4eea3cf6644ec30
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Use hardware default value for boost state in regmap.
Use correct mask for initial value of boost state.
Change-Id: Ia8b707ba0128662d47059d25325693bc8eaff723
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Reset power_active_ref counter to 0 when it is negative to
take digital core out of reset during next session.
Change-Id: I724ffe6e3547655424238ca02a9bf8ac24b101fe
Signed-off-by: Meng Wang <mengw@codeaurora.org>
If wcd934x config is removed, need to stub out the
APIs to load any dependent audio modules and enumerate
sound card.
Change-Id: If885d4d1f0ee83448ac41ed66b51f078978cb7d1
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
WSA8815 requires default boost state of MAX_STATE_2, when
speaker protection feature is disabled. Set boost state to
MAX_STATE_2 in all cases for WSA8815.
Change-Id: Ic700d9a206e94a4cdd1d99f8547bed9df1e759e8
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Null check is needed before accessing swr control data
to ensure proper error handling in case speaker path
is issued when swr is not enabled.
Change-Id: I5037a912652189b3ae58f1119d0534777a9c264a
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Update register default values before post SSR to avoid codec nack issue.
Change-Id: Ibf1e3275d27c4b65ab179b9ddc5a51621c89eab7
Signed-off-by: Meng Wang <mwang@codeaurora.org>
In Tavil driver, both ANC0 and ANC1 channel registers are written when
each ANC channel is enabled. This logic results in high latency during
ANC enablement on Tavil codec. Optimize this logic by only writing the
corresponding channel registers when enabling ANC0 or ANC1.
Change-Id: I62e8572967e6ca6c851cbaaad5f1b8c19e5b1a5f
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
During Tx path enablement, amic information is needed for proper
power level settings and for better performance. Existing API returns
incorrect amic information. Changes provide the correct amic information.
Change-Id: I18f3f35212cae47e5d944c2e075f03889147722b
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Observe mute issue when PDR triggered while music playback
on HPH. As per HW recommendation, ensure OCP is turned off
before PA enable/disable. During PA enablement, turn off OCP
to avoid false OCP interrupts.
CRs-Fixed: 2167007
Change-Id: I0dc2cc6ded3416b635d14dc3b7aafa7997fe9a4d
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Currently IIR coefficient values are written to HW everytime when
digital core comes out of power collapse. This increases playback
cold start latency. So update IIR coefficient values before IIR
band enable.
Change-Id: I57ad54b4674ed0a49fdfc55d77c519568f5a7893
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Change i2s max rate supported for tavil to 384000Hz.
Cleanup usage of intf_type to optimize differentiation
between slim and i2s.
Change-Id: If6451dae7c61e8f61be3d5a13549f98b382e5054
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add support for tavil i2c access. Add audio
routings dapm widgets for data and control.
Change-Id: I96ebf7a5700b10f294f4fadfeeb21dab490a9313
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
With AANC enabled, and when the device switches
from speaker path to handset path there is a audible
pop. Add more delay to the aanc enable work function
to resolve the pop issue.
CRs-Fixed: 2137607
Change-Id: Icaf381179b0a81440b21ab4280cb6fc95e6fe6ba
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add support for analog mic TX hybrid mode to allow
audio catpure in high performance at the same time
achieving lower power.
CRs-Fixed: 2136385
Change-Id: I08b90a26d6b6e4761ff17dec84bf58f8d437d908
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Set bus_down_in_recovery flag as soon as possible when
BUS down notification reaches codec driver. This is to
avoid any unwanted slimbus transaction while BUS is still
not recovered.
Change-Id: I77917975372bf51e6aa881cbfc63c479478db375
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Reset ASRC after audio playback is completed to clear
the FIFO and avoid any noise being generated.
CRs-Fixed: 2129994
Change-Id: Ie45796e1bd68d5a8bd790490a65520358f26b811
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
Add new mixer ctls to control max boost state level
for speaker protection V3.
Change-Id: If967de46955f6dc8692986503daea68ce105f642
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Propagate the changes based on latest snapshot
for audio kernel source tree at below cutoff of
kernel msm-4.9 -
(040750bfa78 -
"Revert "ARM: dts: msm: Add DT node for aop-qmp
clock controller on SDM845 v2"")
CRs-Fixed: 2104096
Change-Id: I0927c40b3a188dbf892e7ec4c1c7810953724929
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
(1996ec83a45: "ARM: dts: msm: Reduce CNOC bus voting for
USB slave on SDM845")
This change is to migrate latest snapshot of kernel drivers.
Change-Id: I84669db544773d3ce9d2d5dff0ab6943bd7d8ff9
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>