Commit graph

149 Commits

Autor SHA1 Nachricht Datum
qctecmdr
8a3a2be86e Merge "asoc: wcd: add NULL pointer check for wcd component" 2022-11-22 07:28:44 -08:00
Meng Wang
bae0770e2b asoc: wcd938x: add more ADC volume support
ADC volume can support upto 27 different gain.
Current driver only supports 20. Make this change
to add more ADC volume support.

Change-Id: Ia315e15465affd5430d36637efb0cf3a12bb7b7e
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
2022-11-02 02:54:26 -07:00
Yuhui Zhao
c9ec60ea62 asoc: wcd: add NULL pointer check for wcd component
add NULL pointer check for wcd component.

Change-Id: Icfba04b689ace34f8f82b3ee58dd79ce139861b5
Signed-off-by: Yuhui Zhao <quic_yuhuzhao@quicinc.com>
2022-10-27 22:25:04 -07:00
Yuhui Zhao
1dacaf014f audio-kernel: Compilation fixes with "Break" and "fallthrough"
Compilation fixes with "Break" and "fallthrough".

Change-Id: Ica05d0410efc5e9dc52addcf4cd8c0253f49fada
2022-10-06 22:40:29 -07:00
qctecmdr
3211af5e43 Merge "asoc: codec: add sufficient delay to enumerate wcd tx slave" 2022-09-13 02:03:24 -07:00
Prasad Kumpatla
683015da66 asoc: wcd938x: add flags to update the digital clk b/w HPHL and EAR
add flags to avoid race conditions in on/off for digital clock ctl HPHL and EAR path.

Change-Id: I4b4fee2e90d8e1024176fdf5b36f89d219431300
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-09-09 03:30:00 -07:00
Prasad Kumpatla
0da1f0114e asoc: codec: add sufficient delay to enumerate wcd tx slave
add sufficient delay to enumerate wcd tx slave at the time of
SSR/PDR.

Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-09-08 10:52:55 -07:00
Phani Kumar Uppalapati
52ca984e68 asoc: use BIAS_LEVEL_OFF for LPM trigger
Use BIAS_LEVEL_OFF trigger from ASoC to mark the wcd/wsa power
supplies to LPM (if supported).

Change-Id: I9afdd255ecb385176de82813ed9a638adfdf0292
Signed-off-by: Uppalapati, Phani Kumar <quic_phaniu@quicinc.com>
2022-07-15 15:50:14 -07:00
Prasad Kumpatla
ed84f5abe1 asoc: wcd938x: add ear pa gain kcontrol for wcd9385
add ear pa gain kcontrol for wcd9385.

Change-Id: I3ead7a76598d6cdee6223807c1720b6c66edbf71
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-06-14 11:22:01 -07: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
Matthew Rice
a0a83d7e42 asoc: Update SWR Port Types for Kalama chipset
Add PBR, CPS port types and port parameters for WSA
Update RX and TX port types to include full list of ports

Change-Id: I5b69ee777addebcf4167dccd4ce4ab0af31b754d
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
2021-12-09 08:54:57 -08:00
Meng Wang
f48ad4780a asoc: wcd938x: update logic to close BCS correctly
For SVA usecase, BCS is not needed. For other usecase,
BCS is enabled. When voicecall and SVA are running
concurrently and do device switch between headset-mic
and handset-mic, BCS SWR port may not get closed when
teardown headset-mic. When closing ADC2, check BCS_STATUS_MASK
only and remove check for bcs_disabled flag to make sure
BCS SWR port is closed.

Change-Id: I01b1cadc0143a4f46eb6a04c3fc8a2509aa13ec3
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
2021-11-24 03:47:53 -08:00
sarath varma ganapathiraju
2db2fd8857 asoc: codec: wcd938x: Get swr device number
add wcd938x_codec_get_dev_num to return
swr device number

Change-Id: I45f4324645643b4edc6182cee508ce1e647c3612
signed-off-by: sarath varma ganapahiraju <ganavarm@codeaurora.org>
2021-09-15 22:19:33 -07:00
Meng Wang
06e614b09f asoc: move some kernel headers to vendor SI
Move some audio kernel headers to vendor SI.

Change-Id: I41df0cdb2789359e1fded84ec0bf6c30eaa4a25f
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-03-24 14:10:02 +08: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
Vatsal Bucha
77ac79f6c7 asoc: codec: add range check to avoid overflow
Add range check for ucontrol value to avoid array
overflow.

