Commit Graph

1163 Commits

Author SHA1 Message Date
Aditya Bavanari
a8cc7390b5 asoc: rouleur: Fix CnP issues in EAR and LO paths
Update the EAR and LO power up and down sequences to
fix CnP issues in rouleur codec.

Change-Id: I7e6d1cc82e9c1358b336c32b1befb7eb1dd9b552
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-07-15 21:49:54 +05:30
Faiz Nabi Kuchay
fb77f24b5a asoc: codecs: Fix mute after SSR issue in rouleur codec
Make dev_up true before giving 500 ms delay in case of AATC
variant during BOLERO_WCD_EVT_SSR_UP event.

Change-Id: Ie8306c92a80df69f087f055d425b22f48f319873
Signed-off-by: Faiz Nabi Kuchay <fkuchay@codeaurora.org>
2020-07-13 05:56:45 -07:00
qctecmdr
a24cf2ea0a Merge "ASoC: bolero: Resolve glitch during amic record" 2020-07-10 01:59:34 -07:00
qctecmdr
52c21204de Merge "ASoC: wcd938x: Reduce glitch during headset record" 2020-07-10 01:59:34 -07:00
qctecmdr
1b53e55fd0 Merge "ASoC: update swr dmic device down mechanism" 2020-07-10 01:59:34 -07:00
qctecmdr
1ef7ff5ddb Merge "ASoC: lahaina: add be dai link for DSD" 2020-07-10 01:59:34 -07:00
qctecmdr
a18ec3d3c8 Merge "asoc: codecs: remove cancel_delayed_work_sync to avoid race condition" 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
Vatsal Bucha
b5449b40d7 ASoC: rouleur-mbhc: Fix aux cable detected as unsupported sometimes
Aux cable is detected as unsupported sometimes due to it being
detected as cross conn. Increase hph cross conn threshold to 350mV
so that it detects fine.

Change-Id: I87e4bd36f80d7cd62e06c76acf9c9d06bb6f148a
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-07-03 19:58:01 -07:00
Vatsal Bucha
39b18cbd38 ASoC: bolero: Resolve glitch during amic record
Glitch is observed during amic record due to improper
sequence being followed. Reduce delay between toggle
of hpf gate to depending on sample rate to resolve glitch.

Change-Id: I8d9810dbc00264662f24532be9338198e6d7316d
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-07-02 20:09:54 -07:00
Prasad Kumpatla
8508b1a103 asoc: codecs: remove cancel_delayed_work_sync to avoid race condition
Remove cancel_delayed_work_sync in swr_down,to avoid race condition
between skr_pa_event POST_PMD and swr_down.we are taking care of
schedule_delayed_work and cancel_delayed_work_sync in PMU and PMD.

Change-Id: I4f43ffc354ec930dabd7c4a8b2382f6064a24653
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2020-07-01 23:25:21 -07:00
Vignesh Kulothungan
b629237a0e ASoC: bolero: add rx_macro_rx5 dai for dsd
Add rx_macro_rx5 dai for native dsd playback support.

Change-Id: I52a47e1d908fddda4c9d1a5546f9a00d6b8a7ba4
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-07-01 12:59:17 -07:00
qctecmdr
c6f14b5027 Merge "Revert "soc: mstr-ctrl: Retain Audio_HM voting until suspend"" 2020-06-29 11:21:31 -07:00
qctecmdr
5a6876340c Merge "ASoC: codecs: handle device disconnect during SSR" 2020-06-29 11:21:31 -07:00
qctecmdr
79f733d947 Merge "ASoC: wcd937x: Add mixer ctl for TX CH power level" 2020-06-29 11:21:30 -07:00
Laxminath Kasam
034cd15ba8 Revert "soc: mstr-ctrl: Retain Audio_HM voting until suspend"
This reverts commit d02c7efb35.
and commit 61f235e5bd to avoid AOP
related issues.

Change-Id: I0b8b44bc5cca6bef6bc18c228f08a9c585c79c1c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-06-22 09:40:14 +05:30
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
5e475581e8 Merge "ASoC: wsa883x: Avoid temperature read during playback" 2020-06-16 20:17:02 -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
Vatsal Bucha
298c198b37 ASoC: wcd937x: Add mixer ctl for TX CH power level
Add mixer ctl for tx channel power level.

