Commit graph

50 commits

Author SHA1 Message Date
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
Aditya Bavanari
d7ec18ce76 soc: pinctrl-lpi: Add support to read lpi offset from device tree
In order to support variable lpi offsets from different chipsets
read the lpi offset values of gpio groups from device tree. Any
target which uses LPI has to define this gpio offset table
in device tree.

Change-Id: I3bd54017e4571deb9a189cfd6903698887a6413a
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-06-19 16:27:22 +05:30
Ramprasad Katkam
e80ab29892 asoc: swr: Add config flag for New soundiwre driver compilation
Add new kconfig to control compilation of new soundwire driver

Change-Id: I6eb8b30de9f6dc2ffa152b6dfffbc2b02d0a990c
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-06-19 00:36:27 -07:00
Sudheer Papothi
8d34b2e801 ASoC: Add support for audio drivers compilation on kernel-4.14
Add support for audio drivers compilation on kernel-4.14.

Change-Id: Id7689cef4ae7cdb6711fed386d2a6b0d427b3fc3
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2018-06-19 03:43:54 +05:30
Ramprasad Katkam
9f040f339f Asoc: swr: New soundwire master driver
New soundwire master driver to support multi master
for Talos/vipertooth.

Change-Id: I2616b940339e8f3d8d120e6705247d7bd1656bac
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-06-18 12:07:47 +05:30
Ramprasad Katkam
e38aed40db Asoc: swr: Bus Driver changes to support new master driver
soundwire bus driver changes to support new soundwire
master driver for Talos/vipertooth.

Change-Id: I70e52a72edd80abc72ccb99b29b1a642debec257
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-06-14 00:39:50 +05:30
Mangesh Kunchamwar
0bf1f57c59 asoc: config: configuration update for QCS405 machine driver
Add configuration updates for enabling QCS405 machine driver

Change-Id: I5a426730388aeafcdd6fb2e7c6d4cc7a0af78e1c
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-06-12 19:20:17 +05:30
Vignesh Kulothungan
9ca8dc327c soc: soundwire: Add support to listen for DC detection
Add support to listen for DC detection event.
Shutdown WSA on receiving DC detection event.

CRs-Fixed: 2244131
Change-Id: Ifecab8bb9862976a647a161bad4c202b6e6459c7
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-06-07 09:00:56 -07:00
Salendarsingh Gaud
ad978894b9 Configure CONFIG_ARCH to enable compilation
Use CONFIG_ARCH_SM6150 for Talos to enable
proper compilation.

Change-Id: I14e06122116c431bf4b99da3a061d165f68e0d4f
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
2018-05-16 17:48:18 +05:30
Abhishek Arpure
6d74b706f0 Initial Android target definition for msmsteppe
Add MSMSTEPPE in the makefile rules to enable
compilation for SDM640.

Change-Id: I36437404d98229c8b292fd63304498122d8c8687
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
2018-04-26 18:28:03 +05:30
Xiaoyu Ye
60c105d5c9 audio-kernel: update chipset name
Update all audio drivers to use updated chipset name in
files, functions, architecture specific configurations
and the device tree compatible strings.

Change-Id: I507948866213ddb8806edea71a57c1f29ce7e71b
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2018-04-18 10:34:42 -07:00
Linux Build Service Account
5f0b5040eb Merge "ASoC: Add audio support for sdmshrike" 2018-04-16 10:12:01 -07:00
Banajit Goswami
f58e5fcf72 audio-kernel: update chipset name
Update all audio drivers to use updated chipset name
in architecture specific configurations and the device
tree compatible strings.

Change-Id: Ib1abe643c6914c1b0b57ef110c7b60e23e356d97
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2018-04-11 16:18:52 -07:00
Sudheer Papothi
e3842cf831 ASoC: Add audio support for sdmshrike
Add audio support for sdmshrike.

Change-Id: I0b86ab7b123a3215617b81a645202785f6810d02
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2018-04-11 10:53:22 -07:00
Linux Build Service Account
4a46b4ca0a Merge "soc: soundwire: use pm runtime function to tear down soundwire master" 2018-03-21 01:40:56 -07:00
Linux Build Service Account
5d5790373e Merge "ASoC: Change PRODUCT_OUT to OUT in Kbuild" 2018-03-12 12:13:54 -07:00
Xiaojun Sang
f7dd63a169 soc: soundwire: use pm runtime function to tear down soundwire master
Use pm_runtime_put_sync_suspend to tear down soundwire master.
It makes sure the process is synced with the autosuspend call
flow.

Change-Id: Ib4feccd905bcbf046e58bd5eaffde40ee391feda
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2018-03-08 15:20:55 -08:00
Linux Build Service Account
f1ed0f04bf Merge "ASoC: Fix WSA enumeration failure" 2018-03-08 04:02:53 -08:00
Meng Wang
e61ddb01f8 ASoC: Change PRODUCT_OUT to OUT in Kbuild
Update module symbol folder from PRODUCT_OUT to OUT.

Change-Id: I4542c3d2b5e9e39b69f15954ef425c1915a58456
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2018-03-07 11:18:35 +08:00
Linux Build Service Account
9ebd03032c Merge "ASoC: rmmod fixes for audio drivers" 2018-03-02 23:16:37 -08:00
Laxminath Kasam
30ad751aac ASoC: rmmod fixes for audio drivers
For remove module(rmmod), update drivers
to cleanup resources and allow insert module
again without any issue.

