This change is for adding dap-io regulator support for i2s
devices through device tree.
Change-Id: Ie34a61459c3ff282835a9ae3b1d49e13194da33a
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: http://git-master/r/448787
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
This change is for adding T210 DAI LINK in machine
utility and for cleaning up the grenada machine driver.
Bug 1442940
Bug 1537191
Change-Id: I561048fa01153b429122f8d23dc3cabbb73136f9
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: http://git-master/r/437762
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Tested-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
This change is for adding hwdep device to update AMX/ADX
mapping table so user can access AMX/ADX mapping table through
hwdep device.
Bug 1531057
Change-Id: I3c0053ca6548a05b0a44e30b9d6c4a76f9fc3521
Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-on: http://git-master/r/434526
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
This change is for adding dap pinmux support for i2s
devices through device tree.
pinmux states (tristate enable/disable) are dynamically
controlled based on PM runtime state.
bug 200016630
Change-Id: I63cda853a6e20858984b14d6111697edec1b66f1
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: http://git-master/r/432150
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
This change is for T210 SPDIF driver to be able to program
CIF register so we can test SPDIF driver in T210.
Bug 1442940
Change-Id: I529cb49e9b6c09a064d3ea1dbf3746cb34f0c5f4
Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-on: http://git-master/r/421743
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
- Combine read & write position into one method
- Define & use separate macro for pin type
- Use set_position for sending notifications from ADSP to CPU
- Use set_eos for sending EOS reached from ADSP to CPU
Change-Id: I7df817a8e82a3564380ce712fbab202f0bee9551
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/428915
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Stephen Holmes <sholmes@nvidia.com>
GVS: Gerrit_Virtual_Submit
Add first version of tegra210 ADSP audio ALSA driver. This driver is
responsible for handling all ADSP side audio usecases and for exposing
related control parameters to user-space.
Both compressed and PCM playback is supported by this driver.
Change-Id: Ia447a2261cd689adaf86502fa80d5f60669ac2ff
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/422758
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
The generic machine driver uses 'tegra_asoc_machine' utility to
populate the common XBAR DAI links and then appends the platform
specific DAI links as supplied through platform data.
Bug 1525098
Change-Id: Ib31ca75ccb5477ecc3a1bb46bb8583b9d5f0f40a
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/422878
GVS: Gerrit_Virtual_Submit
Reviewed-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-by: Gajanan Bhat <gbhat@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
This is a preparation change for ADSP audio driver. When audio is
rendered from ADSP, ADSP driver will act as cpu driver and ADMAIF
should act as codec driver. This changes exposes ADMAIF ports as
codec. Each ADMAIF port have two codec DAIs, 'ADMAIF CIF' is the
XBAR facing DAI and 'ADMAIF FIFO' is the ADMA facing DAI.
Change-Id: I1153d6bfc961549f0ade269f5da19c2531d382c0
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/420099
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
This change is to use DMA channel name from DT when pcm driver
requests the dma channel to dma engine.
Bug 1488342
Change-Id: I4b2518ce14caa366b834848571577273c4144ac6
Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-on: http://git-master/r/401167
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
1. Add utility to initialize xbar related dai links
2. Each machine driver intializes the I2S/codec dai links & appends
it to the xbar dai_links exposed by the common utility file.
Bug 1508072
Change-Id: I2e92ead05dbc29293758383f6e937b38da0fc7f3
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/407820
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
1. DAM driver is for SRC support in T124
2. AFC driver is for flow control in T124
Bug 1508072
Change-Id: Ic8ee22976155e0c01864a6d432cb4eefc7005a67
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/402747
Reviewed-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
This machine driver is for E1860-B00 board which has
AK4618 and AD1937 codecs.
Bug 1413475
Change-Id: I275261df331612c1c9232309388b08ae1ca703c9
Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-on: http://git-master/r/337410
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
This driver is for the ahub with using DAPM.
It supports kcontrols to route within the ahub
clients by user space so we can route the memory
to amx, adx and other ahub clients to I2S for
playback/capture.
Bug 1354235
Bug 1373091
Change-Id: Ia43b007de7c1161ce551087428a090ff2bf1e09e
Based-on-work-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-on: http://git-master/r/289919
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
There are a couple issues with system suspend handling in the Tegra
ASoC codec drivers which are:
1. Most drivers the system suspend callback does nothing and this
means that if the codec device is active when suspend occurs then
the codec will not be suspended correctly. This has been seen to
cause system crashes in the I2S driver when the system is suspended
and resuming while audio playback is active.
2. The codec suspend handlers may be called twice when entering
suspend. Suspend handlers should only be called once, but currently
they are called twice; once by the PM core and once when the APE
power-domain is turned off (if it is on when suspend occurs).
Fix the above two problems by:
a). Adding proper system suspend and resume handlers for all codec
drivers, to suspend and resume the device if not runtime PM
suspended on entering suspend.
b). Remove the code to call the PM callbacks from the APE power-domain
code.
Finally, make the system suspend callbacks for these codec drivers
late suspend callbacks to ensure that the sound core has suspended
any on-going activity, before we attempt to suspend these codec
devices.
Bug 200275736
Change-Id: I7f43b8650d972356b0a529404792fe22125dde16
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: http://git-master/r/1488962
(cherry picked from commit 5a7f3ab3d1e6d9d136859b9263b91e3f6998366b)
Reviewed-on: https://git-master/r/1511033
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Linux runtime PM automatically handles the runtime resuming and
suspending of a parent device and therefore, it is not necessary
for a child device to explicitly runtime resume or suspend the
parent.
The various Tegra ASoC codec drivers explicitly runtime resume
and suspend the parent device from within their runtime PM callback
handler. This should not be necessary.
Furthermore, currently the various Tegra ASoC codec drivers are
not suspended correctly if active when system suspend occurs. During
system suspend it is common to directly call the runtime PM callbacks
to suspend and resume the device if active from the system suspend
callbacks. However, the APIs, pm_runtime_get/put(), cannot be called
during system suspend and so the runtime PM callbacks for these codec
drivers cannot be called from the context of the system suspend
callbacks.
Remove the calls to runtime resume and suspend the parent device from
the runtime PM callbacks for the various Tegra ASoC drivers. This will
allow us to fix suspending and resuming of the Tegra ASoC drivers
across system suspend.
Bug 200275736
Change-Id: I9130d8e1c9f91a439651d279ffdf389474018f92
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: http://git-master/r/1488961
(cherry picked from commit 6ae92527f6948ff484af761c1aa1073f79e13a8a)
Reviewed-on: https://git-master/r/1511032
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Below are the hypothetical scenarios
- Drivers are in suspend state while reboot and PCM Open call from
userspace is received after driver shutdown [APE is power gated
already]
- PM domain handling doesn't ensure proper functionality after driver
shutdown is called
The change handles with the beloe fix
- ALSA PCM Open API first executes runtime resume of each driver.
So need to prevent any reg access in runtime resume of drivers.
- ALSA PCM Open executes ADMAIF startup after runtime resume of
each driver. If ADMAIF startup returns failure based on shutdown,
PCM Open operation will fail, this will break PCM Open path and
will ensure no further ALSA APIs/Callbacks are called.
Bug 200289815
Change-Id: I46060d74b3271a870a0bcfc727972c97e2a73931
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/1475216
Reviewed-on: http://git-master/r/1499116
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-on: http://git-master/r/1502050
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Tested-by: Sachin Nikam <snikam@nvidia.com>
Adding more configurability to the dspk driver where,
user can program the thresholds as per the requirement.
If the control is not set, default configuration of
zero threshold is used.
Bug 200283222
Change-Id: I9cbf94c5553e11aeb0b4cc85ceba29fc74ceabc2
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: http://git-master/r/1319913
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
GVS: Gerrit_Virtual_Submit
As per HW Bug 200208400 we need to clear asrc
interrupt twice to update interrupt status
register.
Bug 200219757
Change-Id: I741f27cca155e45f0112f505eed415852f13e219
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/1233840
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>
Support dynamic pinmux settings for dspk, this change will help
to runtime configure the pinmux register to use pinmuxed path.
Change-Id: Ie87499a822854d8f077530f49d5516883c987839
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/1181859
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Driver support for all the APE interfaces. Also cleanup the machine
driver code.
Bug 1782976
Change-Id: Ifdaa3b19de661afd5231d9bface6fc9547f0eb3c
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/1177588
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
In lane enable functionality currently
we don't check the existing state of lane.
Change make sure to do nothing if current
state is same as previous state.
Bug 200179285
Change-Id: Ic7492fbc5aabd093d49dba546d0fb17282a30bcf
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
(cherry-picked from commit ebf11df77e0322e473fc4fa6ae0020135f7c6ea9)
Reviewed-on: http://git-master/r/1160156
Reviewed-on: http://git-master/r/1158151
(cherry picked from commit bd562cf6b19bf605f749617335da151baa9f0a71)
Change-Id: I3f61d79ffd88e479fe320e06cd19f7c6183bf112
Reviewed-on: http://git-master/r/1167575
GVS: Gerrit_Virtual_Submit
Tested-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
Changes are done as needed for kernel 4.4 transition.
- select SND_SOC_COMPRESS for offload
- register jack at card level
- use snd_soc_dapm_to_codec() to access codec from widget
- use CONFIG_SND_SOC_TEGRA210_ADSP_ALT for adsp code
Bug 200193757
Change-Id: I0adbc9936d9d99f49d05af5def628af4d3c86790
Signed-off-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-on: http://git-master/r/1154433
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
The dapm field of the struct snd_soc_codec is removed, to access
dapm field use snd_soc_codec_get_dapm()
Change-Id: I2bf7f89058bd65baf2d89ffa926af9fe1e418927
Signed-off-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-on: http://git-master/r/1157272
GVS: Gerrit_Virtual_Submit
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Added ability to disable h/w compensation
Disabling h/w compensation would work well
with mem-to-io
Added ability to set WORD_CNT for input and
output thresholds
Bug 200194803
Change-Id: Iea8942105e61ce307ad394d75de59836796f3fbb
Signed-off-by: Sidharth <svarier@nvidia.com>
Reviewed-on: http://git-master/r/1135127
(cherry picked from commit 1b25a112a33b249696a87b8527afc1d132a9cbba)
Reviewed-on: http://git-master/r/1142696
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>
Changing frac max to unsigned int as
mask for asrc frac is 0xffffffff.
Bug 200185841
Change-Id: Ic47896b47fa5e4a5e4eb7320a69d6b94747715a5
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/1113391
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>