Commit Graph

215 Commits

Author SHA1 Message Date
Phani Kumar Uppalapati
b15db3b6c8 Merge commit 'd9fa9d435ba1b92cf0f0361a0749107b7abc45a5' into audio-kernel-5-4.lnx.1.0
Change-Id: Iaf98532030ee4ef5fe6a70df083a685733dd5670
2020-11-05 19:15:07 -08:00
Ashwini Muduganti
7c9ef4221e soc: add check condition before enabling irq.
Enable interrupt request only when the interrupt is
in disabled state.

Change-Id: I67795bf0ee344661e02b0fec3181cd7980d56652
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-10-23 11:04:00 -07:00
Vidyakumar Athota
88c1c0288c Merge commit '1a7cee75ba63d6cce68924591b125d604bef39f5' into audio-kernel-5-4.lnx.1.0
Change-Id: Ie4363b4d1be12c7fd85e261bf728462009d8a2cf
2020-09-30 10:01:03 -07:00
Harshal Ahire
4015ed0c54 soc: fix HS LPI issue for holi target
- Skip audio hm voting during bootup.
- Vote and unvote audio hm vote during swrm_runtime_suspend
  and swrm_runtime_resume

Change-Id: I7a9c20f62ba0d87779b26da218bfe7373132b565
2020-09-29 00:35:35 -07:00
Sudheer Papothi
001b648150 soc: soundwire: Update frame configuration for native audio playback
Update frame shape configuration for native audio playback for better
performance during native audio playback.

Change-Id: I2d7c22e1cb69e73e4f474be020931d74715a1a60
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-09-19 10:58:26 -07:00
Vikram Panduranga
0bcd702216 soc: add fixes for 4-ch config
Add fixes for 4-ch config and other misc fixes.

Change-Id: I393ed7b9ea70cc8cd3d301984bee430135507905
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2020-09-17 16:46:34 -07:00
Meng Wang
91437a36ea soc: swr-mstr: check swrm->state in swr_runtime_suepend
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>
2020-09-08 13:13:56 +08:00
Vidyakumar Athota
584244b6ac Merge commit '5efb3a4ee3959f20ed2b697663205ec9a6bd1e5c' into audio-kernel-5-4.lnx.1.0
Change-Id: I58fbdf6b91c33ab5d147efbe5f5706616052c7fe
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2020-09-06 18:25:28 -07:00
qctecmdr
d22126dbda Merge "soc: soundwire: Fix soundwire audio core voting sequence" 2020-09-03 18:06:23 -07:00
qctecmdr
9fd22f4064 Merge "soc: soundwire: fix for headset mic recording issue with wcd937x." 2020-09-03 18:06:23 -07:00
qctecmdr
c0411d8c3a Merge "soc: soundwire: support 600KHz bus clock scaling" 2020-09-01 18:11:51 -07:00
Sudheer Papothi
e649c72517 soc: soundwire: Fix soundwire audio core voting sequence
Fix soundwire audio core voting sequence during sub system restart.

Change-Id: I1653cc8b62083b5b736e661d608b0249e03f6093
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-08-31 16:49:57 -07:00
Vangala, Amarnath
03357c3d52 soc: soundwire: fix for headset mic recording issue with wcd937x.
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>
2020-08-31 16:42:25 +05:30
qctecmdr
b387595408 Merge "soc: swr-mstr: update component and interrupt enable sequence" 2020-08-29 00:30:36 -07:00
qctecmdr
d605e7c781 Merge "soc: swr: release transaction slot at failure" 2020-08-29 00:30:36 -07:00
Xiaojun Sang
7eef74a32f soc: swr: release transaction slot at failure
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>
2020-08-26 05:56:02 +08:00
qctecmdr
94c552c1c8 Merge "soc: swr-mstr: Fix headset detect issue due to master.num_dev not updated" 2020-08-25 11:21:17 -07:00
Meng Wang
a59433a484 soc: swr-mstr: update component and interrupt enable sequence
Enable component after enabling interrupt to avoid missing
some intterupt during master init.

Change-Id: I0f60c5431a815c58f878d3b9275a046e47939111
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-08-25 17:18:16 +08:00
Meng Wang
8f75f43515 soc: soundwire: support 600KHz bus clock scaling
Support 600KHz soundwire bus clock scaling for low power voice
activation usecases.

