Commit Graph

392 Commits

Author SHA1 Message Date
Aditya Bavanari
c496ed25a9 asoc: codecs: Correct the clk users increment/decrement logic
The clk users count goes out of sync with the actual
clk requests from clients during SSR/PDR. Increment the
clk users only after the clk request is successful.

Change-Id: I512f037a118f4763a64e7a64f7f559bcfa37a37f
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-11-21 02:21:35 -08:00
Linux Build Service Account
3a0e91bf0c Merge "ASoC: wcd937x: Fix pop after PDR" 2018-11-20 19:53:17 -08:00
Linux Build Service Account
523f345c3a Merge "asoc: codecs: bolero: Disable HD2 on RX macro" 2018-11-20 19:53:16 -08:00
Linux Build Service Account
aea561ec79 Merge "asoc: wcd937x: Handle button press before release interrupt" 2018-11-20 19:53:15 -08:00
Linux Build Service Account
13c086dcee Merge "ASoC: wcd934x: mark wdma3 output widget as ignore_suspend" 2018-11-20 19:53:11 -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
Linux Build Service Account
712efd3aa3 Merge "wcd934x: Fix NULL pointer dereference for wcd9xxx pointer" 2018-11-18 23:46:54 -08:00
Linux Build Service Account
d72c877e31 Merge "soc: vote for LPASS NPA resource from LPI TLMM driver" 2018-11-17 09:56:49 -08:00
Bhalchandra Gajare
9ae91fb765 ASoC: wcd934x: mark wdma3 output widget as ignore_suspend
Paths using WDMA3_OUT widget are currently not marked to be ignored
during suspend, which results in the path teardown during suspend.
Due to this the audio use-case is broken. Fix this by marking
WDMA3_OUT widget as ignore_suspend.

CRs-fixed: 2176596
Change-Id: I72a2dda21aabfe9b13ea8660d4e3a51b3185d9ea
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2018-11-16 17:14:17 -08:00
Vatsal Bucha
8d8602219b wcd934x: Fix NULL pointer dereference for wcd9xxx pointer
During bind/unbind of ngd_msm_ctrl power_gate_digital_core
is called. Simultaneously tavil_remove is also called
making tavil pointer as NULL.  Check for tavil as not NULL
at the start of function to avoid NULL pointer dereference.

CRs-Fixed: 2267796
Change-Id: I6fc476cc8b706b556836f30838983de0f34d4fc1
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-11-15 18:05:52 -08:00
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
d3ffb3368b asoc: codecs: bolero: Disable HD2 on RX macro
HD2 canceller on analog codec is performing
better and enabling HD2 block on rx macro side
as well impacting THD+N spec. As per HW
recommendation, disable HD2 on digital bolero
rx macro by default. Mixer control option is
provided if required to enable it in future for
any requirements.

CRs-Fixed: 2343436
Change-Id: Ic1696ff9a6dea22a3c2a6071708267e2a024a4c7
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-11-15 15:01:09 +05:30
Linux Build Service Account
ffb86ea061 Merge "asoc: bolero: Add support to register wake irq" 2018-11-14 23:15:24 -08:00
Linux Build Service Account
3de80a4abd Merge "asoc: codecs: Add new class-H driver for wcd937x" 2018-11-14 23:15:18 -08:00
Mangesh Kunchamwar
920015ceb8 asoc: codecs: bolero: vote for LPASS NPA resource
Updates for voting for LPASS island NPA resource while
access any LPASS registers.

Change-Id: Ibcebd2d6ef368f309594689335bc07a36eafeaf0
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-11-15 12:22:48 +05:30
Vatsal Bucha
53b4e14f94 ASoC: bolero: Add callback to tanggu in SSR Disable
Add callback event in ssr_disable to disable
tanggu PA before regcache_cache_only
to avoid pop after PDR. Also update proper bit
while RX Mute.

Change-Id: I06402269d393ca74c11611482cafbde03f4c62b9
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-11-15 11:40:25 +05:30
Mangesh Kunchamwar
912a96accb asoc: codecs: update audio clock driver for LPASS NPA resource
Add new clock node for LPASS NPA resource for clients
to enable or disable the resource.

Change-Id: I8aa587771618d301ace72d6df1045078cdf39c9c
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-11-14 18:39:09 +05:30
Aditya Bavanari
c4e96121c5 asoc: bolero: Add support to register wake irq
Add reg_wake_irq macro callback and issue an event
from Tx macro to Tx sound wire master instance
in order to register for wake irq and to handle
the ipc wake up interrupt.