Change-Id: Iddc6e5e11d986359afd3100bf3c5eab70cb1c1eb
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2018-03-01 16:02:06 +08:00
Laxminath Kasam
55c9551773 ASoC: Fix WSA enumeration failure
In SDM450, WSA reset pin is shared for both WSA left
and right speakers. When reset pin toggled, both devices
enumerate and can be filled in any order in SWRM_DEV list.
But get_logical_address loops only once for first slave
addition and fails if the device entry is present at second
in SWRM_DEV list. Update logic of get_logical_address to
loop through max devices possible.

CRs-Fixed: 2196399
Change-Id: Ie31cea5a9b22e09a3c5c01e177cd1b78e8d2f28d
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-02-28 21:56:56 -08:00
Vidyakumar Athota
39a430ca29 swr-wcd-ctrl: update soundwire slave logical device number
Soundwire slave logical device number is not updated properly for
all the devices. Because of this, slave devices are pointed to wrong
register regmap. Update logical device number properly for all the
slave devices.

Change-Id: Ic480585301d8e53500714bc136e23e95ac52b13c
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2018-02-28 21:55:17 -08:00
Meng Wang
5fddb8d532 ASoC: enable audio modules for msmnile
Add audio config files and Change Android.mk, Makefile
and Kbuild to enable audio modules for msmnile target.

Change-Id: If6acabe2cd2074d688b810de3f48e6c60dfe9d22
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2018-02-15 16:39:58 -08:00
Meng Wang
3c88f61439 ASoC: update softlink for internal.h, core.h and pinctrl-utils.h
update softlink for internal.h, core.h and pinctrl-utils.h for sdm855

Change-Id: I3e92e8da1ab1bbfce7fbb92c6997af22777925dc
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2018-01-23 14:39:15 +08:00
Laxminath Kasam
942d1c6ed1 audio: Enable audio compile for 8953
Add support for audio compile for 8953.

Change-Id: I37ef20b44aecba8ffc9a7d1d346bf83a9115ad1b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-12-29 16:44:10 +05:30
Asish Bhattacharya
5faacb3a7e ASoC: allow drivers to compile both static and dynamic
Based on where the code is synced the driver should allow
both static and dynamic linked compilation.
Also remove __exit for modules loaded from another common
init/exit functions.

Change-Id: Ib58f152002aba3af4446f9bbd9b82c279212bd0a
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2017-12-07 19:57:27 +05:30
Laxminath Kasam
6bb3a96984 ASoC: Add support for qcs605 for dlkm
Update make files to extend dlkm support for qcs605

Change-Id: Icf736fb66ca12966f4c6cd72bb906eb32899868a
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-11-09 14:58:12 +05:30
Laxminath Kasam
8b1366a648 Audio: DLKM support for all audio modules
Switch to DLKM for all audio kernel modules.

Change-Id: I6a96023a21f655f873531af9ace81f2b01eb0f58
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-11-02 13:42:09 +05:30
Linux Build Service Account
d36dc15e53 Merge "asoc: sdm660: update cpu_dai_name for quin_tdm" 2017-10-25 09:56:55 -07:00
Meng Wang
921b95f9a2 audio-lnx: soc: pinctrl-lpi: fix rmmod issues
Deregister lpi with audio notifier when removing driver to
avoid crash when rmmod and insmod again.

Change-Id: Ibcaf272e6405ef8403b3ac66af5572050fa1092e
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2017-10-17 19:27:57 -07:00
Rohit Kumar
7fccd584b6 soc: pinctrl-lpi: update sizeof lpi offset to 32bit
Update sizeof lpi register offset to 32 bit to
accommodate all register offset for sdm670.

Change-Id: I9a3fdb56f9faf6c0aff627cbedaa54db606d2434
Signed-off-by: Rohit Kumar <rohitkr@codeaurora.org>
2017-10-10 19:34:27 +05:30
Laxminath Kasam
8f7ccc2e6f audio-lnx: Add latest snapshot for audio drivers.
Propagate the changes based on latest snapshot
for audio kernel source tree at below cutoff of
kernel msm-4.9 -
(040750bfa78 -
 "Revert "ARM: dts: msm: Add DT node for aop-qmp
  clock controller on SDM845 v2"")

CRs-Fixed: 2104096
Change-Id: I0927c40b3a188dbf892e7ec4c1c7810953724929
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-09-04 20:12:56 +05:30
Laxminath Kasam
38070be30b audio-lnx: Add latest snapshot for audio drivers.
Propagate the changes based on latest snapshot
for audio kernel source tree at below cutoff of
kernel msm-4.9 -

(aed56b2df75 - "drm/msm/sde: update te vsync enable sequence change")

Change-Id: I7ed5102146986b81e5cb9ca55432360b3549b60c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-08-24 03:53:42 -07:00
Laxminath Kasam
605b42f92c audio-lnx: Rename folders to new flat structure.
Kernel audio drivers can be categorised into below folders.
asoc - ALSA based drivers,
asoc/codecs - codec drivers,
ipc - APR IPC communication drivers,
dsp - DSP low level drivers/Audio ION/ADSP Loader,
dsp/codecs - Native encoders and decoders,
soc - SoC based drivers(pinctrl/regmap/soundwire)

Restructure drivers to above folder format.
Include directories also follow above format.

Change-Id: I8fa0857baaacd47db126fb5c1f1f5ed7e886dbc0
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-08-18 16:56:12 -06:00