Commit Graph

46 Commits

Author SHA1 Message Date
Meng Wang
9ebe2c724a asoc: wsa883x: remove default value setting for WSA883X_OVERRIDE2
Updating WSA883X_OVERRIDE2 default value to 0x02 breaks
speaker protection. Revert the default value update.

Change-Id: I064157a718d87b2903c10dc78e0ce99ce400b6d8
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-08-17 09:21:45 +08:00
qctecmdr
8b28c314d0 Merge "ASoC: wsa883x: Update register sequence to reduce CnP" 2020-08-05 09:48:32 -07:00
Sudheer Papothi
ea214d5c91 ASoC: wsa883x: Update register sequence to reduce CnP
Update register sequence of WSA883x codec to reduce CnP
during bringup and teardown of speaker path.

Change-Id: I348a55e1324b5c26a36b8d7c78edf52a66e40381
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-07-28 23:10:01 -07:00
Vignesh Kulothungan
91ba27cac5 ASoC: add null check for component prefix
Check if component prefix is set before use.
Add component prefix for dai widgets before calling
ignore suspend.

Change-Id: Ifa0c727bf46af661cd19b6018bfc25af9a7e3753
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-07-24 09:10:16 -07:00
qctecmdr
058ea89695 Merge "asoc: wsa883x: Add dapm ignore suspend for DAIs" 2020-07-24 00:05:32 -07:00
Meng Wang
fc37483e72 asoc: wsa883x: Add dapm ignore suspend for DAIs
Add dapm ignore suspend for playback DAIs to avoid
widget down  during suspend.

Change-Id: I64347f9cb9d425096c5710e802805388adecd68f
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-07-21 08:05:00 +08:00
Laxminath Kasam
30bfce1749 soc: wsa883x: Update the PDM_WD at startup/teardown
Update PDM_WD bit only at startup and teardown of
speaker playback.

Change-Id: If385c0f4d99b7f5aa4ccd8b1ee94c4afa6754518
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-07-10 18:07:48 +05:30
Laxminath Kasam
d8d90b4afa soc: wsa: Fix adie loopback test
In ADIE loopback, need PA enable to
avoid mute. Ensure PA enable post slave
path setup and FS clock.

Change-Id: I4df9d7b919325b50f237f31338859e1b5b34b2eb
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-07-10 18:02:56 +05:30
qctecmdr
5e475581e8 Merge "ASoC: wsa883x: Avoid temperature read during playback" 2020-06-16 20:17:02 -07:00
qctecmdr
17b9010fb5 Merge "ASoC: wsa883x: Update interrupt handling on WSA883x driver" 2020-06-11 04:15:16 -07:00
Sudheer Papothi
aea784377c ASoC: wsa883x: Avoid temperature read during playback
Avoid reading temperature during playback usecase.

Change-Id: If471e19ea0ca5856d17f694ce084145d7132e365
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-06-10 00:34:55 +05:30
Prasad Kumpatla
d173af6770 asoc: codecs: Fix out of bounds access in register show function
In register show function, when snprintf returns a negative value
out of bounds access occurs while copying the data to user.
Add return value check on snprintf before copy_to_user
to fix this and add sizeof() for tmp_buff to avoid buffer
overflow.

Change-Id: I15f1add37987d2176a165669d7a5b40bd576004c
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2020-06-05 06:40:55 -07:00
Sudheer Papothi
3764c5231a ASoC: wsa883x: Update interrupt handling on WSA883x driver
Update interrupt handling on WSA883x driver to avoid fake
interrupts during power collapse.

Change-Id: I3128e2c2d9bf84f90f472a03d2b23ca1d3b70838
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-06-05 10:02:20 +05:30
Laxminath Kasam
ec8a0b507c asoc: codecs: Update LPM voting support in codec supplies
For power saving during RBSC, need to vote for minimum
or zero current on load for respective regulator to
enter LPM mode. Add required support from audio WCD/WSA
to vote accordingly during suspend/resume.

