Commit Graph

84 Commits

Author SHA1 Message Date
Linux Build Service Account
c8d4438836 Merge "soc: Add proper null check for client array pointer" 2018-10-23 01:32:56 -07:00
Linux Build Service Account
03072ce6e1 Merge "audio-lnx: ANDROID_BUILD_TOP is deprecated." 2018-10-23 01:32:43 -07:00
Linux Build Service Account
979ae8e796 Merge "soc: swr-mstr: Mask swrm debug interrupts" 2018-10-20 04:04:10 -07:00
Linux Build Service Account
e25f9003c6 Merge "soc: swr-mstr: synchronize swr clock requests" 2018-10-20 00:23:56 -07:00
Ramprasad Katkam
6a3050d838 soc: swr-mstr: Register for wakeup irq after disabling clk
During clock stop, Register for lpass wakeup only after
disabling the clock to avoid flooding of interrupts when
master is turned on for pending slave irq.

Change-Id: Ifbf604048d4972beb22b6286930193b83a2249e8
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-10-19 09:41:16 +05:30
Ramprasad Katkam
13e051c9ab soc: swr-mstr: Mask swrm debug interrupts
Mask swrm debug interrupts as workaround for interrupt
storm issue.

Change-Id: Ic623a3a161d7d04812c4dd4b2e07a3331f5ed7ec
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-10-19 09:27:12 +05:30
Ramprasad Katkam
6bce2e7374 soc: swr-mstr: synchronize swr clock requests
synchronize swr clock request using mutex and ensure
count becomes zero during ssr.

Change-Id: I3aa933a137d9439742d84fc23b37653da86f3b42
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-10-18 02:23:43 +05:30
Tanya Dixit
d7a6390344 soc: Add proper null check for client array pointer
Check if snd event client array is null before
dereferencing.

CRs-Fixed: 2328286
Change-Id: I4f7c2a1288ee27df51609e090cb2da2d33624a07
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
2018-10-17 17:30:02 +05:30
Linux Build Service Account
13bf73f231 Merge "soc: swr-mstr: Add proper handling of SSR and clock stop" 2018-10-08 23:04:39 -07:00
Linux Build Service Account
b112aeeb50 Merge "soc: swr-mstr: Ignore redundant slave path control command" 2018-10-08 23:04:37 -07:00
Linux Build Service Account
1e509a5e2c Merge "soc: swr-mstr: Fix port collision during wsa playback" 2018-10-08 23:04:35 -07:00
Linux Build Service Account
6f9a94c8ee Merge "soc: swr-mstr: Avoid handling redundant swr wakeup events" 2018-10-08 23:04:27 -07:00
Ramprasad Katkam
2a0996bc17 soc: swr-mstr: Fix port collision during wsa playback
Fix block pack mode parameter in wsa frame params to
to get proper frame allocation avoiding port collision
between DAC port and SMART BOOST port.

Change-Id: I3e552f189a67661d63a6cd0affc1cb233b53bda7
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-10-06 00:42:23 +05:30
Ramprasad Katkam
2a799b4065 soc: swr-mstr: Add proper handling of SSR and clock stop
When SSR occurs master needs to restart even though clock
stop mode is supported. Add proper handling of master
during SSR and suspend.

Change-Id: I21c0ffd4fb741788dd12671fe4bd04cca9d7ff59
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-10-06 00:39:37 +05:30
Ramprasad Katkam
cd61c6ef14 soc: swr-mstr: Avoid handling redundant swr wakeup events
It is sometimes observed that afe could send multiple wakeup
events at a time. Avoid this by handling wakeup event only once
per swr suspend.

Change-Id: Ieb9ed1b18c8c93cb7db4b75e3411cc25838be492
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-10-05 22:48:05 +05:30
Ramprasad Katkam
cab8d72ab0 soc: swr-mstr: Ignore redundant slave path control command
Slave could trigger multiple path control api multiple times
after connect/disconnect port. Avoid handling the api without
new connect/disconnect requests to reduce latency.

Change-Id: I4db52fdebfd6b7c0fe3f388f25dfaa4981d5f61c
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-10-05 18:38:40 +05:30
Ramprasad Katkam
48b49b2117 soc: swr-mstr: Avoid master reinit during clock stop-resume
Avoid reinitializing master when resuming from clock stop
to avoid possible slave sync lost.

Change-Id: I8b2403bf10c0ec2ab7b294d64441b4d9a8afcaa0
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-10-05 17:59:52 +05:30
Linux Build Service Account
168576aeb9 Merge "soc: swr-mstr: Enable required soundwire master interrupts" 2018-10-04 07:46:52 -07:00
Ramprasad Katkam
62d6d76b81 soc: swr-mstr: Add logic to recursively trigger slave irq handler
Soundwire slave interrupt is only edge type, so any pending slave
side interrupts could not cause a new slave interrupt, if
they are triggered before clearing of existing interrupts.
Recursively trigger slave irq until there are no pending slave
interrupts to handle this issue.

