Commit Graph

85 Commits

Author SHA1 Message Date
Laxminath Kasam
4696fffa8c asoc: Audio bringup changes for bengal
Update change for audio playback and record to work
on bengal target with wcd937x codec.

Change-Id: I2f781e2132b018995f30f4192efd08732196cd28
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-11-27 17:32:41 +05:30
qctecmdr
1afbf65af5 Merge "asoc: codecs: wcd937x: Update micbias pull up widgets" 2019-11-12 03:43:10 -08:00
Laxminath Kasam
2336053268 asoc: codecs: wcd937x: Update micbias pull up widgets
Add micbias pullup widgets required for VA usecase.

Change-Id: I3f2d0ce3d409297fb5e2bf0468258aaee9365293
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-11-05 17:22:07 +05:30
Vatsal Bucha
a9675d1a5d ASoC: wcd937x: Fix audio distortion issue during headset record
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: Icb18a0b5decb0c0bd9959bce7cced70a27566d41
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-11-01 03:15:36 -07:00
qctecmdr
26247b9b1c Merge "asoc: wcd937x: Fix compile error in wcd937x codec driver" 2019-10-16 23:32:44 -07:00
Laxminath Kasam
57e66c0251 asoc: wcd937x: Fix compile error in wcd937x codec driver
Update codec to component param for 4.19 kernel compatible.

Change-Id: Ia08283de4b01b45a6cd96c7f488f55bb0d4a5a53
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-10-12 23:31:17 +05:30
Laxminath Kasam
e6c06ae348 asoc: codecs: wcd937x: restore clear_ack setting for wcd937x
For wcd937x interrupts, need to set clear_ack explicitly
for regmap irq to clear the interrupt.

Change-Id: Ieffc20db0665fa82fe088337fbdf8b518191be3d
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-09-26 15:05:08 +05:30
qctecmdr
33de327759 Merge "asoc: codecs: wcd937x: Fix compile error" 2019-09-18 04:54:28 -07:00
Laxminath Kasam
2f151367ce asoc: codecs: wcd937x: Fix compile error
Use proper dev handle in print to avoid compile error.

Change-Id: Ieca116199ec4c86f2ee8c1698285fff0ecababbf
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-09-16 17:57:03 +05:30
Laxminath Kasam
5d8f357649 asoc: codecs: wcd937x: Update amic4 over adc3 recording
Update AMIC4 over adc3 for wcd9375 as per HW sequences.

Change-Id: Ie7c3713bee67d32cb7fba042848f52bcded8f4b0
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-08-19 14:08:57 +05:30
qctecmdr
b7c31cad77 Merge "asoc: codecs: enable bcs port for headset record" 2019-08-02 06:47:40 -07:00
Karthikeyan Mani
ec3bb4045c asoc: codecs: enable bcs port for headset record
Enable button click suppression port to send mbhc
events over the port to reduce glitches caused
by button events or plug removal events on the
record path.

Change-Id: I3f913ab1287f06afe6b5fc95da626f7c78ab448f
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-07-25 10:46:25 -07:00
Vatsal Bucha
875812d385 ASoC: wcd937x: Fix spurious interrupts for wcd937x
Enabling watchdog interrupt during bind causes spurious
interrupts. Disable interrupts during bind and enable
during path setup to fix this. Also enable and
disable interrupt for ear pa for wcd938x.

Change-Id: I4a9526d7b0a63f5325cec6dfe7a4e302ae76fc40
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-07-23 11:42:10 +05:30
qctecmdr
c0029da107 Merge "ASoC: wcd937x: Disable hph OCP on talos" 2019-07-20 00:21:45 -07:00
Vatsal Bucha
cf5a58f117 ASoC: wcd937x: Disable hph OCP on talos
OCP is resulting in mute issues during audio playback.
Talos has surge protection enabled in hw. Thus
OCP can be disabled for talos.

Change-Id: I5a7fe54ae9e77af65dd9e017b4001f2fac3cfdd4
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-07-10 13:06:44 +05:30
Aditya Bavanari
d37e02049c asoc: codecs: Add variant entry support for wcd937x and wcd938x
Add variant entry support for wcd937x and wcd938x codecs to
differentiate between wcd9370/80 and wcd9375/85 variants.

Change-Id: Ife20d14462a0b0968e0458471af3823872592e10
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-07-08 18:34:57 +05:30
qctecmdr
34b7d3b2fd Merge "ASoC: hide bind/unbind in sysfs" 2019-05-21 20:33:23 -07:00
Xiaojun Sang
53cd13a1ab ASoC: hide bind/unbind in sysfs
Exposure of driver bind/unbind to userspace via sysfs may
lead to unexpected behavior.
Hide bind and unbind by driver attribute.

