Commit Graph

89 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
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
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
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
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
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
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
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
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
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
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
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
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
f83acfb0f2 asoc: Binrgup fixes for talos
Add fixes related to audio bringup

Change-Id: I46fa0bb9c6f914fe9034f4fb78ef2248de7ebd50
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-08-11 23:28:57 +05:30
Tanya Dixit
6256c5b989 asoc: codecs: Tanggu reset pin and supplies
Enable power supplies and reset of Tanggu

CRs-Fixed: 2281591
Change-Id: I7d693263f328b51d2f333bddac5e15e98a5f9f51
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
2018-08-10 13:56:31 +05:30
Ramprasad Katkam
95cfa1516b asoc: wcd937x: Add swr port connections for wcd937x
Add interface to read swr port mapping from device
tree and call connect port to swr interface from
wcd937x codec driver.

Change-Id: I82e8d7a8063b725292e0d7ca5e519f279289efe0
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-08-08 15:04:35 +05:30
Vatsal Bucha
92fad90ae5 ASoC: Add MBHC and IRQ driver for WCD937X
Add MBHC and IRQ driver for tanggu codec.
MBHC and IRQ for tanggu are initialized from
core driver. IRQ driver uses REGMAP-IRQ
framework.

CRs-Fixed: 2281591
Change-Id: I06adb3081dd17f896b3e6a3ce0c4c46b5ef1cbea
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-08-07 17:32:16 +05:30
Tanya Dixit
9b37ac95f1 asoc: codecs: Tanggu TX RX changes
Tanggu codec driver changes for RX and TX
widgets, dapm sequences and routes update.

CRs-Fixed: 2281591
Change-Id: I769255e80c8569f7d954a5e5e5c62b8048d62b0b
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
2018-08-06 22:36:56 +05:30
Rohit kumar
759426ec4b ASoC: Add WCD937X slave and core driver
Add wcd937x swr slave and codec driver.
This adds only basic support for codec registration.

Change-Id: I87519a234f14d34a019c8f66652b7224759e639c
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
2018-08-06 20:53:13 +05:30