Change-Id: Iefddc1f85173ce267c0b00c9d06be3a4a2fe29fe
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-11-14 17:06:38 +05:30
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
Linux Build Service Account
71d091e2ec Merge "asoc: wcd937x: move export functions to new header" 2018-11-13 21:59:22 -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
Laxminath Kasam
de09dfb301 asoc: codecs: bolero: Add HPH power modes on bolero
Two power modes are supported on bolero digital.
Add support to set required power mode using
mixer control and enable runtime during powerup
sequence.

Change-Id: I4c5a7560984d60745ac98848f1eec1d1f8485323
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-11-12 20:19:57 +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
04804945eb Merge "asoc: bolero: Fix gfmux access during SSR" 2018-10-25 19:21:08 -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
Linux Build Service Account
6bbd1d460e Merge "asoc: wcd937x: initialize micb lock mutex" 2018-10-23 21:52:56 -07:00
Laxminath Kasam
701e358482 asoc: bolero: Fix gfmux access during SSR
Avoid access of gfmux register during SSR/PDR.
Reset the gfmux state to MCLK_MUX0 after
SSR up event in rx macro.

Change-Id: I2ac611049efd3ce9d03bc9dcd912f64887a23679
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-10-24 00:53:52 +05:30
Linux Build Service Account
8d33594d66 Merge "asoc: bolero: avoid TX distortion by runtime HPF param change" 2018-10-23 01:32:51 -07:00
Linux Build Service Account
03072ce6e1 Merge "audio-lnx: ANDROID_BUILD_TOP is deprecated." 2018-10-23 01:32:43 -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
Linux Build Service Account
df791f4d5b Merge "asoc: bolero: Increase timeout for session down during ssr" 2018-10-20 00:23:54 -07:00
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
Ramprasad Katkam
f83634eead asoc: bolero: Increase timeout for session down during ssr
Sometimes observed that session is taken more time to teardown
after ssr. Increase timeout to allow more time for session
to be tear down.

Change-Id: I3f1b4d8f583ad5b9c8f5e1b90af9c576ae6bd2b2
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-10-12 22:31:39 +05:30
Bhalchandra Gajare
077589df00 ASoC: wcd934x: enable MAD fs_cntr by default
Currently, the fs_cntr for MAD is enabled whenever the MAD
audio path is enabled. But, a new issue is reported where
MAD fs_cntr is required even for some of the non-MAD paths.
As per hardware requirements, enable the MAD fs_cntr always
from the codec default registers.

Change-Id: I6fe8f663b82e711b4194aa51a3e21150aa98cf02
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2018-10-11 11:08:04 -07:00
Linux Build Service Account
c4a3ea6151 Merge "ASoC: wcd9xxx: Add gpio control for micbias-supply for SXR1120" 2018-10-11 08:04:58 -07:00
Linux Build Service Account
a25f9ecc66 Merge "ASoC: wcd934x: Set micbias curr to higher value when micb is enabled" 2018-10-11 08:04:55 -07:00
Xiaojun Sang
d155fdcb2f asoc: bolero: avoid TX distortion by runtime HPF param change
Runtime HPF param change leads to TX distortion at the beginning.
Unmute HPF after param change.

Change-Id: I7683ca047123dd004fb2dd019365305edfc72ea5
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2018-10-11 15:24:10 +08:00
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
38db822619 Merge "ASoC: wcd934x: Avoid soundwire enable when codec is in power collapse" 2018-10-08 23:04:23 -07:00
Vatsal Bucha
8148b998ed ASoC: wcd9xxx: Add gpio control for micbias-supply for SXR1120
SXR1120 has additional gpio for micbias supply to be
enabled. Add control for this gpio and enable it.

Change-Id: Ica4ea9765db9bd48a1f8eb010d82d2687c8abbb9
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-10-08 14:23:42 +05:30
Vatsal Bucha
78607e4927 ASoC: wcd934x: Set micbias curr to higher value when micb is enabled
When micbias is enabled set curr to higher value for
vreg bob bypass and when it is disabled set it
to default value for sm6150.

CRs-Fixed: 2315478
Change-Id: I451506002f382e666d47bc83944bdc8dbbedcad8
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-10-08 14:10:23 +05:30
Linux Build Service Account
4073cd77cd Merge "asoc: csra66x0: Fix interrupt in multichannel case" 2018-10-07 21:19:48 -07:00
Linux Build Service Account
72a52601a1 Merge "asoc: codecs: Use sysfs instead of mixer_ctls for EP92 HDMI" 2018-10-07 21:19:47 -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