Change-Id: I81167895cf096a669e1335d3e4a8be6f3e7bf7f4
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-08-25 08:20:53 +08:00
Vatsal Bucha
1bd0eed253 soc: swr-mstr: Fix headset detect issue due to master.num_dev not updated
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>
2020-08-20 18:53:13 +05:30
qctecmdr
d9f2992429 Merge "soc: soundwire: support multi soundwire devices configuration" 2020-08-17 01:44:20 -07:00
qctecmdr
825b7bc047 Merge "soc: update wake interrupt check condition" 2020-08-17 01:44:19 -07:00
Sudheer Papothi
9654ef28aa soc: soundwire: support multi soundwire devices configuration
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>
2020-08-13 15:50:53 -07:00
Vignesh Kulothungan
7514e5c33e soc: update wake interrupt check condition
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>
2020-08-05 15:33:50 -07:00
Vatsal Bucha
d4b25f9f73 soc: swr-mstr: Fix random headset detection issue on scuba
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>
2020-08-04 07:50:37 +05:30
Phani Kumar Uppalapati
726d5ea145 Merge commit '33ea77356f47c6c596c8505ca90307fc1245ef3f' into audio-kernel-5-4.lnx.1.0
Change-Id: Iacb389506a643a1ac70a3d51c2dfc1eeb47f690c
2020-07-30 19:48:24 +05:30
qctecmdr
18eded0d2f Merge "soc: swr-mstr: Avoid overflow during swr fifo read/write" 2020-07-28 22:40:06 -07:00
qctecmdr
8de2140998 Merge "soc: swr-mstr: Fix KW issue in swrm_remove" 2020-07-24 00:05:32 -07:00
qctecmdr
ae75f2e737 Merge "soc: swr-mstr: Resolve compilation error during overflow irq" 2020-07-24 00:05:32 -07:00
Vatsal Bucha
47b3116ec1 soc: swr-mstr: Avoid overflow during swr fifo read/write
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>
2020-07-22 21:53:18 -07:00
Meng Wang
96262c74ed soc: swr: update interval high register
Update interval high register.

Change-Id: I7c56ba801545f14607796977a976e535cf9da6ca
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-07-14 08:52:40 -07:00
qctecmdr
ab4679a93f Merge "soc: soundwire: Enable audio core voting" 2020-07-14 06:11:20 -07:00
Sudheer Papothi
db0cc84eb7 soc: soundwire: Enable audio core voting
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>
2020-07-07 15:16:47 -07:00
Vatsal Bucha
a20b914402 soc: swr-mstr: Add delay of 100us after last write during bulk write
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>
2020-06-30 23:11:50 -07:00
Vatsal Bucha
a1e36bc8bc soc: swr-mstr: Fix KW issue in swrm_remove
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>
2020-06-30 14:58:11 +05:30
qctecmdr
dd29f28450 Merge "soc: swr-mstr: Fix KW issue in swrm_remove" 2020-06-29 11:21:31 -07:00
qctecmdr
92b6ef250c Merge "soc: soundwire: Reduce soundwire runtime suspend delay" 2020-06-29 11:21:31 -07:00
Laxminath Kasam
3afce0de68 Soc: soundwire: Update hw_ctl on HCLK at bootup
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>
2020-06-25 00:40:54 -07:00
Aditya Bavanari
42a8ba550a audio-kernel: Synchronize hw vote and unvote requests
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)
2020-06-25 00:37:32 -07:00
Vignesh Kulothungan
148520fd4d soc: disable swr master probing
Change-Id: I9995f23470d287e2856f2001709f1725137ffff9
Signed-off-by: Taha Azzaoui <tazzaoui@codeaurora.org>
2020-06-25 00:33:34 -07:00
Vatsal Bucha
c9fc630a60 soc: swr-mstr: Resolve compilation error during overflow irq
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>
2020-06-23 15:52:30 +05:30
Laxminath Kasam
034cd15ba8 Revert "soc: mstr-ctrl: Retain Audio_HM voting until suspend"
This reverts commit d02c7efb35.
and commit 61f235e5bd to avoid AOP
related issues.

Change-Id: I0b8b44bc5cca6bef6bc18c228f08a9c585c79c1c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-06-22 09:40:14 +05:30
Sudheer Papothi
c7cc20abc0 soc: soundwire: Reduce soundwire runtime suspend delay
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>
2020-06-18 18:41:37 -07:00
Vatsal Bucha
269c76b335 soc: swr-mstr: Fix KW issue in swrm_remove
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>
2020-06-18 09:00:27 +05:30
Vatsal Bucha
f0c7f88868 soc: swr-mstr: Fix headset detection during sva clk switch
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>
2020-06-15 07:06:13 -07:00
qctecmdr
a14bf0fa0a Merge "soc: soundwire: update soundwire debug logs" 2020-06-11 04:15:16 -07:00
qctecmdr
0f5df347f1 Merge "soc: mstr-ctrl: Retain Audio_HM voting until suspend" 2020-06-11 04:15:16 -07:00
Sudheer Papothi
4dc669fa7e soc: soundwire: update soundwire debug logs
Update soundwire debug logs to avoid confusion during soundwire
enumeration of slaves.

Change-Id: Ib265fb3bf777a1461a9041bb269cdcb5c9ac5e2b
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-06-09 06:13:12 +05:30
Laxminath Kasam
d02c7efb35 soc: mstr-ctrl: Retain Audio_HM voting until suspend
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>
2020-06-08 16:24:54 +05:30
Laxminath Kasam
d941fe254b Soc: soundwire: Update hw_ctl on HCLK at bootup
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>
2020-06-03 11:55:09 -07:00