Enable interrupt request only when the interrupt is
in disabled state.
Change-Id: I67795bf0ee344661e02b0fec3181cd7980d56652
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
- Skip audio hm voting during bootup.
- Vote and unvote audio hm vote during swrm_runtime_suspend
and swrm_runtime_resume
Change-Id: I7a9c20f62ba0d87779b26da218bfe7373132b565
Add fixes for 4-ch config and other misc fixes.
Change-Id: I393ed7b9ea70cc8cd3d301984bee430135507905
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
in swrm_runtime_suspend, current_state is not updated and
causes audio_core_vote is not disabled. Update to check
swrm->state to resolve this issue.
Change-Id: I2c5be360fe5ddd964d7bc45696e254579aae5392
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Add slave device address for wcd937x in soundwire master.
Update slave port configuration for wcd937x for holi.
Change-Id: I1f953e47b1520efd99b6f400593242ae5fc6158a
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
Transaction slot is not freed when failure happens. Accumulated
error may lead to breach of transaction slot limit. Free the
transaction slot at failure.
Change-Id: I8588be18a820306d2a596fe2bf4a97346076b9b9
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Enable component after enabling interrupt to avoid missing
some intterupt during master init.
Change-Id: I0f60c5431a815c58f878d3b9275a046e47939111
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Support 600KHz soundwire bus clock scaling for low power voice
activation usecases.
Change-Id: I81167895cf096a669e1335d3e4a8be6f3e7bf7f4
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Headset is not detected sometimes due to master.num_dev not being
updated when we call GET_ENUM_SLAVE_STATUS as get_logical address
may not have been called. Also enable slave irq only when
swr wokeup from clk stop and not when master is already up.
This will prevent valid irq to be discarded as spurious irq.
Change-Id: I00284e9340668c853d0bd604fe66801118982780
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Update frame shape configuration to support multi soundwire devices
attaching to a single controller.
Change-Id: I7c59b1b09aa0c2417f888b382f8de943f7b62bbd
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Call pm runtime functions from wakeup interrupt
only if soundwire master is not in SSR and if dev up is
true.
Change-Id: Ic394be964437bdc009f1b4c5dd6e46673875b0df
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
When headset is inserted and reboot device sometimes
headset is not detected after reboot as host_irq from
swr slave gets masked. This is because of cmd error seen
after clearing all irq which results in fifo flush.
Read swrslave irq before clearing so as to resolve cmd error.
Also enable host irq after clearing enum interrupt at master.
This ensures irq is properly enabled.
Change-Id: Id66029c65c4d813391bfeb8c0c619560f298eeab
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Avoid swr fifo overflow by checking no. of outstanding
commands in fifo and comparing with fifo depth before
every read/write. If no. of commands is equal to fifo
depth then give some delay and retry. If no of outstanding
commands are still equal to fifo depth then flush fifo
and try writing/reading from fifo again.
Change-Id: Ifd986c7affb70a61f8a90e4960a2779273a7d4d2
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Audio core vote enables soundwire master and establishes
soundwire link without which soundwire master will not power up.
This change votes for audio core during soundwire runtime
resume and unvotes during soundwire runtime suspend.
Change-Id: I3ca283be42670a56102c4f08c0f207ae9dc4e5c3
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
There is no delay after last write during bulk write. Add 100us delay
so as to ensure that last write goes fine.
Change-Id: Ifc1585f30eec639ffd6b80dde2e0365f368349d7
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
irq_set_irq_data is used as argument to irq_set_trigger_type
which can be NULL. Check if irq_set_irq_data is NULL before
access.
Change-Id: I4832d65da22327d184b8a0927e84ff0ca4d40fad
Signed-off-by: Vatsal Bucha <vbucha@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>
(cherry picked from commit 31aa875405)
Fifo status is not printed during overflow|underflow irq.
Print status in hex format to resolve compilation error.
Change-Id: Ia9ececc58ec58b00c1bbd7b097abce1393d155ab
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
This reverts commit d02c7efb35.
and commit 61f235e5bd to avoid AOP
related issues.
Change-Id: I0b8b44bc5cca6bef6bc18c228f08a9c585c79c1c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Reduce soundwire runtime suspend delay for soundwire
to enter into sleep early once the usecase ends.
Change-Id: Idbace0fbe9363f487165865eacf5b85d3be86477
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Irq pointer is first freed and then used in
irq_set_trigger_type and set wakeup capable.
This may lead to Null pointer dereference if
irq is NULL. Free irq after using it.
Change-Id: I86339e9995922cc8111f12593eb781226bb07a2a
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Headset insertion/removal is not detected sometime due to
fifo read failure due to swr underflow. This is because if
headset sva is enabled, during clk switch swr force stop
happens and if mbhc has already taken pm vote for 3sec
further mbhc reads/writes will fail. If swr is in clk switch
mode then call swrm runtime_resume during reads/writes
to resolve issue.
Change-Id: I0d65869bd1c645bbf7ded9c0265f8d7de0dc624b
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
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>