Commit Graph

225 Commits

Author SHA1 Message Date
Laxminath Kasam
45d07c545c soc: swr-mstr: Update master port max check
In pcm port config, update max port check.

Change-Id: I6e0aa683137678962827469914633adade937132
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2021-03-08 13:51:37 +05:30
Laxminath Kasam
39c95cbca4 soc: swr-mstr: Handle error exit for swrm probe fail
In one of failure for swrm probe, swr unregister
is not done causing crash. swr unregister device
in respective error case.

Change-Id: Idbf50b2ae1d66eafa1db8dbbd386db7982c3b0f8
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2021-03-05 10:12:42 +05:30
Laxminath Kasam
a87c793e30 soc: soundwire: Ungate the swr rx ports
In soundwire version 1.7, rx soundwire port2/3
are extended to 32bits to use as PCM port too.
When using for PDM port as well, need to ungate
the ports for functionality to work.

Change-Id: I1815a9337ab21e0000ca7dbfeaac4c01dadec0dc
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2021-03-01 13:54:02 +05:30
Sudheer Papothi
068e2722da soc:soundwire: disable pm_qos in soundwire master driver
Disable pm_qos in soundwire master driver.

Change-Id: I0f042faf48f003bef8b43641ef0ccb3cf82d7dd9
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2021-02-13 06:35:22 +05:30
Laxminath Kasam
6a7bb13614 soc: swr-mstr-ctrl: Update SWR_TX to receive port params from slave
Update swr_tx slave port config to use slave provided port params
and remove slave port static tables.

Change-Id: Icfedf1229a88432e80c2294e13f2ccc3949417c5
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-12-18 14:40:06 +05:30
Laxminath Kasam
9a4b45f6bb soc: swr-mstr: Update port params for TX master runtime
Remove static tables for master port params for soundwire TX.
As master port params are dependent on slave port config,
determine master port settings runtime and apply for
TX soundwire master ports.

Change-Id: I5e606404521abd514097ddf7500ba4e427024914
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-12-18 14:32:13 +05:30
Jyotirmoi Sarma
eb74cdddba soc: Upgrade soc to support 5.10 kernel
Change symbolic links of header files
Update kbuild file to include waipio config
Upgrade to new QoS APIs

Change-Id: Idbbc734e79e50bfae8aa5baa0a5cd4b566f02e50
Signed-off-by: Jyotirmoi Sarma <jyosarma@codeaurora.org>
2020-12-14 17:18:47 +05:30
Laxminath Kasam
2489ca529c soc: swr-mstr-ctrl: Update multi_EE setting for clock_stop
Update link_manager and multi_EE clock stop settings
during master_init and clock stop wakeup.

Change-Id: Idc1610551304209c2688486b1061452ee4e2e46a
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-12-03 22:57:08 -08:00
Laxminath Kasam
98799c5e2f soc: soundwire: Update auto enum value from HW
remove macro for supported auto_enum slaves and
read from master comp_params. Update num_dev logic
to compare with supported auto enum slaves.

Change-Id: Iedadde5a3ee83645c4d8d16e738376e1797fc649
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-12-03 22:56:59 -08:00
Laxminath Kasam
38adb70f3c soc: swr-mstr: Update default val of comp_cfg
for PCM_OUT/IN dataport, update enable bit logic
using default value based on SWR version.

Change-Id: Ibfd342d9046834d074a12003f15e868c5336798c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-12-03 22:56:31 -08:00
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