Commit Graph

79 Commitit

Tekijä SHA1 Viesti Päivämäärä
Vangala, Amarnath
eac0cbb3ae asoc: codecs: wsa883x: remove handling for pre ssr event
Remove handling for PRE_SSR event and move gpio handling
 to SSR_UP event.

Change-Id: Ia4dd87bdcf2f21376fa84e0f447d978ae222e816
Signed-off-by: Vangala, Amarnath <quic_avangala@quicinc.com>
2023-09-25 01:38:39 -07:00
Ganapathiraju Sarath Varma
7f605534e2 asoc: wsa88XX: Enable/Disable swr ports based on setbit.
During some concurrencies even though we are not
enabling the swrm port, we are trying to disable it.
which causes problem w.r.t clock disablement,
To avoid that we are updating the set bit only
when port is enabled, based on that bit we are taking
decision to disable or enable the port.

Change-Id: I6707c56c40dd3716917edc097c4b7bcad68261fd
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
2023-04-04 22:20:42 +05:30
Phani Kumar Uppalapati
dbc14a1d20 ASoC: kalama: Add support for WSA883X speaker amp
Add support for WSA883X speaker amp on kalama platform.

Change-Id: I922b5aeaf264ae9b430f20e83ec99e3ced509dcc
2022-04-16 09:03:18 -07:00
Phani Kumar Uppalapati
cd3f734089 asoc: wsa883x: add slave_irq for wsa883x
Interrupt from wsa883x are not handled as slave_irq is not set.
Add slave_irq for wsa883x to address this issue.
(cherry-picked from commit ddfc43e7c48dcbe9bbae45b5caacdd5bca441800)

Change-Id: I6b56aa88cca895e4e0e5871a7478f6859d45b03f
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2022-03-31 19:13:06 -07:00
Phani Kumar Uppalapati
2f03655808 asoc: wsa883x: update irq_drv_data per wsa device
regmap_irq_chip->irq_drv_data is shared by all attached wsa
devices and point to last probbed wsa device. This will cause
interrupt handle issue. Update irq_drv_data per wsa deviece to
resolve this issue.
(cherry-picked from commit 1852682fbcebfb9f479c3d09a91c075049b90253)

Change-Id: I6ac0520a4074d74dfb28122e06eed6a86374c0ce
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2022-03-31 19:12:51 -07:00
Phani Kumar Uppalapati
cace0a8255 ASoC: wsa883x: Handle PA_ERR interrupt on WSA speaker
PA_ERR can happen during speaker path setup. Log the
error status in the interrupt handler and clear the error
status for next audio playback to resume properly on
the speaker.

Change-Id: I0490d4cdd6379ed779ce7f54ec8b56d5a7af0649
Signed-off-by: Phani Kumar Uppalapati<quic_phaniu@quicinc.com>
2022-03-31 19:12:33 -07:00
Kunlei Zhang
d007a64c4b asoc: codecs: update WSA dapm_ignore_suspend pin names
Update to 5.15 kernel dapm api.
Pin name no longer needs prefix as it is added in API.

Change-Id: Ibf967dd01a36decdf904eff9d5af2e315aa53f1c
Signed-off-by: Kunlei Zhang <quic_kunleiz@quicinc.com>
2022-03-31 19:12:14 -07:00
Meng Wang
2a7c4c286e ASoC: wsa883x: Enable all WSA interrupts
Only UVLO_irq, PA_ON_ERR_IRQ and PDM_WD_IRQ are enabled
on wsa883x. Enable all other IRQs to monitor if WSA is in
bad state.

Change-Id: Ia78f12520eda4b26c00776583a78b14b74771e0e
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
2022-03-31 19:11:51 -07:00
Meng Wang
b19ddc0ca2 asoc: wsa883x: update default value for VBAT_ATTN
With current setting for VBAT_ATTN1/2/3, pop is heard when
battery is low. Update default value for these registers
to resolve pop issue.

