Commit Graph

95 Commits

Author SHA1 Message Date
qctecmdr
e63542d6b7 Merge "asoc: codecs: Set EAR compander if mixer ctl set" 2020-04-26 23:42:50 -07:00
qctecmdr
b221915dc1 Merge "ASoC: wcd938x: Enable digital clk for tx0 if micbias enabled" 2020-04-26 23:42:49 -07:00
Laxminath Kasam
101e71693d asoc: wcd937x: Update retry logic for SWR logical addr
Update retry logic for SWR logical address during SSR.

Change-Id: Ifa5cdec751a271c09a8b6340009ec0e862ffb326
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-04-20 11:32:20 -07:00
Vatsal Bucha
fb63ca16cc ASoC: wcd938x: Enable digital clk for tx0 if micbias enabled
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>
2020-04-19 08:25:30 -07:00
Laxminath Kasam
2e025248a2 asoc: codecs: Set EAR compander if mixer ctl set
Enable compander based on mixer ctl set for ear path.

Change-Id: Ie6287469f1baa9dba239d369bd5a29ed8e44522f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-04-19 08:11:52 -07:00
Aditya Bavanari
ee6367c560 asoc: Add support for rouleur codec in machine driver
Add rouleur codec support in bengal machine driver
to create codec entry and invoke mbhc hs detect
functions for respective codecs. Correct the logic
for headset detection pull up current and
volatile registers for digital part of rouleur codec.

Change-Id: I22545dc796c215c1501e883796546c97d8ca8698
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-04-16 01:17:00 -07:00
Vatsal Bucha
71e95c67ea ASoC: wcd938x: Fix headset detection during SSR/PDR
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>
2020-04-01 09:54:12 -07:00
Sudheer Papothi
b2d648baf0 ASoC: wcd938x: Update soundwire master channel type
Update soundwire master channel type properly before sending to
soundwire master.

Change-Id: I459c6e8d1cc688c3e6e5a0369e095f0b12fbb7c6
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-02-07 14:35:00 +05:30
Ramlal Karra
3e2c37d273 asoc: codecs: Add unified SWR Tx mapping support
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>
2020-02-05 09:56:57 -08:00
Laxminath Kasam
ef20c8c2d5 asoc: wcd937x: Avoid clk disable at aux dac
Clock disable at aux dac event is not needed
as rx3 widget already disables it.

Change-Id: I67feec194cdae5c6d84efcde0a2931ba8f8440dd
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-12-06 14:48:29 +05:30
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