Commit Graph

57 Commits

Author SHA1 Message Date
Linux Build Service Account
3a0e91bf0c Merge "ASoC: wcd937x: Fix pop after PDR" 2018-11-20 19:53:17 -08:00
Linux Build Service Account
aea561ec79 Merge "asoc: wcd937x: Handle button press before release interrupt" 2018-11-20 19:53:15 -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
Ramprasad Katkam
0730ecfaa0 asoc: wcd937x: Handle button press before release interrupt
If button press and release interrupts occur at same time
processing button release first would treat the button event
as fake, as it is not preceeded with press event. Hence
process button press before button release in irq driver.

Change-Id: I9413def87537502c470236a3948a21be47c479bc
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-11-14 11:48:09 +05:30
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
Laxminath Kasam
838f0b885f asoc: wcd937x: move export functions to new header
For export functions from wcd937x use separate
header as internal header is only supposed to be
used within wcd937x driver logic.

Change-Id: Ice373ff95f7166a2f968458b25223c582edc7fba
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-11-12 21:49:59 +05:30
Linux Build Service Account
408ba7c759 Merge "asoc: wcd937x: disable TX CH2 after power down" 2018-11-05 21:39:05 -08:00
Xiaojun Sang
80eb5ddfdd asoc: wcd937x: disable TX CH2 after power down
TX channel2 is not disabled after power down. It leads to
noise at the beginning of next recording on CH2.
Disable it after power down.

Change-Id: If12a84df52b9c8cd55de2bdcb91f950b054898b8
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2018-11-02 12:42:50 +08:00
Hari Veerubhotla
dcab67c504 Initial Android target definition for trinket.
Change-Id: Ib55a9013b0fa5bcda0e5d2d17d1741e607a9c9b5
2018-10-31 02:40:21 -07:00
Linux Build Service Account
f79c5c1f41 Merge "asoc: codecs: Add proper NULL checks and initialize variables" 2018-10-25 03:13:39 -07:00
Tanya Dixit
ab8eba8711 asoc: codecs: Add proper NULL checks and initialize variables
Add null checks and initialize unintialized variables in
wsa macro, wcd937x and wcd937x_slave drivers.

CRs-Fixed: 2328286
Change-Id: I76b8d262e42d2b06ece3a6ecba28ed26b13d4447
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
2018-10-22 15:06:48 +05:30
Ramprasad Katkam
e23066df2a asoc: wcd937x: initialize micb lock mutex
Micb lock which is used to synchronize micbias
control api is not initialized causing spin lock
errors. Initialize the mutex to avoid the issue.

Change-Id: I580e52e1bd225c2d99bfba4657d80670296709a0
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-10-17 15:58:23 +05:30
Linux Build Service Account
a8be987232 Merge "asoc: wcd937x: Reset mbhc detection type after ssr" 2018-10-08 23:04:40 -07:00
Linux Build Service Account
ce49ef9363 Merge "asoc: wcd937x: Make vdd-buck as on-demand supply" 2018-10-08 23:04:34 -07:00
Linux Build Service Account
516aa8be7c Merge "asoc: wcd937x: Fix pop on headphone playback start" 2018-10-08 23:04:31 -07:00
Linux Build Service Account
3bd2246b42 Merge "asoc: wcd937x: update access for wcd937x registers" 2018-10-07 21:19:46 -07:00
Laxminath Kasam
248273c949 asoc: wcd937x: Fix pop on headphone playback start
Pop is observed on HPH playback start. Enable SWR port
config setup before HPH PA enable.

Change-Id: I2253be1c7e4d8df2bffd7bd0396ceb72a5018637
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-10-05 22:14:05 +05:30
Tanya Dixit
6c13f05fb4 asoc: wcd937x: Make vdd-buck as on-demand supply
Add widget and routing support for vdd-buck supply
as dynamic for all rx usecases.