Change-Id: Ic4002a4b30ecd04b04001ca5f16bac5745a803d7
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
2022-03-31 19:11:37 -07:00
Meng Wang
e13418a3ca asoc: wsa883x: add support for updating analog gain
Add support for updating analog gain.

Change-Id: Icb090a86672d154bb0a8e22ce7fffeccea060604
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2022-03-31 18:51:47 -07:00
Junkai Cai
97e37eeee3 asoc: use ASoC API to set driver component name prefix
during devm_snd_soc_register_card(), the name_prefix can be set
if "sound-name-prefix" is provided in the DT nodes.

The original approach to set prefix would possibly cause ASoC
component probe failed if prefix has not set before probe is called

Change-Id: Ie78d042cda24b7d1d926223d476786e13d965ac7
Signed-off-by: Junkai Cai <quic_junkai@quicinc.com>
2021-12-07 09:53:13 -08:00
Laxminath Kasam
001ba433b2 wsa: soundwire: Add support for 4p8MHz DAC rate
Add support to use 4p8MHz DAC rate for receiver over WSA.

Change-Id: Ia0811670326be8131687fbdff70464da063902b2
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2021-09-15 22:22:09 -07:00
Laxminath Kasam
ae258cb2f8 asoc: wsa883x: Update low_noise gain for receiver
Add changes to use wsa883x for receiver with
low_noise mode settings.

Change-Id: Icfa43ebbdb1e366f365053535f541bee03751ca3
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2021-09-15 22:19:46 -07:00
Sairam Peri 
bdc547ac12 asoc: wsa883x: add support for multiple WSA
This change is to remove the group write so that both the WSA slaves are
updated with the corresponding values for DRE CTL register.

Change-Id: I1f9583ff1ca3988b78896087b2f8e7409e4796fd
Signed-off-by: Sairam Peri <peri@codeaurora.org>
2021-07-06 18:29:05 +05:30
Aditya Mohan
7cc7e513af asoc: CPS mixer control
Add support for getting logical device
number using mixer control required
for CPS

Change-Id: Ia710b8cb5a5a099139b25afedb7723d93468cc6b
2021-05-05 07:22:48 -07:00
Linux Build Service Account
ffb2dac19d Merge "ASoC: codecs: fix a typo of dapm string concatenate" 2021-05-02 22:55:39 -07:00
Linux Build Service Account
03011b6324 Merge "ASoC: update channel map for rx multi codec usecase" 2021-05-02 22:55:39 -07:00
Laxminath Kasam
b5bc4627f2 asoc: wsa883x: Update wsa8832 DRE gain
Reduce WSA8832 SKU DRE gain offset by
1p5dB same as WSA8830

Change-Id: I949bd78e2f4e935e1aba7ce0e2319418562e14ac
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2021-04-29 13:49:31 +05:30
Junkai Cai
6d66c41d46 ASoC: codecs: fix a typo of dapm string concatenate
SWR DAC_PORT string should be defined as SWR DAC_Port
This was causing "ASoC: unknown pin" issue.

Change-Id: I31ce7bf983b3793f8e4ee9702f5df021a89fd389
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
2021-04-26 17:01:39 -07:00
Junkai Cai
647c4b4898 ASoC: added WSA2 support on targets with more than two spkrs
Add wsa2 backend dai links only in platforms
which has 4 wsa speakers.

add 2 to the device index parsed from hardware device id
of wsa slave to match the dai names in the msm_dailink.h

Change-Id: Iffe43842123526f4925f9d5bcd8dff0317bac7a7
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
2021-04-26 13:29:01 -07:00
Junkai Cai
fbfd93a2dc asoc: lpass-cdc: allow register write via debugfs
allow QTI regmap debugfs register writes for debugging purpose
on lpass-cdc, wsa and wcd codecs.

Change-Id: Icdedb8f0a5e198bbb6afecb4b6995cc0d1a35833
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
2021-03-20 21:29:06 -07:00
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