Change-Id: I7b699519bec6f605e5ca5ece8f67badbefc7a094
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2021-03-15 21:53:06 -07:00
Laxminath Kasam
7962130af8 audio-kernel: Fix compile error on wcd
Fix compile error on wcd codec.

Change-Id: I65a3db216234ab798f8a85dd2401ac605b09f7f0
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-12-22 13:21:44 +05:30
Laxminath Kasam
6a7bb13614 soc: swr-mstr-ctrl: Update SWR_TX to receive port params from slave
Update swr_tx slave port config to use slave provided port params
and remove slave port static tables.

Change-Id: Icfedf1229a88432e80c2294e13f2ccc3949417c5
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-12-18 14:40:06 +05:30
Vatsal Bucha
1469dc6bf6 ASoC: wcd938x: Enable micbias in pull up mode for VA AMIC
VA AMIC requires micbias to be enabled in pullup
mode. Pullup mode for micbias is required for SVA usecase.

Change-Id: Ied71147bc813cee2ad95b0c8b342788b9c0ba10b
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-12-16 21:07:13 -08:00
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
Phani Kumar Uppalapati
b15db3b6c8 Merge commit 'd9fa9d435ba1b92cf0f0361a0749107b7abc45a5' into audio-kernel-5-4.lnx.1.0
Change-Id: Iaf98532030ee4ef5fe6a70df083a685733dd5670
2020-11-05 19:15:07 -08:00
Linux Build Service Account
8c6f982167 Merge "asoc : Fix for 384k clips on headphones" into audio-kernel-5-4.lnx.1.0 2020-10-29 15:40:22 -07:00
Aditya Mohan
8301940a18 asoc : Fix for 384k clips on headphones
hw_refine failing for clips of sample rate
384000 as codec is configured to support 192000
sample rate as max. Due to this playback is not
happpening over headphones.

Change the max to 384000.

Change-Id: I2f9cad3bc708f3e4cc8cd38eb2ef2a98ec640f57
2020-10-15 10:40:08 +05:30
qctecmdr
ddba57b58c Merge "asoc: wcd938x: move 500ms after dev_up sets to true" 2020-10-07 01:58:57 -07:00
Meng Wang
62cbd21506 asoc: wcd938x: move 500ms after dev_up sets to true
Trigger SSR during headset recording may cause recording
mute after SSR. Before dev_up is set to true, micbias
enablement for headset detection will return error and micbias
enabled for recording return true. After headset is done,
micbias is disabled. Move 500ms after dev_up to the end to
resolve this issue.

Change-Id: I7b9e094321997d64c96cf0e86a4f447d97b5fdb6
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-10-02 10:29:11 -07:00
Vignesh Kulothungan
dbbb97ce5e ASoC: codecs: add null check before use
Add null check for wcd938x component and wcd938x_priv
before use.
Add array bounds check for slave channel index before
accessing the array.

Change-Id: Ida6b2044f5f9b9a65f4b45d868040af8bd2116eb
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-09-30 11:54:35 -07:00
qctecmdr
69fffecae6 Merge "ASoC: wcd938x: clear digital CDC analog CLK bit 0x08" 2020-09-27 03:10:55 -07:00
Vignesh Kulothungan
a77e386d54 Revert "ASoC: codecs: handle device disconnect during SSR"
This reverts commit 75f229237a.

Change-Id: Ie37d6ac80a3f86df50cdaab65dfd51624f7c7517
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-09-18 13:15:07 -07:00
Xiaoyu Ye
0cdc710d1d ASoC: wcd938x: clear digital CDC analog CLK bit 0x08
Update the bit 0x08 of WCD938X_DIGITAL_CDC_ANA_CLK_CTL
to 0 during DAPM post PMD.

Change-Id: Iea7d3878e9c56f8e219240007b8dbe30683d3161
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2020-09-16 22:12:13 -07: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
e2abf6fc7a ASoC: wcd938x: Update the soundwire clock rate based on the tx paths
Update the soundwire clock rate based on the number of TX paths enable
to avoid noise issue.

Change-Id: I8c73bfd73751d4b79de30f3347081929501a877e
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-08-13 12:06:52 +05:30
Laxminath Kasam
214f88cc12 asoc: wcd938x: Update SWR clock rate based on modes
Update SWR clock rate based on active ADC modes
for concurrency during powerup and teardown.