CRs-Fixed: 2703598
Change-Id: Iecb0dfe491afaface4c4dd1995aa13c7efd9df82
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-06-16 09:24:02 +05:30
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
qctecmdr
064de7b487 Merge "ASoC: swr-dmic: Add ignore suspend for dapm widgets" 2020-06-11 04:15:16 -07:00
qctecmdr
17b9010fb5 Merge "ASoC: wsa883x: Update interrupt handling on WSA883x driver" 2020-06-11 04:15:16 -07:00
qctecmdr
f1b31e25a5 Merge "ASoC: bolero: Disable wsa swr gpio as wakeup capable" 2020-06-11 04:15:16 -07:00
qctecmdr
0f5df347f1 Merge "soc: mstr-ctrl: Retain Audio_HM voting until suspend" 2020-06-11 04:15:16 -07:00
qctecmdr
c14ab52d6e Merge "asoc: codecs: Fix out of bounds access in register show function" 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
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
qctecmdr
a77e7d4be8 Merge "asoc: codecs: Add delay to eliminate playback pause post SSR on hs" 2020-06-09 09:24:19 -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
Laxminath Kasam
d02c7efb35 soc: mstr-ctrl: Retain Audio_HM voting until suspend
Restore change to retain audio_hm voting and
ensure AOP hang issue not seen by masking interrupt
wakeup of swr pinctrl pins.

Change-Id: I51bf36d6d6b0999abf10a4bc94cce900d1adf1d5
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-06-08 16:24:54 +05:30
Laxminath Kasam
61f235e5bd asoc: bolero: Register for AFE event for all SVA usecases
For island SVA usecase, ensure register for
AFE in-band interrupt.

Change-Id: I24e6dfadfaa38919114000fb09a7906264020cd9
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-06-08 16:23:50 +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
qctecmdr
d187ddf230 Merge "asoc: wsa-macro: Fix mixing path on WSA" 2020-06-05 01:54:03 -07:00
qctecmdr
c1a9199e09 Merge "asoc: codecs: Update LPM voting support for vdd-mic-bias-supply" 2020-06-05 01:54:03 -07:00
qctecmdr
7a2578cd8a Merge "asoc: msm-cdc-pinctrl: Add alternate pinctrl state for DSD input" 2020-06-05 01:54:03 -07:00
qctecmdr
261249d3f4 Merge "ASoC: swr-haptics: Avoid soundwire resume during subsystem restart" 2020-06-05 01:54:02 -07:00
qctecmdr
1aec879743 Merge "asoc: qcs405: Add dai links for hdmi tx" 2020-06-05 01:54:02 -07:00
Sudheer Papothi
6f0a3e6cb8 ASoC: swr-dmic: Add ignore suspend for dapm widgets
Add ignore suspend for dapm widgets to avoid waking up the
system during power collapse.

Change-Id: I4eec9785f2e722d1fbcbf26c2635af9825b30115
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-06-05 10:41:18 +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
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
Sudheer Papothi
b0e4323d6a ASoC: bolero: Disable wsa swr gpio as wakeup capable
Disable wsa swr gpio as wakeup capable to avoid waking up system
during power collapse.

Change-Id: I54d769d63c9e7c13d2920f038c64353a92556cfe
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-06-05 09:58:38 +05:30
Aditya Bavanari
f1035cd51c asoc: codecs: Add delay to eliminate playback pause post SSR on hs
Add delay in post ssr to eliminate playback pause on euro usbc headset.
Post ssr, headset is detected as headphone as HPH PA gets turned ON
before the completion of wcd_correct_swch_plug workqueue in MBHC.

Change-Id: Ib0334b37aa12b7e7371146b26eb3a1f4484656a3
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-06-04 20:57:23 +05:30
Aditya Bavanari
cbe9426358 asoc: codecs: Fix volume fluctuation issue in headphone playback
HPH PA pull down control is set to force ON instead of auto
due of which saturation/noise is observed in headset
playback at highest volumes. Set pull down control
to Auto to fix this issue.

Change-Id: I465588f46b04bbb32d84f76b8b5bedd2ef21bd2a
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-06-03 21:05:57 -07:00
Aditya Bavanari
050e740320 asoc: codecs: Enable impedance detection for rouleur codec
Implement the impedance calculation logic for
rouleur codec.

Change-Id: I2b62e8c1109f949a12d2f31b4c1f6035a1bc2bba
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-06-03 21:05:22 -07:00
Aditya Bavanari
313aa17ac4 asoc: codecs: Add comparator autozeroing support for rouleur
When current source mode is enabled, comparator auto
zeroing should be turned ON by HW. As rouleur codec HW
doesn't do this automatically, add this support
in SW to set the auto zero enable before FSM enable
and reset to auto once FSM is enabled.
Disable surge protection before ADC measurements
and change HPHL and HPHR thresholds while
identifying cross connection for proper
accessory identification.

Change-Id: Ib775de0f0bdb6c655a3c0eb4775276acfbca1e84
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-06-03 21:04:31 -07:00