Change-Id: I254f2467f09172490796114b48f1f0feb604ad17
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-10-01 11:37:36 +05:30
Ramprasad Katkam
debe893b7c soc: swr-mstr: Enable required soundwire master interrupts
Enable soundwire master interrupts by setting the interrupt
enable bits in new CPU_n interrupt register.

Change-Id: Iec2502129cd04da2c8cbc3d3f43278a2ed3ba7d6
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-09-28 13:41:23 +05:30
Siddeswar Aluganti
85e9e16065 audio-lnx: ANDROID_BUILD_TOP is deprecated.
ANDROID_BUILD_TOP variable is deprecated and thus all paths are
assumed to be relative to the top directory.

Change-Id: Ifc1bba67bf47092a37336581990d4bcce82a72f5
2018-09-25 19:03:00 -07:00
Rohit kumar
27138766db config: sm6150: Enable compilation of snd_event
Enable compilation of snd_event driver for sm6150.

Change-Id: Ia6c62fea8d3660e187e79d1743a1b6862f3dd228
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
2018-09-25 12:20:20 +05:30
Laxminath Kasam
27b1bbc54b soc: pinctrl-lpi: add SSR changes based on snd event fwk
Add changes to support SSR in pinctrl lpi driver
based on snd event framework.

Change-Id: If4fb3085ab69ae04628ef10a8b528d0cdc20f40d
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-09-25 11:36:27 +05:30
Laxminath Kasam
1df09a82e5 soc: add SSR changes for swr mstr controller
Add changes to recover audio during SSR and PDR
in swr master controller driver.

Change-Id: Ibe3ae097b5f9d59b135d861c5f50f6bbc1c05af6
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-09-25 11:32:40 +05:30
Ramprasad Katkam
7cb4ff6b65 soc: swr-mstr: Use single pm runtime call during port enable
Add changes to call pm runtime calls only once for soundwire
master active, to be able to decrement and put to suspend
during SSR.

Change-Id: I068040e2a224d1ee97f472f69f25af77ae632be2
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-09-25 11:32:16 +05:30
Laxminath Kasam
b0f27cd9f0 soc: swr-mstr: add changes to support native playback
For MCLK frequency switching to 11.2896 for native
playback support, frameshape also needs to be changed
accordingly. Add changes to support frameshape switch
based on mclk frequency for given master.

Change-Id: I0c4dd69b743f83b45eeed73f27ad10e878b9244b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-09-11 15:52:47 +05:30
Linux Build Service Account
c523b34cc0 Merge "soc: swr-mstr: Add wakeup irq support from afe using event notifier" 2018-09-03 23:29:30 -07:00
Linux Build Service Account
de663528f9 Merge "soc: swr-mstr: Add support to listen for DC detection" 2018-09-03 23:29:29 -07:00
Linux Build Service Account
8e9f1b03cb Merge "soc: swr-mstr: fix noise issue with mono speaker" 2018-09-03 12:15:15 -07:00
Laxminath Kasam
f0128ef169 soc: swr-mstr: Add wakeup irq support from afe using event notifier
Register and handle swr wakeup irq from afe, using aud event
notifier codec interrupts during clock stop mode.

Change-Id: I76d250adcaa8af4a413f6274482beb5a3469601d
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-09-03 10:18:47 -07:00
Ramprasad Katkam
68765abe11 soc: swr-mstr: Add support to listen for DC detection
Add support to listen for DC detection event.
Shutdown WSA on receiving DC detection event.
Porting the changes from old master driver to new driver.

Change-Id: I4d323bb8074d447b2969dd01c7129e57160b6c04
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-09-03 10:18:36 -07:00
Ramprasad Katkam
c8d52a1f56 soc: swr-mstr: fix noise issue with mono speaker
Fix noise issue with mono speaker by properly disabling
the previous port config.

Change-Id: I55fde87fcea5c8a7f05ff82a0d8967bc7688882b
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-09-03 15:08:38 +05:30
Laxminath Kasam
4721b16381 soc: swr-mstr-ctrl: porting fix from wcd controller to mstr controller
When temperature on a single wsa881x device is being read,
then soundwire master wakes up both wsa881x devices but
regcache_sync is happening only for one wsa881x device on
which the temperature is being read. This results in
audio playback mute after temperature read. Fix the
regcache sync during temperature read and playback usecase.

Change-Id: Icee46d5105bb449f14855d33bdcb00cf5c77cb91
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-09-03 14:13:00 +05:30
Ramprasad Katkam
14f47cc8a6 asoc: swr-mstr: add rx and tx master frame configuration
Add Rx and TX master frame configuration.

