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>
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>
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>
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>
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>
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>
Add range check for ucontrol value to avoid array
overflow.
Change-Id: I7b699519bec6f605e5ca5ece8f67badbefc7a094
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
On lagoon, vdd-buck need to be dynamic supply.
Add required support to handle buck as dynamic supply.
Change-Id: If6c27fffe0d0c44f178e61a6eae6ef63775c8988
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add delay in post ssr to eliminate playback pause on euro headset.On
post ssr hs detected as hp due to where pa become on before the completion
of wcd_correct_swch_plug workqueue which lead to detect plug_type
as hp.
Change-Id: Ie114fcd0458d9f5edebeee087c90600c3b0c3da2
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>