Change-Id: I20d6ee653bcc16af15d6368664aaf240c6645cd0
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-05-17 15:00:33 +08:00
Vatsal Bucha
72753620d0 ASoC: wcd937x: Fix invalid memory access in wcd937x_suspend
Invalid memory access happens in wcd937x_suspend if
component bind for slave fails. This is because
as part of component_unbind devres_release_group is called
which removes every node from list and frees corresponding memory.
This results in invalid memory access for wcd937x in wcd937x_suspend.
Do kfree and set drvdata to NULL if component_bind fails
to resolve the issue.

Change-Id: Ia26eb36fe8b92ac0491b03d0d4a2b8def415148b
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-05-10 00:42:20 -07:00
qctecmdr
280b241b40 Merge "ASoC: wcd937x: update micbias noise filter resistance" 2019-05-03 05:18:55 -07:00
Vatsal Bucha
eb7519911f ASoC: wcd937x: update micbias noise filter resistance
Update micbias noise filter resistance for better performance
during audio capture.

Change-Id: If80b967dd7f9bbf7e683c6da53a1aa93924c6877
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-04-16 15:20:39 +08:00
Vatsal Bucha
d76b6b3ceb ASoC: wcd937x: Fix mbhc detection failure after get logical address fails
Get Logical Address failure comes after SSR during rigorous testing.
This calls removal of swr master device attached. Once removal occurs
further headset insertion/removal does not get detected. Do not remove
swr master device attached to fix the issue.

Change-Id: Iac78b4a12ef296566d082e75ac8905f73d6b2a47
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-04-15 17:26:23 -07:00
qctecmdr
abca8128dd Merge "ASoC: wcd937x: Fix playback stop issue after SSR/PDR on special hs" 2019-04-06 23:14:37 -07:00
Meng Wang
578740db71 asoc: wcd937x: Disable EN_CUR_DET bit for receiver noise
Disable EN_CUR_DET to fix receiver noise as per hw team
recommendation.

Change-Id: Icbeea920d02279ff845072e54be1c449db7bd2da
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-03-20 17:24:22 -07:00
Vatsal Bucha
13faf538b3 ASoC: wcd937x: Fix playback stop issue after SSR/PDR on special hs
If we start playback on special hs after record is done and perform
SSR/PDR then playback gets paused. This happens because ANA_TX_DIV2_CLK
which needs to be enabled for special hs gets disabled after record
is stopped. Maintain a count for ANA_DIV2_CLK to enable/disable it
as required.

Change-Id: Ic73475c83cb16e3c014f35b8d46ee22d2e7a2efd
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-03-20 15:44:14 +08:00
Vatsal Bucha
7aa2f97f60 ASoC: wcd937x: Enable surge protection for talos
Enable surge protection feature for talos.

Change-Id: If1a5e4d60a80f288825ee0e39645166f0cb9446f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-02-20 18:58:34 +08:00
Linux Build Service Account
62c4ce4766 Merge "asoc: wcd937x: Clear Buck disable flag in PMU even if already up" 2019-01-28 11:11:22 -08:00
Tanya Dixit
2e838e52fe asoc: codecs: Add support for setting ear gain ctl
Add support for setting EAR PA gain directly using
mixer control.

Change-Id: Ifd9e31ed45d10b5ea0f9cf546806ef78ece9e181
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-01-21 21:11:55 -08:00
Vatsal Bucha
5141b172ce ASoC: wcd937x: Enable and disable HPH OCP at PA to avoid CnP
Enable HPHR and HPHL OCP after PA enable and disable it
before PA disable to avoid CnP issues at teardown.

Change-Id: Ic08a8862a7fb4f40ecc6060de6aa1eadc11f1c0f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-01-22 13:11:17 +08:00
Vatsal Bucha
1ca5d397ba ASoC: wcd937x: Fix CnP when compander is disabled
Pop noise is observed at teardown when compander
is disabled. Allow proper delay after PA disable
to resolve the pop.

Change-Id: I15efa08f28bc1dd32e39b3ca1311b1e417199fd3
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-01-22 11:10:28 +08:00
Ramprasad Katkam
b7fc921d89 asoc: wcd937x: Clear Buck disable flag in PMU even if already up
Buck disable flag, which is used to indicate if suspend can disable
the buck, is not cleared during powerup if it is already enabled.
This causes suspend to disable buck even during active usecase.
Clear the buck disable flag when returning due to already enable.

Change-Id: I5118b66492dff27965a587e1bc6b916d5c26b9fb
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2019-01-21 18:48:17 -08:00
Linux Build Service Account
706d3a9a51 Merge "asoc: wcd937x: stop mbhc during ssr down" 2019-01-08 05:32:00 -08:00
Linux Build Service Account
4c11ba0a0f Merge "asoc: wcd937x: Fix register names and properties" 2019-01-06 20:27:03 -08:00
Linux Build Service Account
0c6654ade2 Merge "ASoC: wcd937x: Enable watchdog interrupt" 2019-01-06 06:32:26 -08:00
Ramprasad Katkam
a2958a6205 asoc: wcd937x: stop mbhc during ssr down
Stop mbhc operations during ssr down to cancel
any pending detection sequences.