Change-Id: I067931565270e7390d9c5311e0869dfdb6685999
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-08-30 07:48:49 -07:00
Ramprasad Katkam
1f22126590 asoc: swr: master controller fixes for tanggu
Add locking for soundwire fifo operation as same
function call can be used at a time by a different thread
like mbhc, and fix register definitions in header.
Add soundwire slave interrupt clear registers as part of
slave interrupt event in master interrupt handler.

Change-Id: I94d9b7ac09192dbf8aa3248d35956b380430ee0b
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-08-28 22:52:07 -07:00
Ramprasad Katkam
a72eb7843a asoc: swr: Fix logic to retrieve swr slave device handle
Fix issue in the loop logic of retrieving swr slave device handle
by passing device node.

Change-Id: I5c31259b1257de730748b8522537afa9870f24e4
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-08-29 11:21:11 +05:30
Banajit Goswami
06183689db soc: add support for SND event framework
Add support for SND event framework for helping with
notifications among different audio modules/drivers.
The SND event framework functions with a master/client
mechanism, where each client and the master register
with the framework, and then notifies its own status
(UP/DOWN). Each master will share a list of clients it
is interested in, and once all the clients are registered
and notified UP, the framework's state will be UP. On the
other hand, as and when any one of the client, or the master
reports its state as DOWN while the framework is UP, the
framework state would be changed to DOWN, and all clients
and the master would be let know about the change.

Change-Id: Ief6f26c5d5626c29246472ad71c247d71ee9e92f
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2018-08-22 10:34:32 -07:00
Linux Build Service Account
b94000b1af Merge "asoc: swr: Add new parameters for swr port" 2018-08-10 13:24:08 -07:00
Linux Build Service Account
76cf2831d9 Merge "soc: soundwire: Fix wsa mute issue for stereo playback" 2018-08-10 10:24:46 -07:00
Ramprasad Katkam
9e90df7393 asoc: swr: Add new parameters for swr port
Add wordlength and lanectrl parameters for swr port.

Change-Id: Id36a1b0750b7e8f13e4d1eed6a9abaddc2f39a83
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-08-10 16:11:08 +05:30
Linux Build Service Account
b7d3f59c2a Merge "asoc: codecs: Tanggu TX RX changes" 2018-08-07 10:00:30 -07:00
Linux Build Service Account
7c16441c93 Merge "Asoc: swr: Handle MBHC and IRQ interrupts from tx slave" 2018-08-07 08:53:13 -07:00
Laxminath Kasam
846ad08f10 soc: soundwire: Fix wsa mute issue for stereo playback
When stereo playback start and temperature read
initiated at same time, one of speaker PA bits are
not set in particular race scenario. Handle the
broadcast check in soundwire framework to ensure
broadcast is disabled only when respective gr_sid
slave calls swr_remove_from_group.

Change-Id: I6f82a8c3c0f39dc20c1def09c1728ce4c26c2f5d
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-08-07 10:01:12 +05:30
Laxminath Kasam
3fda075378 soc: swr-wcd-ctrl: Fix wsa mute issue for stereo playback
When temperature on a single wsa881x device is being read,
then soundwire master wakes up both wsa881x devices but
regcache_sync is happening only for one wsa881x device on
which the temperature is being read. This results in
audio playback mute after temperature read. Fix the
regcache sync during temperature read and playback usecase.

Change-Id: I856b96517c629ac685bbc25caabee841037106c8
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-08-07 10:00:07 +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
Vatsal Bucha
6824cec26b Asoc: swr: Handle MBHC and IRQ interrupts from tx slave
Interrupts will be handled by slave driver. This
needs slave pointer to store virtual interrupt and
pass it as a parameter to handle_nested_irq.

Change-Id: I356102a04b4fda7e5863f809cd848d7a82b82f36
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-08-06 07:16:23 -07:00
Laxminath Kasam
144eabc3ee audio: Add support for audio on msmsteppe
Update config file and make rules for msmsteppe
compilation.

Change-Id: I374a0725a7dd36edc9e04652fb07dc719310565c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-07-31 11:23:46 +05:30
Laxminath Kasam
fbcaf32428 soc: swr-ctrl: Update master controller for WSA mute issue
Add delay in master read/write fifo for slave register update.
Handle pm runtime for clock disable to happen after usecase.

Change-Id: Ia1abc4ee3db500cbc8f42b9f08760463fb77acef
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-07-20 10:48:35 +05:30
Linux Build Service Account
d1db0560b8 Merge "soc: pinctrl-lpi: Add support to read lpi offset from device tree" 2018-06-20 08:52:49 -07:00
Linux Build Service Account
d69c855747 Merge "ASoC: Add support for audio drivers compilation on kernel-4.14" 2018-06-19 12:12:33 -07:00