Commit Graph

58 Commits

Author SHA1 Message Date
Laxminath Kasam
51ed7e13d7 asoc: wsa883x: release supplies when device probe error
During device probe error, ensure release supplies
as part of cleanup resources before exit.

Change-Id: Iaf173863d34de3d2151d5fa3c99cf65421e4d2f8
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2021-03-05 10:30:04 +05:30
Sudheer Papothi
9f2aca3bfc ASoC: wsa883x: Update the handle for event notification
Update the parent handle for event notification to receive
event notification from digital codec.

Change-Id: Ia67814eee4e0a4703c2fde6db7942757bcc2ba2d
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2021-02-11 15:38:55 -08:00
Sudheer Papothi
5c8376d255 ASoC: wsa883x: Add support for second instance of WSA
Add support for second instance of WSA speaker amplifier.

Change-Id: Ia0a19d86f2fdc7a4b3b42812ccba23bbf05bd6b4
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2021-02-08 10:39:46 +05:30
Sudheer Papothi
cf74ac1365 ASoC: wsa883x: Add new variant in WSA codec driver
Add new variant in WSA codec driver.

Change-Id: I9053aa58cb1ea1cd73f5283faaa09ca33c0c5d9f
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2021-01-07 11:00:55 +05:30
Laxminath Kasam
9526176960 asoc: wsa883x: Update comp offset code via mixer ctl
Update mixer ctl to control comp offset code.

Change-Id: I7d9611067e5abff898e9d7a4628c8f3987dc3fa9
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-12-18 14:06:47 +05:30
Jyotirmoi Sarma
a3d8911945 audio-kernel: asoc : Upgrade asoc to support 5.10 kernel
Change-Id: Ia54112cfbde418d66b9314d4ba731928aa057558
Signed-off-by: Jyotirmoi Sarma <jyosarma@codeaurora.org>
2020-12-08 08:49:44 -08:00
Vatsal Bucha
625753df87 ASoC: codec: Change name for enum defined for callback between wcd and bolero
Add enum names defined for callback between wcd and bolero in
separate file and include that file in order to have same enum
across wcd and bolero.

Change-Id: I808c2ad3de37655c1ba2b8e096def60703ced7f2
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-09-09 20:26:36 -07:00
Sudheer Papothi
5701487d16 ASoC: wsa883x: Update hardware sequence for WSA883x codec
Update hardware sequence for WSA883x codec as per hardware
requirements.

Change-Id: I1e7b8bf28bca8f07f548db89a31e8a63a5282482
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-08-28 11:18:31 +05:30
qctecmdr
be8dfac3bf Merge "ASoC: wsa883x: enable vbat adc filter" 2020-08-24 20:25:19 -07:00
qctecmdr
db001f9b98 Merge "asoc: wsa883x: remove default value setting for WSA883X_OVERRIDE2" 2020-08-24 20:25:19 -07:00
Vignesh Kulothungan
4b36a5da7b ASoC: wsa883x: enable vbat adc filter
Enable vbat adc filter inorder to read vbat and
temperature values for cps speaker protection.

Change-Id: I31c50bdd6ed0becae355600ba3cf48e761406d87
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-08-17 11:23:21 -07:00
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
Vignesh Kulothungan
912fd67d6c ASoC: wsa883x: add function to get swr device number
Add a function in wsa883x which returns the sound wire
device number for a given wsa883x codec slave instance.

Change-Id: Ie3d0e309870f488b1643a853bcddcf93314d94b5
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-08-07 11:37:27 -07: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