Graf commitů

23 Commity

Autor SHA1 Zpráva Datum
Phani Kumar Uppalapati
1104a060e4 swr-haptics: request and release swr device wakeup votes properly
Request and release swr device wakeup votes in PRE/POST PMU and
PRE/POST PMD events to allow system enter low power states.

Change-Id: I8acd648bcc8e11cadda7254d7e5369155d9597c9
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-12-27 16:26:00 +05:30
yuayang
568d8d0822 asoc: audio-kernel: Remove trace_printk
Remove trace_printk point.

Change-Id: I76b53eda77bc41c75e06a885084022d74c248188
Signed-off-by: yuayang <quic_yuayang@quicinc.com>
2023-12-21 16:26:31 +08:00
Fenglin Wu
8d450b9235 asoc: swr-haptics: keep in SWR PLAY_SRC when disabling SWR play
Currently, 0 is written into SWR_PLAY register when disabling SWR play,
it coincidently updates the PLAY_SRC to FIFO mode and disables it. If
there is a FIFO play triggered from SPMI address space, the FIFO play
will be disabled and the FIFO samples will be flushed. To avoid this,
keep in SWR PLAY_SRC when disabling SWR play.

Change-Id: Ib594df57835979a8832f2f7a1954ff36f643f724
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2023-02-05 20:32:06 -08:00
Fenglin Wu
174bcf30d4 asoc: swr-haptics: Handle VMAX_CLAMP notification
Handle VMAX_CLAMP notification which is notified from charger driver
that hBoost is used by the charger firmware and haptics Vmax need to
be clamped to a specific level for the following vibrations.

Change-Id: I3d783467aad71e0d9b31a96120db7e89fd54c5cb
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-04-18 09:19:38 +08:00
Shazmaan Ali
a20e11e0c3 asoc: codecs: Replace dev_err/info with ratelimit prints
replace all dev(pr)_err/info logs
that could potentially flood kernel logs with
ratelimit functions dev_err_ratelimited and
dev_info_ratelimited

Change-Id: I32dc6002dead1a07622978c4de63d541c01982fd
Signed-off-by: Shazmaan Ali <quic_shazmaan@quicinc.com>
2022-04-13 12:43:20 -07:00
Phani Kumar Uppalapati
f5d67429ea swr-haptics: Add new compatible string for Kalama target
Add new pmic soundwire haptics compatible string for
Kalama target.

Change-Id: I7c3f85b90176633fb0117577fd97193d929f6452
2022-02-16 13:09:42 -08:00
Fenglin Wu
0538dab88c asoc: swr-haptics: Toggle swr-slave-vdd supply for SSR recovery
After ADSP SSR happened, toggle swr_slave_vdd before play to reset
haptics HW so that it can function properly.

Change-Id: I48bc07c923d1af2041c6c156c699e329084f0d34
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2021-05-13 06:50:19 -07:00
Fenglin Wu
7d939baa46 asoc: swr-haptics: add non-HBoost regulator support
Haptics module is supplied by HBoost regulator by default, it requests
voltage to HBoost regulator through hardware channel. Haptics module
can also be configured to use other regulator device, in this case, it
requires software to request the voltage from the regulator before
enabling the play. Add support for this.

Change-Id: I4a8305ff2732a92bc8be90bd3ed197fa643a101e
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2021-05-13 04:16:27 -07:00
Fenglin Wu
e3c6149759 asoc: codec: swr-haptics: update slave-vdd regulator control logic
Update the slave-vdd regulator control logic to avoid unbalanced
regulator_enable() regulator_disable() calls. Meanwhile, correct
the jump label when bailing out from soundwire enumeration failure.
This helps to avoid the regulator_put() call in the device remove
process throwing a warning for a dangling regulator enable status.

Change-Id: I89157f5f9177db69bbbf6aedcc8e605c43a7584e
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2021-05-08 08:55:44 -07:00
Meng Wang
e56e235d73 asoc: swr-haptics: add control to set VMAX
Add control to set VMAX to adjust different vibrator
setting from userspace.