Change-Id: I1e67e7e950e33a0d98900ee0b20e0dc818a7936d
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
2018-10-05 18:36:18 +05:30
Linux Build Service Account
3933347f55 Merge "asoc: codecs: add ignore suspend for bolero and wcd937x widgets" 2018-10-04 07:46:54 -07:00
Ramprasad Katkam
c49a9d541d asoc: wcd937x: Reset mbhc detection type after ssr
If headset is connected during SSR, after recovery mbhc
driver expects a new detection event as the driver is reinitialized.
Reset detection type to insertion to retrigger a hw interrupt
for mbhc driver.

Change-Id: I55705eb6b6a289deb5dc16a4b9ef6252082a3d9a
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-10-04 20:09:17 +05:30
Laxminath Kasam
cf0c63d564 asoc: wcd937x: update access for wcd937x registers
Remove page registers from access table. Update
read/write access for registers as per HW spec.

Change-Id: I8c32b79e4f0d4e378df5c83f3934c68f6c72385f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-10-03 15:15:04 +05:30
Ramprasad Katkam
55ec68ca3c asoc: wcd937x: clear interrupts using regmap irq framework
Add proper way to clear interrupts using regmap irq framework,
to avoid mismatch between interrupts handled and interrupts
cleared. wcd937x requires writing '1' and then '0' to clear
interrupt. Set a new regmap irq flag 'clear_ack' to indicate this.

Change-Id: I1346dc66735d3b5788e1cc0cfef772c9deacbfc1
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-10-01 11:38:23 +05:30
Laxminath Kasam
638b56027e asoc: codecs: add ignore suspend for bolero and wcd937x widgets
Update ignore suspend for AIF in/out and dapm input/output
widgets for bolero and wcd937x codecs to avoid suspend
of codec during active usecase running even after APSS
goes to suspend.

CRs-Fixed: 2321226
Change-Id: I277129e8e657485c56414a385150c4da55382770
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-10-01 11:31:22 +05:30
Laxminath Kasam
1aab2c064a asoc: wcd937x: add SSR changes for wcd937x codec driver
Add changes to recover audio after SSR on wcd937x driver.

Change-Id: I661605e9b1bd71f08f331d14ae52f89ba8423d4f
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-09-25 11:59:29 +05:30
Laxminath Kasam
497a651ef8 asoc: codecs: Add parent child relation for bolero and tanggu
In bolero and tanggu combination, make bolero parent of tanggu.
Bolero and tanggu can communicate mutually using notifier and
plat_data callback APIs.

Change-Id: Iecd119df7f0ad1ba225c0427f3f42f217146b092
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-09-25 11:31:37 +05:30
Linux Build Service Account
53f339b53b Merge "asoc: codecs: Add proper null checks and initialize variables" 2018-09-24 19:22:03 -07:00
Linux Build Service Account
1562ec4f76 Merge "asoc: wcd937x: add support for disable HPH compander" 2018-09-21 08:30:40 -07:00
Linux Build Service Account
884e5ee2e5 Merge "ASoC: wcd937x: Reduce latency in case of impedance detection" 2018-09-19 22:52:46 -07:00
Laxminath Kasam
33367f849a asoc: wcd937x: add support for disable HPH compander
On wcd937x, add controls for HPH compander.
Handle sequences for headphone path based on
compander enabled or disabled.

Change-Id: I2ebdd03a4f79dc6156327d0613fab2f26710393f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-09-18 20:55:25 +05:30
Linux Build Service Account
24eb5b4c0b Merge "ASoC: wcd937x: Add alias for in2p clamp register" 2018-09-17 20:47:31 -07:00
Vatsal Bucha
34b5181903 ASoC: wcd937x: Reduce latency in case of impedance detection
Bulk read api does not work properly for swr regmap,
causing failure/delay in impedance detection.
Use regmap read api to avoid the issue.

CRs-Fixed: 2301798
Change-Id: I5727cfcb7846f40f5b0f75b7976b492e2a2bfde0
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-09-17 19:20:54 +05:30
Tanya Dixit
8530fb9b5d asoc: codecs: Add proper null checks and initialize variables
Add proper null checks and initialize variables
in rx-macro, tx-macro, va-macro and wcd937x drivers.

Change-Id: I90899c84d3391305b9a24d4b043adc08b7c0332a
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
2018-09-17 06:25:33 -07:00
Vatsal Bucha
9bdadace52 ASoC: wcd937x: Add alias for in2p clamp register
Add alias for in2p clamp register to check in2p
clamp state in insertion irq and ignore the interrupt
if the clamp is already set.

