Commit Graph

375 Commits

Author SHA1 Message Date
qctecmdr
65c5953d9a Merge "soc: swr-mstr: Avoid underflow due to CPS spkr prot enabled" 2020-11-25 18:57:01 -08:00
qctecmdr
8527c974cb Merge "soc: swr-mstr: Update soundwire state to SSR during UP" 2020-11-25 18:57:01 -08:00
Laxminath Kasam
643c33dcd6 soc: swr-mstr: Update soundwire state to SSR during UP
During SSR up event handler, if soundwire state is
already up or auto suspend jiffies is not completed,
ensure put in suspend/SSR state.

Change-Id: I853f42d125eb5a60e3f1f065a60516877e3a463c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-11-17 02:30:16 -08:00
Hongtao Peng
eae52c27a7 ASOC: fix audio machine driver compile issue
LV Platform use the same LVGVM cause Kbuild mismatch issue

Change-Id: Iad092ebcbd991e52daedb87406920055528e3a1c
Signed-off-by: Hongtao Peng <hongtaop@codeaurora.org>
2020-11-15 18:32:38 -08:00
Vignesh Kulothungan
41db7ae304 soc: add support to read swr physical addr from dt
Remove static definitions of rx swr slave physical addresses.
Add support to read swr slave physical addresses from device
tree and store it within respective master data structure.
Revert addition of slave device address for wcd937x in soundwire
master.

Change-Id: I0eb2597b8e40a54d476cd2662bbe4f2008af899a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-11-05 16:10:45 +08:00
qctecmdr
78fff06931 Merge "asoc: codecs: fix race condition of core vote and reg access" 2020-11-04 19:57:25 -08:00
qctecmdr
8ae1b12168 Merge "soc: add check condition before enabling irq" 2020-11-01 20:23:50 -08:00
Vangala, Amarnath
f2e5dd213c asoc: codecs: fix race condition of core vote and reg access
Auto suspend timer for core vote is triggering before read write complete.
Move the auto suspend of core vote to post read write operation.

Change-Id: Ib0f6b026fe0e7fd3fbe052691db492915e436a78
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
2020-10-30 14:58:15 +05:30
qctecmdr
f03233c4f7 Merge "soc: swr-mstr: Enable device wakeup only for tx macro" 2020-10-28 11:22:16 -07:00
Vignesh Kulothungan
01906e6049 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-28 10:15:12 -07:00
Vatsal Bucha
ff2053b1fe soc: swr-mstr: Avoid underflow due to CPS spkr prot enabled
Underflow is observed sometimes with CPS spkr prot enabled.
Reduce no of retry count for wsa to 1 so as to optimize delay
between reads on wsa and prevent underflow.

Change-Id: I505fcf349b45bd6f2374e5cfee83473f032e4ad7
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-10-28 14:58:33 +05:30
qctecmdr
5872bd0838 Merge "asoc: wcd937x: Update slave port config table for BCS" 2020-10-25 07:34:22 -07:00
qctecmdr
88318ed5e8 Merge "soc: swr-mstr: Resolve swr overflow, underflow errors for wsa" 2020-10-25 07:34:21 -07:00
qctecmdr
6de6dc28a5 Merge "soc: update port config table to handle sva/voip" 2020-10-25 07:34:21 -07:00
qctecmdr
170e5c6038 Merge "soc: update mechanism to set master port offset1" 2020-10-25 07:34:21 -07:00
Vatsal Bucha
5fe4a509cc soc: swr-mstr: Enable device wakeup only for tx macro
At bootup device wakeup enable is called for all masters
causing issue for wsa on lahaina. This is because wsa
supports interrupts on lahaina. Thus enable device wakeup
only for tx master.

Change-Id: Ia53df31427e54d5fd981cd650e1b0f06cb2d47b5
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-10-22 13:32:08 +05:30
Vignesh Kulothungan
9d8d55d947 soc: update mechanism to set master port offset1
When multiple slave ports are configured to a single master port,
the offset1 of master is the minimum of all slave port's offset1.

Change-Id: I102269806048ecf9982489164a7651a2cdd0661c
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-10-20 11:32:42 -07:00
Laxminath Kasam
212d01f856 asoc: wcd937x: Update slave port config table for BCS
Update slave port config table to avoid overlap
of BCS channel with headset ADC2 channel.

Change-Id: Ib414ac1bcbdf66fd4addc6ca22edb78a61ea7a90
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-10-19 13:40:31 +05:30
Vatsal Bucha
5936ba71aa soc: swr-mstr: Resolve swr overflow, underflow errors for wsa
SWR overflow, underflow interrupts are seen sometimes on bootup.
Check whether devnum is 0 during fifo read and write. Also assign
read and write fifo depth before master init to resolve errors.