Change-Id: I610aa205a857a5fac2163a248de4800f3c8042f7
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-08-11 08:54:31 +08:00
Meng Wang
94bb2f8fb6 asoc: wcd938x: reverse datapath_control and connect_port for teardown
swr_slvdev_datapath_control should be called after
wcd938x_tx_connect_port to cleanup disconnected ports.

Change-Id: I53e6e9140ed0be5a0a0704358e3e7f600ab62863
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-07-28 09:36:55 +08:00
qctecmdr
52c21204de Merge "ASoC: wcd938x: Reduce glitch during headset record" 2020-07-10 01:59:34 -07:00
Vignesh Kulothungan
b50df74ac4 ASoC: update swr dmic device down mechanism
Add notification from wcd938x to sound wire dmics
during SSR. Remove device down from dev ops to avoid
deadlock scenarios.

Change-Id: Ifdcbebb748c10deb89ad51ada1a8ce1cf33f2462
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-07-07 15:11:51 -07:00
qctecmdr
5a6876340c Merge "ASoC: codecs: handle device disconnect during SSR" 2020-06-29 11:21:31 -07:00
qctecmdr
dc40c1136d Merge "asoc: wcd938x: Add WCD ADC Mode mask to control modes" 2020-06-19 23:23:56 -07:00
Vatsal Bucha
a1f8374cf5 ASoC: wcd938x: Reduce glitch during headset record
Enable ADC Mode and tx channel cfg as part of enable_adc.
This should be enabled before enabling bolero dec so as
to reduce glitch or saturation for headset.

Change-Id: I94045d0c3b7b96744afb9e6a9a3eecf0abc5a55f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-06-19 08:56:07 +05:30
Vignesh Kulothungan
75f229237a ASoC: codecs: handle device disconnect during SSR
During SSR, when usbc analog device is disconnected, the
respective disconnect interrupt is not handled and hence userspace
is not notified. When ADSP recovers, fsa driver sends a disconnect
notification. So handle device disconnect and notify jack/userspace
through this notification.

Change-Id: Ic695c2267c9289f9528d50202938ec09f634de8a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-06-17 23:07:21 -07:00
qctecmdr
6b6cf2666c Merge "asoc: codecs: retry for soundwire slave enumeration" 2020-06-16 20:17:02 -07:00
qctecmdr
28a89ca1bd Merge "wcd938x: add dummy widgets to codec inputs/output" 2020-06-16 20:17:02 -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
c250412b5d Merge "ASoC: wcd938x: Add dapm ignore suspend for DAIs" 2020-06-11 04:15:16 -07:00
Vignesh Kulothungan
4a38ad6bdc wcd938x: add dummy widgets to codec inputs/output
With multicodec approach, codec widgets are added much earlier during sound
card registration than aux codec approach. The connections between bolero and wcd938x
are done via device tree at a later point. DAPM does power checkup for codec widgets
before the codec-codec path is connected. This results in wcd938x dapm inputs/output
to be considered as endpoints, which results in playback/record failure once after
bootup. Hence, add dummy output/input widgets to wcd938x dapm inputs/output which are not
codec endpoints.

Change-Id: I5ab4839e9b76adba24c9254ae56dc784b4448af7
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-06-09 19:03:26 -07:00
Laxminath Kasam
1e558673c6 asoc: wcd938x: Add WCD ADC Mode mask to control modes
To set correct swr clk rate in concurrency,
use WCD ADC modes as status mask bit to confirm
ADC paths active and control set clock rate.

Change-Id: Id3401d6ed59bd617e0751e7c704268346b36dac4
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-06-09 19:39:22 +05:30
Sudheer Papothi
211f4896ce ASoC: wcd938x: Add dapm ignore suspend for DAIs
Add dapm ignore suspend for playback and capture DAIs to
avoid wakeup during power collapse.

Change-Id: If023597542423253a565dcf0f13ee9f08b357b93
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-06-05 10:29:32 +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
1164aa6f4a Merge "asoc: wcd938x: adjust swr sequence for wcd mic recording" 2020-05-10 05:35:13 -07:00
qctecmdr
51075bb60c Merge "asoc: codecs: Add delay to eliminate playback pause post SSR on hs" 2020-05-10 05:35:13 -07:00
qctecmdr
bbe7295d17 Merge "asoc: update tx frame config for soundwire port" 2020-05-05 23:55:57 -07:00