Change-Id: I578195b84ba18a0b69dde3b93a3f6461efa85f7f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-05-26 14:22:15 +05:30
qctecmdr
4bef843da5 Merge "asoc: wsa883x: Update init values of VAGC" 2020-05-14 22:04:37 -07:00
qctecmdr
763894acd7 Merge "asoc: codecs: check the spkr status before access the wsa registers" 2020-05-14 22:04:36 -07:00
Prasad Kumpatla
521ea726c2 asoc: codecs: check the spkr status before access the wsa registers
Before access the wsa register check the spkr status bit in
power-down sequence.

Change-Id: I5e07ee56e17701275784fd4c413bc214c5893989
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2020-05-12 22:56:32 -07:00
Laxminath Kasam
8250aa6bfe soc: wsa883x: Update changes for wsa8830
Update DRE_CTL offset to 3 for wsa8830 variant.

Change-Id: I9acab01b0099093b8e427d52e48ba9744c6f5aac
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-05-12 20:42:26 -07:00
qctecmdr
4e225c6408 Merge "Revert "ASoC: wsa883x: Add support for VBAT monitor"" 2020-05-10 05:35:12 -07:00
Laxminath Kasam
993e8e8f34 asoc: wsa883x: Update init values of VAGC
Update current limit and VAGC settings to
limit the current drawn at chipset causing
target reset.

Change-Id: I8cc1c91d45f1e27c236c00b5b0f851502f69d82c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-05-06 19:05:58 -07:00
qctecmdr
f577bd0be4 Merge "ASoC: wsa883x: Check for dereference before access" 2020-04-29 22:27:54 -07:00
Sudheer Papothi
80ef65d015 Revert "ASoC: wsa883x: Add support for VBAT monitor"
This reverts commit eecf60dcb5.

Change-Id: Id5cd06a70aab59e0bbd83985526078572d126457
2020-04-29 11:53:16 +05:30
Sudheer Papothi
8e815fed8b ASoC: wsa883x: Check for dereference before access
Check for valid pointer before access in wsa883x driver
to avoid dereference.

Change-Id: I1c7c158063d178b489ea1e71be745ed3ca32fb16
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-04-21 09:45:52 +05:30
Vignesh Kulothungan
575148c5a7 ASoC: codecs: wsa883x: fix swr probe error handling
Remove wsa soundwire device from master device list only during
critical error and not for probe defer.

Change-Id: I5c4f71a4735de4bb459094043d41a6b5c560a6fd
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-04-17 15:31:53 -07:00
Laxminath Kasam
43fd112a6b asoc: wsa883x: Fix SSR mute on speaker
During SSR/PDR, bring down wsa at down
event and restore after SSR up event.

Change-Id: I9a8d3c109144cb0a911cd7597bffc220b0ce95b7
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-04-06 19:39:09 -07:00
qctecmdr
f34687bd3a Merge "ASoC: wsa-macro: Update smart boost sequence for wsa883x" 2020-04-01 00:19:36 -07:00
Sudheer Papothi
40f02da69c ASoC: wsa883x: Update initial register sequence
Update initial regsiter sequence for wsa883x speaker
amplifier as per hardware requirements.

Change-Id: I3cd0458980bdc5140ff81b3b8ba6bab42e72fd49
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-03-27 07:16:54 +05:30
Vignesh Kulothungan
9ffe8f6f21 ASoC: codecs: wsa883x: add codec dai for each wsa883x
Add new codec dai for each wsa883x, since each WSA is
initialized as a codec and not as aux device.

Change-Id: I023c14faffcd1c1149531040ceae9ed1fe161385
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-03-25 17:18:53 -07:00
qctecmdr
b56fbda271 Merge "ASoC: wsa883x: Fix size for register access" 2020-03-25 09:38:22 -07:00
Sudheer Papothi
9fcf966dc8 ASoC: wsa883x: Fix size for register access
Fix size for soundwire slave register dump in debug mode.

Change-Id: I9d2e4a394943cdb0ba2e5ec5208c96b76b0a1292
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-03-20 02:00:23 +05:30
Laxminath Kasam
2aa344da6e SoC: wsa883x: Remove from soundwire group during teardown
After playback on speaker, remove from soundwire group to
properly close the soundwire port configuration.