Change-Id: Ibd4ff2cef8690894a01072e74ce130f824656f5d
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-09-10 15:24:00 +05:30
Linux Build Service Account
93ce3defb5 Merge "asoc: wcd937x: set default power level as ULP for wcd937x headphones" 2018-09-05 04:55:01 -07:00
Linux Build Service Account
c9d7f26700 Merge "ASoC: wcd937x: Add fix to enable button detection" 2018-09-04 09:41:55 -07:00
Linux Build Service Account
a69dbed411 Merge "asoc: wcd937x: fix wcd9375 widgets override issue" 2018-09-04 06:17:53 -07:00
Vatsal Bucha
302075bb10 ASoC: wcd937x: Add fix to enable button detection
Add notifier call chain to enable button detection.

Change-Id: Ibd432691e4b820b8b2e86ebc8e8c2015bb26d2b1
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-09-04 14:59:19 +05:30
Laxminath Kasam
5f713097e1 asoc: wcd937x: set default power level as ULP for wcd937x headphones
For headphone playback, update default power level
to Ultra_Low_Power(ULP) on wcd9370.

Change-Id: Ic5e76d8f8fca1806780a4dbc679166a68c31edf3
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-09-04 11:42:45 +05:30
Ramprasad Katkam
201911d93e asoc: wcd937x: fix wcd9375 widgets override issue
wcd9375 widgets addition override wcd9370 widgets
registered already in dapm. Need to call
snd_soc_dapm_sync only after adding new widgets/routes.

Change-Id: I285d2f971ca2daae865156e050904fdcc9ea8c3c
signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-09-03 18:37:52 +05:30
Linux Build Service Account
b764c33cef Merge "asoc: Add codec entry node for wcd937x to support ADIE RTAC" 2018-09-02 23:12:17 -07:00
Linux Build Service Account
584f8171af Merge "ASoC: sm6150: Add logic to parse micbias from dt" 2018-09-02 23:12:15 -07:00
Linux Build Service Account
6d180092fd Merge "asoc: wcd937x: enable headset detection" 2018-08-31 04:21:28 -07:00
Aditya Bavanari
4ae32fc38e asoc: Add codec entry node for wcd937x to support ADIE RTAC
Add changes to create codec entry node for wcd937x to support
ADIE RTC calibration.

CRs-Fixed: 2281591
Change-Id: I87f3c94995a8ec0c8c5e056891cb293946683885
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-08-31 04:12:56 -07:00
Linux Build Service Account
fe11def3f2 Merge "asoc: wcd937x: fix compilation issue in mbhc" 2018-08-30 21:01:03 -07:00
Ramprasad Katkam
997da40118 asoc: wcd937x: enable headset detection
Enable mbhc on wcd937x for headset insertion and
removal detection.

Change-Id: I0b2ae7ea061a99ad89f9adea00c898dac4442ca6
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-08-30 20:13:47 +05:30
Vatsal Bucha
477f211b8a ASoC: sm6150: Add logic to parse micbias from dt
Add logic to parse micbias info if it is
specified in dt.

CRs-Fixed: 2281591
Change-Id: I943cedcadeceaa4a7da3422cf427d5679fe703b6
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-08-30 14:57:51 +05:30
Ramprasad Katkam
9c2394a6e4 asoc: Talos-tanggu bringup fixes
Bringup fixes to enumerate tanggu codec on talos.

Change-Id: Ic9c43ec0b870f6fec3c6d21fd4d77606c7ed94b1
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-08-29 11:04:43 +05:30
Ramprasad Katkam
f747677234 asoc: wcd937x: fix compilation issue in mbhc
Fix compilation issue in wcd937x mbhc file.

Change-Id: I49057cdf108268f60795f568cc7efb43d53d01a3
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-08-29 10:41:08 +05:30
Linux Build Service Account
3712485b8f Merge "ASoC: wcd937x-mbhc: Add support for headset moisture detection" 2018-08-25 04:00:44 -07:00