Change-Id: Id7b687985e320396d2f9dab69db56cc7f5426b04
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-10-19 12:04:28 +05:30
Vatsal Bucha
760bd4ab46 soc: swr-mstr: Check for fifo avail before bulk write
Check for fifo availability before writing slave registers
during swrm master bulk write so as to prevent swr
overflow, underflow errors.

Change-Id: I97a914cac289b3f1215ccf5c1abec88b959a9f21
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-10-18 12:45:38 +05:30
Vignesh Kulothungan
941b438117 soc: update port config table to handle sva/voip
Update sample interval in 4.8MHZ port config table of soundwire
digital mic slave and TX1 soundwire master port.
Update the block offset of soundwire digital mics 0 and 3 to handle
voip/sva dmic concurrency in both handset and speaker mode.

Change-Id: I85480c3609a72d4be3c4643b0123f09d71b97fef
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-10-12 15:32:37 -07:00
qctecmdr
ef3408efeb Merge "soc: Add ratelimit to supress the pr_err/dev_err." 2020-10-12 10:10:29 -07:00
Prasad Kumpatla
a07613afcd soc: Add ratelimit to supress the pr_err/dev_err.
Add ratelimit to supress the logs flooding at the
time of SSR.In all places defined ratelimit as,
in 1sec one debug msg prints.

Change-Id: I6dfe140848e5cecb1b311c432f8311cdf0615a58
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2020-10-07 10:21:42 +05:30
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
qctecmdr
caf52994ef Merge "soc: remove error log in lpi gpio write" 2020-09-23 22:09:43 -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
Vignesh Kulothungan
26542e0764 soc: remove error log in lpi gpio write
When sound wire master suspend is called, it holds the mutex lock
and does lpi_gpio_write, which gets preempted during pr_err_ratelimited.
Any other calls to master suspend will be blocked waiting for the above
mutex lock resulting in timeouts.
Remove pr_err_ratelimited log when device is down.

Change-Id: I148263ddbb89d436b0ce27bdc4519f196d90679a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-09-17 11:57:51 -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
qctecmdr
994eb4e818 Merge "ASOC: fix audio machine driver compile issue" 2020-09-03 18:06:23 -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
8c5b6cac7e Merge "soc: swr-slave: update swr config for SWR DMIC" 2020-09-03 18:06:22 -07:00
qctecmdr
3c36eede88 Merge "dsp/ipc: update kbuild and header files for gvm bringup" 2020-09-03 18:06:22 -07:00
qctecmdr
c0411d8c3a Merge "soc: soundwire: support 600KHz bus clock scaling" 2020-09-01 18:11:51 -07:00
Guodong Hu
6d6529a694 dsp/ipc: update kbuild and header files for gvm bringup
Update Kbuild and header files in msm_audio_ion_vm.c
and apr_vm.c for kernel 5.4 gvm audio bring up.

Change-Id: I6bcd0e49f783aaec43a64ad308b817a474b30dc7
Signed-off-by: Guodong Hu <guodhu@codeaurora.org>
2020-09-01 00:47: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
Fei Tong
111a594520 ASOC: fix audio machine driver compile issue
LV Platform use the same ARCH cause Kbuild mismatch issue

Change-Id: I803aeb3bbee45566b1f9e66b4a6c8b8c26ba86f3
Signed-off-by: Fei Tong <ftong@codeaurora.org>
2020-08-31 14:48:19 +08:00
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
9c206a0ce5 Merge "soc: update sample offset's for 4.8MHZ usecases" 2020-08-25 11:21:18 -07: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
Meng Wang
5dfbf073be soc: swr-slave: update swr config for SWR DMIC
Update soundwire slave config for SWR DMIC QMIC recording.

Change-Id: I988c022cbb019bd6718cd7fbed46b1ccbcf97c5d
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-08-21 14:55:54 +08:00
Vignesh Kulothungan
dab0a7d24c soc: update sample offset's for 4.8MHZ usecases
Update sample offset's of sound wire digital mics when running
at 4.8 MHZ. This affects single and dual mic usecases.

Change-Id: Id33635debd0444fa93d183dacd8d6419b23394fd
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-08-20 22:27:54 -07: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
2711643ba7 Merge "soc: soundwire: add slave frame config for receiver mic" 2020-08-17 02:47:31 -07:00
qctecmdr
d9f2992429 Merge "soc: soundwire: support multi soundwire devices configuration" 2020-08-17 01:44:20 -07:00