Standalone mixing path on WSA is mute.
Enable soundwire path is not happening,
add respective call in mixing path widget
callback to setup soundwire and WSA.
Change-Id: Ia8df0fdcc4a022e4b86c11283dd3606412a2fb69
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add a pre ssr up event in all macros ,where GFMUX reset
to done before set the dev_up flag to true.
Change-Id: I77229ccd0ed68aac841146a89fe7f76961260aea
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
Update SOC_SINGLE_SX_TLV to SOC_SINGLE_S8_TLV to make codec
driver compatiable with upstream driver.
Change-Id: I4061b015d715978f3b294ad630f53b64bf66c2b7
Signed-off-by: Meng Wang <mengw@codeaurora.org>
During multiple PDR usecases, due to sync issues
port collision interrupt is observed.
set wsa state to device down before cancelling the ocp
workqueue and bail out from the workqueue when wsa state
is set to device down.
Change-Id: Ibefb338c1d6d2901b8773928fa2c0c48b51ac6f7
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
Retrieve sample rate for VI sense and update codec settings
based on it.
Change-Id: If4341bac77ecae290c44c4412a39b9e5cbf46ac0
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Update mask of wsa macro to apply sample rate
as per config send during hw_params at powerup.
Change-Id: Icf9b40fecf655c06cc60d56ac31808e886f8a49d
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Update smart boost sequence for wsa883x speaker amplifier
to reach max voltage at full scale signal.
Change-Id: Ic1a9ce13753d6e573c7916ae99643c85d6892aa0
Signed-off-by: Sudheer Papothi <spapothi@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>
Allow bolero macro's child devices to pm enable
irrespective of state of their parents.
Change-Id: Ie615ea2db097760de75682b5881f71a37a735fa2
Signed-off-by: Karthikeyan Mani <kmani@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>
Add callback to vote for core votes that the
soundwire master can use while doing a clock request.
Check for pinctrl function errors and in case of any
failures return from clock enable with an error.
Change-Id: Ic5c200d7179a1e3a9695955d8711358cd7618bd1
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
If soundwire gpio is not used, then no need to return
error if not able to get gpio data.
Change-Id: I97705b49d3b01f99b7a4e91190a15ffb211d32f2
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
RX_CDC_DMA_RX0/1/2/3 ports drives RX0/RX1, RX2/RX3, RX4 and RX5
channels on bolero rx-macro. Update channel mask
as per these mapping and return to channel map
accordingly.
Change-Id: I2e66e601b5137ebc513527827332bbb7cde0acb3
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Left and right channel content can get swapped
in new cdc_dma interface.
DMA interfaces underrun results in Channels being swapped.
This issue is a side effect current SW setup for RX path:
1. HLOS Setup WCD Analog Path, Bolero CODEC.
CODEC would drive Fs to LPASS DMAs requesting for PCM samples.
2. DSP setup RX Buffers in Memory :
3. DSP Configures RD DMAs and DMA RXTX CODEC interface
(Enable CODEC DMA interface buffer and
Enable DMA LPASS_RXTX_LPAIF_RDDMA_CTL0.ENABLE
and LPASS_RXTX_LPAIF_RDDMA_CODEC_INTF0.ENABLE
If CODEC Fs, aligns with DMA interface being enabled
there is an underrun as DMA interface pingpong buffer is empty.
This results in channels being swapped.
Proposed work around while keeping current SW setup order.
Provide a workaround to Keep Fs disabled until DMAs and
CODEC DMA interface are enabled and HW could prefetch all buffers.
SW would keep existing setup order:
1. HLOS Setup WCD Analog Path, Bolero CODEC.
CODEC would drive Fs to LPASS DMAs requesting for PCM samples.
2. DSP setup RX Buffers in Memory :
3. DSP Configures DMAs and DMA CODEC interface
(Enable CODEC DMA interface buffer and
Enable DMA LPASS_RXTX_LPAIF_RDDMA_CTL0.ENABLE
and LPASS_RXTX_LPAIF_RDDMA_CODEC_INTF0.ENABLE)
4. Enable Fs Set #LPASS_RX_CDC_RX0_RX_PATH_CTL. CLK_EN to ONE
Change-Id: I7916667f5d857464cc7d77b51da307ab234cc7bb
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Check for valid port before mux configuration.
Change-Id: Iaa32925f0c23305a2a3cedd0e476372aac380e0c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Runtime suspend gets called multiple times during SSR
scenarios leading to clock count mismatch. Add logic
to prevent this in all macros and pinctrl lpi driver.
Change-Id: I380631c1db8cd7d94a8909affd8c96c87f24817c
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
During adsp SSR, bolero runtime suspend is not called and
hw vote clks are not reset. Force bolero runtime suspend
during adsp SSR to avoid kernel panic.
Change-Id: Iff5983ef07f77ecc7f3f344948c013906b4bad60
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Reset GFMUX reg for va-macro and wsa-macro when adsp is up
after SSR. And check if clock is enabled before accessing
register to avoid kernel panic.
Change-Id: Idce9695be552cab0e8e389cf72eeb7a67a754bf9
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Defer codec macro probes if soundwire pins are not
ready to be accessed yet during boot up.
Change-Id: I20173e49043a076d73cdbb811863afbff87d4a3b
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add changes to support disabling of soundwire devices
so that soundwire pins can be freed for other purposes
if needed.
Change-Id: Iae14d43c2c3d5380347be4c3b443c209b2612a97
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>
Boost level max setting can be left to default
and not needed to be limited to any value.
Change-Id: Iab5073cedd6e69bb4311af9af54ff409d8bfd24c
Signed-off-by: Karthikeyan Mani <kmani@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>
Add Kcontrol to enable/disable digital mute for WSA RX0
and RX1.
Change-Id: Ib9ee2b01f142fdce5dab92eafe9c4b0c5d65844a
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Vote for LPASS HW core in soundwire clock request before
soundwire register access to avoid LPASS going to sleep.
Change-Id: I1e54ece19130cf6bd63fbf75a8a0716856c3b73e
Signed-off-by: Sudheer Papothi <spapothi@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>
Enable soundwire gpio before enabling soundwire clock
so that bus clash does not happen when interrupts are
received.
Change-Id: I40983b8837373f1ea7ac8fa6add7c56225ff0592
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Frame sync of bolero macros need to be at 4KHz default
value.
Change-Id: Ia5399a3c4bee7e0f74115e5ffcb1ed51cbd07639
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
If mclk enable is failed during mclk widget power up event, it would
still send a power down event for the widget during disable, which could
disable the mclk voted by other client like soundwire. Do not disable
mclk during power down if enable is failed during power up.
Change-Id: If782b34f9ef414501590ed8cf681bbe58f1dda76
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Invoke swr device down callback to set soundwire master
to reset state before setting ssr down flag. This is to
ensure master is reset to proper state after ssr/pdr.
Change-Id: Ifb5548f603ac03b772006314f4723c0ac0176928
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Reset swr only during init or ssr-pdr scenarios.
Do not reset swr during clock stop, which would
result in bad state of master and cause error
interrupts.
Change-Id: I88e071921409a5b5797aeedb8e7cb57cb5d5bb9a
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>
For get_channel_map API, return proper channel mask
and channel count for EC ref port on WSA macro.
Change-Id: Ia90f1a1c5e90075d08f01c50349d6a8479be7897
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>