1. Add link name to platform data for unique
identification of the dai link
2. Remove set_sysclk from I2S and retreive
srate from params
3. Try to retrieve fsync-width from DT file,
if not default as 31
4. Add mono channel support in FSYNC mode
in machine driver
5. Fix dai_link_idx API to get link_idx
from unique name identifier
6. Add tdm_slot mask API for tx/rx mask settting
7. Initialize the DAPM dai link work struct for
non-pcm dai-links to avoid kernel crash
during powercycle in low power mode.
8. Add slot_size for AMX and ADX
9. Add clk_out_rate for 8kHz in automotive machine driver
Bug 1442940
Change-Id: Iaebdd7e12b8490021a9034afa351cdbc1d1d5d38
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: http://git-master/r/500553
I2S MBIST comes up in random state and therefore
SLCG needs to be toggled OFF and ON before the I2S
controller can be used normally.
This patch implements WAR in response to SLCG notifier.
- Set I2S controller in master mode.
- toggled I2S SLCG OFF and ON.
Bug 200035860
Change-Id: I17b727034a33adf12f64eed0673665f26f4267c0
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: http://git-master/r/538402
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Allow mono config in dai params where missing.
Required for BT SCO where user space needs to
open alsa device with mono config
Bug 200032907
Change-Id: I2456700ea618dbf84ecece1cf45e67a6a9b14616
Signed-off-by: Rahul Mittal <rmittal@nvidia.com>
Reviewed-on: http://git-master/r/499374
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Tested-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Do not initialize ADSP using work queue. Initialization will be
done from userspace by setting mixer control "ADSP init" to 1.
Bug 1552863
Change-Id: I0fd435b581a4fb9e851e8505e451c52cf0746df2
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/499313
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Add decoder and APM input paths to SPKPROT-SW so that it can be
used in CPU playback path.
Change-Id: I072f0532bfdbb2d4f40af5b9ee4ebd03ad5e9689
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/491628
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Do not de-assert ape clock as it's already been enabled
and de-asserted by boot-loader.
Change-Id: I4eb1e7ad6063313f0bdb95910a9bbb80e44c46cb
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/489185
'ape' clock must be enabled when AHUB is getting used. So adding
'ape' clock enable/disable support as part of t210 xbar runtime PM.
Change-Id: I55b5d89923c6bfb959d5f1e2b279ea5326e2a660
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/457397
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
1. Add I2S data offset based on the operational mode
2. Initialize the edge control and LRCK polarity based on DAIFMT
Bug 1540017
Change-Id: I0ceb461f94ad0ac1f5e134054080e83f526355e9
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/451182
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Tested-by: Dara Ramesh <dramesh@nvidia.com>
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>