Restore change to retain audio_hm voting and
ensure AOP hang issue not seen by masking interrupt
wakeup of swr pinctrl pins.
Change-Id: I51bf36d6d6b0999abf10a4bc94cce900d1adf1d5
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
For soundwire version 1.6, HCLK remove HW controlled
at bootup before soundwire frame generation status check.
Change-Id: Idc2420d086261766ea4e79f69320f12c4d6b2259
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
HW vote and unvote is currently called from multiple
clients leading to synchronization issues
during SSR/PDR scenarios. Synchronize all the vote requests
by using digital codec resource manager.
Change-Id: I7e63f69ab5d761a3bb4c7ce70bbef2e8bfd76cfb
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Remove reslock usage from device wakeup vote and unvote functions.
Mutex lock 'reslock' is to used only within runtime resume
and suspend functions, to avoid race conditions between them.
Change-Id: I221b00db2e762a0803b898a62cd98db1fe3ae3fa
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
Soundwire bus clock frequency should not exceed MCLK. Fix
the soundwire bus clock frequency to MCLK during clock scaling
for proper SSP calculation.
Change-Id: I347c8ee0f63f34428160a3408eaa0e999142bc78
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
During SSR and headset detection/removal interrupt
concurrencies, ssr_lock can lead to serv reg ack timeout
issues. Remove this synchronization to avoid this issue.
Change-Id: I242a013a7e9d833db21d737cbdfea2d84bbd29fa
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Signed-off-by: Akhil Karuturi <akarutur@codeaurora.org>
In order to synchronize the core and audio hw votes
in SSR use cases, vote or unvote for these
based on clock count.
Change-Id: I0047e2cc689cc96b34992e5f6f59dae84d1d4e4b
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
RX Master does not support div2 clk switching as div2_en bit
for rx master is floating. Do not do clk switch for rx master.
Change-Id: Iee1716fe892e792ffd17d0861a807e3711cee5d5
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Update MSB of sample interval in the frame shape
to avoid misconfiguration.
Change-Id: I05e99bc563f6cdc71c7caf424441c4caa44ec4c6
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Overflow/Underflow errors are observed sometimes while doing fifo write.
Add delay between writes to resolve error.
Change-Id: Id460e17753001a0dd52acd01a181d91132c36048
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Check for soundwire clock source before clock switch to avoid
redundant clock switch for the same clock source.
Change-Id: I8a7a116cc956f427af677b413928dace5a39a23d
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Headset is not detected if devnum 0 gets detached at bootup.
This is because on detach being called hw will mask interrupt
at slave side but will not unmask it afterwards.
Also device 0 is used only for discovery purpose and
interrupt shouldnt be masked if it detaches.
Change-Id: I78d47243ef67ea5ee1fe3badaec94e596bc8faf3
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Update offset1 of soundwire slave devices in a multi mic usecase
for proper audio capture from the soundwire mics.
Change-Id: If81ab1c2defeacb87b917fb6e3645c6df866f679
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Add support to disable dynamic port map via device tree
property.
Do not update master clock when dynamic port map
is disabled for a sound wire master.
Change-Id: I9f9344866faa4d1c342787e014102d9182ed56ae
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
Some usecases need soundwire bus clock frequency to run at
lower clock rate for better power and performance. Update
soundwire bus clock frequency based on usecase.
Change-Id: I2e786d9f5d5d2ec3841daa934802eeafa79a8f6c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Disable clock gating when soundwire is out of clock stop mode.
Change-Id: I97187fa2deed26fb3270abee1d05f679ace2c0c4
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Before every slave interrupt handler call, reset slave pending
irq flag, so that if irq is halted it does not retain the old
value.
Change-Id: I2c78500e83eca7864029f58cffa80f8648902fb2
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Increase retry count to check soundwire link status at bootup
inorder for probe to succeed. Handle error scenario if
soundwire probe fails to cleanup device properly.
Change-Id: I4a545530e68221a1f428e05aff3d8a93b1dacf84
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add support to enable PCM data transfer through soundwire interface.
Change-Id: I9b162beb7fcdc6bbb90303acb77c350dbcf8c490
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Update soundwire master and slave registers based on the hardware
version.
Change-Id: I8a27bdfbbff133569a7391af8adddadd804bd50f
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Set the number of auto enumeration slaves to six.
Handle auto enumeration failed status.
Change-Id: I322e228ccee57c87840b585ab40947a0afd1b554
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Update change for audio playback and record to work
on bengal target with wcd937x codec.
Change-Id: I2f781e2132b018995f30f4192efd08732196cd28
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
After master init sets COMP_CFG, wait for soundwire link
status to be connected for SWR version 1.6. Update wait
for soundwire link disconnect for all masters.
Change-Id: I0c0b34f225f88f1b3838b0aa653b57b2c7c0cc40
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Frame sync for fractional sample rates is different. Update
ssp period based on frame sync of fractional sample rate
for synchronization of the data channels.
Change-Id: I25eaa5195abcdfad54cfed09beb0abe5aff2499a
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>