Change-Id: I6aa8c61c2cc74fc08adf57c58673acaa753ac322
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2019-01-03 09:45:54 +08:00
Tanya Dixit
46ec0f2835 asoc: wcd937x: Fix register names and properties
Update the register names and default values to
be same as the software document of codec.

CRs-Fixed: 2334177
Change-Id: Iec3ce76dceb44cef64c1f38a6cd75cb40ee2a539
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
2019-01-02 16:54:41 +08:00
Vatsal Bucha
beccfad9b6 ASoC: wcd937x: Enable watchdog interrupt
Handle PDM watchdog interrupt. Enable watchdog
before analog PA is enabled and disable it
after analog PA is disabled so as to prevent false alarms.

CRs-Fixed: 2336526
Change-Id: I3c16a9dcd0f4f84bf8ad0bfde9560330c143cdf9
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-01-02 16:20:07 +08:00
Vatsal Bucha
1793ff07cb asoc: wcd937x: Change voltage for micbias depending on dt value
MICBIAS is always set to 1.8V. Change this voltage
depending on dt value for respective micbias.

Change-Id: I8eb1e71ae0256423bfd0bcc8ba2cd6bcc4a5ee61
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-01-02 15:57:20 +08:00
Meng Wang
11a25cf657 asoc: update relative header files
Move all relative header files to include folder.

Change-Id: Ic61a61a88823b4749dbe8c1f680d08201a3b4a48
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-18 10:50:27 +08:00
Ramprasad Katkam
b6dda1e6be asoc: wcd937x: use swr device wakeup api
Use device wakeup api exposed by soundwire to
vote and unvote for soundwire master for mbhc
operations.

Change-Id: Id83c8d3fb2eb351133790f69af56e4981bcac543
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-12-11 13:40:57 +08:00
Meng Wang
43bbb87652 asoc: Update file header to GPL-2.0-only
Update file header to GPL-2.0-only.

Change-Id: Ic1542a3209a5fe73c937a5b36491ede4a451936d
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-10 14:49:34 +08:00
Meng Wang
15c825d077 ASoC: codec: Update codec driver to component driver
Some alsa API are removed in kernel-4.19 which would cause
codec driver compile failure. Update codec driver to fix it.

Change-Id: Ie358ec1863082166958059c179300b453d2a03ad
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-08 03:15:55 -08:00
Meng Wang
61af6849e9 ASoC: switch audio drivers to SPDX identifier
Switch audio drivers to SPDX identifier on msm-4.19.

Change-Id: Ic3f0230a516db251b8d81e8a7e73dbc04d66fe1b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-07 15:47:32 +08:00
Linux Build Service Account
164fffc986 Merge "asoc: codecs: wcd937x: Optimize HPH PA delays" 2018-11-22 20:08:59 -08:00
Laxminath Kasam
7c8ff05871 asoc: codecs: wcd937x: Optimize HPH PA delays
On headphone path, cold start output latency
is not met. Optimize delays during HPH DAC
and PA paths.

CRs-Fixed: 2338278
Change-Id: If96975d664fc655a4ac38a9d6ed88b6af61adfdf
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-11-21 14:41:00 +05:30
Laxminath Kasam
35849ccf24 asoc: codecs: Fix CnP on HPH turnon and turnoff
On headphone(HPH) path, CnP spec is not met.
Handle sequences for bolero and tanggu codecs
as per HW sequences. Disable vdd_buck during
system suspend when no usecase is active.

CRs-Fixed: 2343436
Change-Id: I62f89d829715f07885a97531fdcb2cc3ca0822ef
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-11-21 14:40:00 +05:30
Linux Build Service Account
3a0e91bf0c Merge "ASoC: wcd937x: Fix pop after PDR" 2018-11-20 19:53:17 -08:00
Vatsal Bucha
79da9fb84a ASoC: wcd937x: Fix pop after PDR
Pop is heard after PDR is triggered. This is
because while device down PA is still on.
Disable PA before SSR device down to prevent pop.

Change-Id: I6bfe3e731bdf60fba8fee90ab39c03a0512006ce
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-11-19 14:41:52 +05:30
Vatsal Bucha
204f59cd14 ASoC: wcd937x: Enable hph OCP
Update registers to enable OCP for HPHL and HPHR.

CRs-Fixed: 2321013
Change-Id: I51a872981ee2dc435757152b9122067944d13924
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-11-15 04:32:14 -08:00
Laxminath Kasam
7adc34e496 asoc: codecs: Add new class-H driver for wcd937x
Add new class-H driver with sequences to support
both class-H and class-AB modes on wcd937x variants.

Change-Id: Ie109f3d951af1e8a0079dd39ab2fe1e9883bd6c2
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-11-13 13:15:59 +05:30