Change-Id: I7300e4f0ae57e403c8fc79db38598946289effb6
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-02-05 09:19:28 +08:00
Sudheer Papothi
90ef3db429 ASoC: swr-haptics: Remove disable regulator during system suspend
Remove disable regulator during system suspend to avoid soundwire
interrupt during system suspend. This change will ensure that
device enter into power collapse during VoLTE usecase in LPI mode.

Change-Id: Ie15d28de9720b83f93ea1a85258b24faadad0db3
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-07-19 22:10:00 -07:00
Sudheer Papothi
b3fa5a0dc5 asoc: codecs: retry for soundwire slave enumeration
Retry for soundwire slave enumeration during bootup before
EPROBE_DEFER to avoid soundcard enumeration failures.

Change-Id: I083ec76fc84a2b367f93a2dc166a1419a75ff8b4
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-06-11 21:40:46 +05:30
qctecmdr
261249d3f4 Merge "ASoC: swr-haptics: Avoid soundwire resume during subsystem restart" 2020-06-05 01:54:02 -07:00
Sudheer Papothi
a151ba4e13 ASoC: swr-haptics: Avoid soundwire resume during subsystem restart
Soundwire register write from haptics resumes soundwire master during
subsystem down. Avoid soundwire slave register writes when the subsystem
is already down.

Change-Id: I78304b84bfaf882df1b76dbd04a8e063185d3963
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-05-28 03:30:50 +05:30
Fenglin Wu
84d85e958f asoc: swr-haptics: close SWR data channel after stoping playing
Per HW recommendation, when stopping SWR playing, SWR_PLAY register need
to get deasserted before disconnecting SWR data channel. Hence adjust the
sequence.

Change-Id: I15f33fefc8b847c9a7f6abd627217f21f8ddee89
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2020-05-19 15:50:00 +08:00
qctecmdr
dfbf3ea4bd Merge "ASoC: swr-haptics: Cleanup on the error printings" 2020-05-05 23:55:58 -07:00
qctecmdr
5c661788c7 Merge "ASoC: swr-haptics: Update the configuration and gain settings" 2020-04-29 22:27:54 -07:00
Fenglin Wu
47fa139a5a ASoC: swr-haptics: Cleanup on the error printings
Some prints in the driver have NULL pointer reference, correct them and
clean up on the other possible NULL pointer reference cases.

Change-Id: Iba8682014e21dd716caaaebc1231cb4fe39bdfe1
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2020-04-28 11:07:57 +08:00
qctecmdr
0fa13e4ada Merge "asoc: haptics: update port config to match devicetree" 2020-04-26 23:42:49 -07:00
Sudheer Papothi
5e450b198c ASoC: swr-haptics: Update the configuration and gain settings
Update the configuration and gain settings as per hardware
sequence recommendation for soundwire haptics usecase.

Change-Id: I09b86026f664fec3105af4a8180168fda457d4fd
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-04-21 11:18:54 +05:30
Sudheer Papothi
caee8e2f5a ASoC: swr-haptics: Update playback sequence
Update haptics playback sequence to properly disable the soundwire
ports during the teardown path.

Change-Id: Ic6f23c8dae172104f8ae4659293b5ec6ce4ffa1f
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-04-10 02:27:26 +05:30
Meng Wang
5aaab79a9f asoc: haptics: update port config to match devicetree
Update port config to match devicetree setting

Change-Id: I094ec86d7f5dca70964315cc1ab258cda086ac7b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-03-31 20:38:54 +08:00
Fenglin Wu
074c5fe49c asoc: codec: Add initial driver for swr-haptics
The haptics module in some PMICs has SWR slave data port which connects
to Bolero SWR RX port and it can receive PCM data from that port and use
it as the pattern source to play the vibration. Add the driver to
support it.

Change-Id: I5e6811ac8d81a60c3cd226029ef22ee12ed46f1d
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2020-03-20 15:34:33 +08:00