Change-Id: I278e7510869200bc1236eb45968bc8d986a93a96
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-03-17 12:24:25 +05:30
qctecmdr
70561ef6c1 Merge "ASoC: wsa883x: Update sequence for temperature" 2020-03-11 04:24:57 -07:00
Sudheer Papothi
6f33b8cd3b ASoC: wsa883x: Update speaker playback sequence
Update speaker playback sequence on wsa883x codec to
avoid click and pop and loss of VI sense data on speaker.

Change-Id: I8ec7072b63bef6c2e7bd64c96df4d98852c4f40d
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-03-03 09:43:22 +05:30
Sudheer Papothi
fe702b2f64 ASoC: wsa883x: Update sequence for temperature
Update sequence to enable temperature sensor in wsa883x to
read proper temperature measurement.

Change-Id: I7db16344a92b82539929511bd0de322ed086beb7
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-02-26 17:35:17 -08:00
Sudheer Papothi
8972743568 ASoC: wsa883x: Disable interrupts during bootup
Disable interrupts while bringing codec out of reset to avoid fake
interrupts.

Change-Id: Iec1e6c67429b7424693c2628e6f6d121a4c9ce71
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-02-07 13:16:44 +05:30
Linux Build Service Account
6744f565b2 Merge "ASoC: wsa883x: update supply and variant configuration" into audio-drivers.lnx.5.0 2020-01-10 16:43:42 -08:00
Sudheer Papothi
e8b606b2b9 ASoC: wsa883x: update supply and variant configuration
Update supply and variant configuration for wsa883x speaker amplifer.

Change-Id: Ib3e1ae149cc4b9144229b5e2dfab9bb0cc8dab1c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-01-09 08:07:37 +05:30
Linux Build Service Account
f6b14a755d Merge "ASoC: wsa883x: Add support for VBAT monitor" into audio-drivers.lnx.5.0 2020-01-08 17:20:33 -08:00
Vignesh Kulothungan
46c4e1f885 ASoC: remove unused functions
Remove unused function "wsa883x_regcache_sync" and
"wsa883x_resource_acquire".

Change-Id: Ic4dca68671673141be833926305116d8cd881d89
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-01-07 18:59:41 -08:00
Sudheer Papothi
eecf60dcb5 ASoC: wsa883x: Add support for VBAT monitor
Add support for VBAT monitor on WSA883x speaker amplifier
for signal profiling.

Change-Id: I1544b601ac9ee4e8ed6da3839cc46914bbae5d93
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-01-07 14:39:09 -08:00
Sudheer Papothi
7f9dfd57cc ASoC: wsa883x: Enable WSA883x codec driver
Enable WSA883x codec driver to support WSA883x smart speaker
amplifier.

Change-Id: I0a773459c28ca2afc7232ec33001351152a7249a
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-12-27 11:17:02 -08:00
Meng Wang
4a03bd5171 asoc: update snd info api
Update snd info API and userspace and get codec info.

Change-Id: Ic9cfc89365cf6263a9b1c02403d68e7740bebbeb
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-12-27 11:15:55 -08:00
Sudheer Papothi
a6f808f1c8 ASoC: wsa883x: Add support for subsystem restart
When subsystem restart triggers, reset the wsa883x codec.

Change-Id: I2378281efbd601241b8ea36379db54727896a6e2
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-11-19 17:25:43 +05:30
Sudheer Papothi
edbc522254 ASoC: wsa883x: Add support for interrupt handling and variant
Add support to handle wsa883x codec interrupts and runtime
detection of wsa883x variant.

Change-Id: I06fc113a390c04e890062761cff8ae7436acb662
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-11-19 03:58:54 +05:30
Sudheer Papothi
8e9a0aecdd ASoC: wsa883x: Update dapm path sequence
Update dapm path sequence for speaker amplifier.

Change-Id: Ia5fcd7d4574d990ef42e6b3e16b3ddd81841d4bc
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-10-31 23:49:10 +05:30
Sudheer Papothi
af0a66b78a ASoC: wsa883x: Add support for wsa883x speaker amplifer
WSA883x is a speaker amplifier with soundwire interface and
enumerates as soundwire slave. WSA883x supports audio playback
on speakers and has temperature sensors for better speaker
protection and enhanced boost control support. Add software
driver support to enable WSA883x speaker amplifier.

Change-Id: Ib9cf2eebdda5ce331154bc786f059c5757f34fa2
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-10-11 02:00:27 +05:30