Check soundwire clock source before clock switch to avoid
redundant soundwire device suspend for the same clock source.
Change-Id: I613789b23c171959a60c9a059a30b3f1494f3dfa
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
During voice activation and audio capture concurrency usecase,
there is no common reference count for DMIC clock enablement,
results into mute when one usecase tears down. Change enables
a common reference count in bolero codec driver between voice
activation usecase and audio capture usecase to avoid mute
during VA and audio capture concurrency.
Change-Id: I424c941178d7e9ff91288a50ba27605b2b9d3abe
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Akhil Karuturi <akarutur@codeaurora.org>
Add system sleep ops and invoke force runtime suspend for all
the macro drivers in bolero in order to synchronize
system suspend and runtime suspend callbacks.
Use freezable delayed work queues instead of normal
delayed workqueues in order to avoid contention with
pm suspend callflow.
Change-Id: Ibb0d35ad80c09e7f2a7032b4daef53c359056dfd
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Update snd info API and userspace and get codec info.
Change-Id: Ic9cfc89365cf6263a9b1c02403d68e7740bebbeb
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Playback on speaker is getting mute due to notifier not getting
registered. Register notifier for all bolero codecs
variants to enable WSA PA.
Change-Id: Id13a533af7096f50de2e1a654393c579a81af953
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
If codec receives ssr disable notification when
already in disabled state do not have to process it.
This makes sure codec register access are not done when
not necessary.
Change-Id: Iafc2b03d7c707c46c69ca995d36119929c34c222
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
From bolero 1.1, Bolero and SWR CSR moving to AHB clock
and no need to enable other macro RCG clocks.
Change-Id: I6663196a88dbf07868d6426bdda98f33e42004d1
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Expose API from bolero driver to retrieve version
info by macro drivers. Update bolero driver to
get version from dtsi.
Change-Id: Idc3735721de90ee4f74319537b17a530d3c125a6
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Audio is distorted during first 3 secs on headset record
while doing device switch from dmic to headset mic.
Disable BCS before slow insertion detection and enable it
afterwards to resolve the issue.
Change-Id: Ie5bc4b5292e5f69066760cab44d78989a74f13f4
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Vote for codec core and NPL clocks before regcache_sync
to avoid unclocked access of bolero registers.
Unvote once the regcache sync is done.
Change-Id: Iae45f487113c55318f33cd1950e2d6b64bcd945a
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Observe pop if FS clock is turned on at end of
powerup sequence. Ensure WSA PA is turned on
after FS clock to avoid pop.
Change-Id: Ic1214d361e77db252b7a90a89fc99c69f51e270b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
On bengal target, audio HM voting is only applicable.
Update bolero driver to make audio HM vote if audio core handle
is not present.
Change-Id: I9abaf42c04aa8f1b89d9c08e628ab142ce99151a
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
During low power island mode, register to event listener
to process soundwire inband interrupts from the soundwire
master driver.
Change-Id: Ib15f5ec59ea19010dbb8f9744de76bfc2ca7eebb
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Fix soundwire clock sequence for headset SVA usecase to avoid
tx clock voting during low power SVA usecase.
Change-Id: I9613eee6a0b66560fa1108b4887af71507d345e7
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Unvote lpass audio and hw votes from bolero suspend
only if the voting was done from the corresponding
resume function.
Change-Id: I299b8e5639efe2883980abc5d0904733fbdc5a77
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add compander soft reset event that can be requested
from a slave codec to reset at power down to reduce
click and pop noise.
Change-Id: I2f6ff182e258e02979166b0e76b6a1d439b1cf87
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
After SSR/PDR, the lpass clocks will be in off state. Force restart
clocks after SSR/PDR, if enabled before SSR/PDR, to reenable the clocks.
Change-Id: I3d850d92bdc6324aa7a64a83a9066f388a85c7f7
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Add support for LPASS Audio HW vote needed for low power AMIC
VA usecase.
Change-Id: If6642d418dbf2cc9773fbd0ec0fe35c30afac140
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Some bolero codec registers are not correctly restored after
SSR and causes DMICs on bolero don't work. Add this change to
restore all bolero codec registers after SSR.
Change-Id: I3666a77f802f62452a0e0de4859f48a0f9e5cbb1
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Exposure of driver bind/unbind to userspace via sysfs may
lead to unexpected behavior.
Hide bind and unbind by driver attribute.
Change-Id: I20d6ee653bcc16af15d6368664aaf240c6645cd0
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
TX hold callback returns without making a callback
to external codec if the ADC with number one is called.
Add the condition for the missing ADC to make the callback
for ADC1.
Change-Id: Iec480b40cfbe199fbe06151abd99d9ad6aaf9c9d
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
When SSR happens, use dev_up flag in codec
to bail out from clock enablement routine.
During interrupt processing if clock enable fails during
SSR, exit isr routine without disabling clock.
Change-Id: Ie2b56521daa70790d6ef53a06c7becc2ee8010a4
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Add Bolero clock resource manager driver to handle/manage
bolero clocks for all the concurrency usecases like record
+ voice activation.
Change-Id: I970a05d96fc9060b44bfe670d465f0b9d72cc53b
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
There can be deadlock between __bolero_reg_read/write and
bolero_runtime_suspend. Remove the mutex_lock in
bolero_runtime_suspend to avoid deadlock.
Change-Id: I712b9f24adeddda8899b39f90291394965443163
Signed-off-by: Meng Wang <mengw@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>
Check for valid handle before pm_runtime_resume in bolero register
read/write functions to avoid dereference.
Change-Id: I34d567e7575202817f4fcda784d0f3df2ed77bde
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Add a check to see if split codec is present for
the slaves being probed and add platform data to
such slaves.
Change-Id: I8b143c551a481b88dffc8763421d2aaa02c0012d
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Clock Fs generation registers are in always on domain but
is needed for all the playback and capture usecases. Enable
clock Fs generation in the boloero codec after the clock
enablement.
Change-Id: I3a9cf14660f871b26ec96ef8b3e245ba5dadeb78
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
When UP notification is sent to macros, the macros can try
to do regcache sync for their regions. Set dev_up flag in bolero
before sending UP event to macros to enable register access.
Change-Id: Ic04cfef121e9be55e91bf8927da26f9ec249338e
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Add support to get the platform specific soundwire port configuration
for soundwire master ports.
Change-Id: Ie1d32a77d534f6c3f397936b85c025b14d01f321
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>