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>
Set correct tx frame config for soundwire port
using wcd9375.
Change-Id: Icbefda65713338908e4d94935296ff30ac4e5f9c
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
Hold_off bit for enabling watchdog will enable mute until
there is a block reset and watchdog bits aren't toggled.
Disable hold_off bit so that wcd is recovered from mute
instantly once watchdog occurred.
Change-Id: Ia87593ead05dde4e31a0afefd6ffaca89bb95448
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
SND_SOC_DAPM_MIXER_E widget is powered up before SND_SOC_DAPM_ADC_E
which causes mute on wcd mic recording. Adjust wcd938x_tx_connect_port
and swr_slvdev_datapath_control sequence to fix it.
Change-Id: I3dbfb239dcfbd65102d0d98be40326be71cf8479
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Mute is observed in amic record sometimes in concurrency with
sva. This is because if record is over tx0 then digital clk
is not enabled. Enable clk after enabling micbias to resolve mute.
Change-Id: Iba3aa4fade0ac5889218eaee2c5d2c4bd4431d50
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Enable compander based on mixer ctl set for ear path.
Change-Id: Ie6287469f1baa9dba239d369bd5a29ed8e44522f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Headset is corrected as lineout during SSR/PDR. This is
because adc voltage is not measured correctly due to SSR state.
Enable flag deinit_in_progress during SSR down to check if
device is not reported and disable it after device up.
Change-Id: I6fc4fff4149c36ba16aa668a960505504a5d811f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Ear Path is not disabled properly disabled at power down.
Disable clk and other registers depending on whether ear
takes aux or hph path at pwd.
Change-Id: I987904ddd9bf21b9ed96e754e6eb2514b4d277ce
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Add new codec dai for wcd938x, since WCD is
no longer initialized as an aux device but as a codec.
Change-Id: I1cb60ef3ef71692970011ef6c3b50cf9cd64b7ca
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
Different ADC modes need different clock rate. Update clock rate
based on the ADC mode.
Change-Id: Idaeda95a15e99038927de115727ece897bba7c29
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Add micbias control API to enable SWR DMICs on lahaina target.
Change-Id: I48152971e1af8dedc98ada20e4e808cf18720869
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
While enabling headphone PA, bypass preref filter
to resolve clipping issue in the first second.
Change-Id: I7524fe3215bac267c5e199c715931712e16adf88
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add dynamic port enablement for wcd938x and
wcd937x targets to support unified swr tx port
mapping added as part of SWR 1.6 updates.
Change-Id: If0cf823dc51028fd5bd95f5a49ffe05998526be6
Signed-off-by: Ramlal Karra <rkarra@codeaurora.org>
Add widgets to enable mic bias standlaone without
dependency on any use case.
Change-Id: I1f61cd9403d3f83baa199f9c669680d9c7b5c371
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Update snd info API and userspace and get codec info.
Change-Id: Ic9cfc89365cf6263a9b1c02403d68e7740bebbeb
Signed-off-by: Meng Wang <mengw@codeaurora.org>
During SSR, sometimes swr get logical addr fails.
Add sufficient delay after reset and retry logic
for get logical addr.
Change-Id: I2a932e99896e0055f3b35f9b251008612f43b79f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
ADC mode for tx 0,1,2,3 is not disabled at power down after record
causing noise during next headset record. Disable ADC mode
to resolve noise.
Change-Id: I0a98b06318b55cfce20c6a90fecd71d83dce28c5
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Audio is distorted during first 3 secs on headset record
while doing device switch from dmic to headset mic.
Disable BCS before slow insertion detection and enable it
afterwards to resolve the issue.
Change-Id: Ie5bc4b5292e5f69066760cab44d78989a74f13f4
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Add support for setting EAR PA gain directly using
mixer control.
Change-Id: I3667d8f26dc648e44d12c42be0940210763e08d5
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
During SSR, codec device will be down and wait till
receiving up notification before doing any register
reads or writes.
Change-Id: I0e2967990bfc9d0d780d4c7e666a4c31159e70ce
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>