Commit Graph

4469 Commits

Author SHA1 Message Date
Viraj Karandikar
3cc29c8795 ASoC: tegra-alt: don't init ADSP at boot
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>
2022-09-29 15:30:21 +05:30
Arun Shamanna Lakshmi
193082c2b1 ASoC: tegra-alt: Fix byte mask for AMX for 512fs
Bug 1540137

Change-Id: I51d006721407e2bf66d2c9dd461ca228754a9079
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/499649
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
2022-09-29 15:30:21 +05:30
Viraj Karandikar
35d4af07b9 asoc: tegra-alt: es755: enable ope
Bug 1549576

Change-Id: I14cdaed09906fdc6b91c30e9a63e4a8b967be480
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/495594
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
2022-09-29 15:30:21 +05:30
Viraj Karandikar
90f2e2cfdd ASoC: tegra-alt: add input paths to SPKPROT-SW
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>
2022-09-29 15:30:21 +05:30
Nitin Kumbhar
532aa568ac TEMP: ASoC: tegra-alt: remove ape de-assert
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
2022-09-29 15:30:21 +05:30
Nitin Kumbhar
9fbc937df9 TEMP: ASoC: tegra-alt: enable ADSP init at boot
Change-Id: I1f6b8d94cb9d9552308dacd0b440c5f668269255
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/489186
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:30:21 +05:30
Viraj Karandikar
83eb4aa738 TEMP: ASoC: tegra-alt: disable ADSP init at boot
Change-Id: I904d839e65a4c501ae65840eff3d071ca177bfd1
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/487487
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
2022-09-29 15:30:21 +05:30
Dara Ramesh
e710c8e594 asoc: tegra-alt: es755: mobile machine driver
Bug 1547407

Change-Id: I67fd661703d1b295359645cb5788b7d0fe3f518d
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: http://git-master/r/487769
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
2022-09-29 15:30:21 +05:30
Dara Ramesh
b1f54d2e24 ASoC: tegra-alt: mobile: fix codec clock
fix codec clock settings and i2s regualtor.

Change-Id: I9f1b06f312a262f1d17c6f329ae026508f99e2c9
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: http://git-master/r/461332
Reviewed-by: Rahul Mittal <rmittal@nvidia.com>
2022-09-29 15:30:21 +05:30
Sumit Bhattacharya
bfbe01c566 ASoC: tegra-alt: Add ape clock support
'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>
2022-09-29 15:30:21 +05:30
Dara Ramesh
f33ec6b80b asoc: tegra-alt: t210: remove system fpga code
-remove system fpga clock code from mobile
machine driver.

Change-Id: I045887b13ed9727063ee05a01af42ef29c573c75
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: http://git-master/r/457338
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
2022-09-29 15:30:21 +05:30
Sumit Bhattacharya
0b7e079a9d ASoC: Tegra-alt: Add tegra210 OPE driver
Add tegra210 ope, peq and mbdrc driver.

Change-Id: I2fa00b053343d7e2824a0001c3d41420462fe8d7
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/439630
GVS: Gerrit_Virtual_Submit
Reviewed-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
2022-09-29 15:30:21 +05:30
Junghyun Kim
6f662309f7 ASoC: tegra-alt: enable clock driver for T210
This change is for enabling clock driver by removing CONFIG_MACH_GRENADA

Bug 1442940
Bug 1537191

Change-Id: I6373df9ee225fc379eafc187b7b13a83580b7fca
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: http://git-master/r/454221
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
2022-09-29 15:30:21 +05:30
Arun Shamanna Lakshmi
185683e8dd ASoC: tegra-alt: Add ASoC driver for IQC module
Bug 1442940

Change-Id: Ic346d9b596989306aa5612f01a76bed1e221a834
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/451055
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
2022-09-29 15:30:21 +05:30
Arun Shamanna Lakshmi
caba3c784a ASoC: tegra-alt: Fix I2S operational modes in T210
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>
2022-09-29 15:30:21 +05:30
Dara Ramesh
b9a38c783a ASoC: tegra-alt: T210 mobile machine driver
This machine driver is for T210ref mobile platforms.

Change-Id: I648b7abe6a8177b023d30c8960fd61accb9a073e
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: http://git-master/r/436477
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
2022-09-29 15:30:21 +05:30
Dara Ramesh
62ef54a3a3 asoc: tegra-alt:t210: add dap-io regulator support
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>
2022-09-29 15:30:21 +05:30
Junghyun Kim
4f1f08d562 ASoC: tegra-alt: Update T210 machine utility
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>
2022-09-29 15:30:21 +05:30
Viraj Karandikar
5d20d03f94 ASoc: tegra-alt: Update ELF names for ADSP apps
Change-Id: I2e4a6c87ad6fb53d7fb0728c7472aa88a9fa6ba8
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/449208
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Stephen Holmes <sholmes@nvidia.com>
2022-09-29 15:30:21 +05:30
Songhee Baek
1f9341aa31 ASoC: tegra-alt: select hwdep to be compiled
This change is needed by tegra-alt asoc driver compilation with
hwdep device.

Bug 1531057

Change-Id: I39a7c97acb4bb360df4e366658d0705b5df910bb
Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-on: http://git-master/r/448517
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Tested-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
Reviewed-by: Bob Johnston <bjohnston@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
2022-09-29 15:30:21 +05:30
Songhee Baek
8bc6cf9eee ASoC: tegra-alt: adding tegra_machine_hwdep device
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>
2022-09-29 15:30:21 +05:30
Rahul Mittal
831e3f9c2f ASoC: tegra-alt: Add Tegra210 DMIC driver
Add Tegra210 DMIC driver
Add DAI links and DAPM map for dmic
Add unit fpga specific clock programming

Bug 1456155

Change-Id: I80475761716dd2965627596500e77aa3f66e0ac9
Signed-off-by: Rahul Mittal <rmittal@nvidia.com>
Reviewed-on: http://git-master/r/422710
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2022-09-29 15:30:21 +05:30
Viraj Karandikar
27feeff0db ASoc: tegra: use event instead of semaphore in APM
Change-Id: I299142b5493e7fe63a6e8ddbc1f3ff4c978afd7f
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/437745
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:30:21 +05:30
Dara Ramesh
b5df7e81f5 asoc: tegra-alt: t210: add dai ops for bclk_ratio
added dai ops for setting up bit clock ratio.

Change-Id: I5dde689d8228070911eb772d65f2d619f3a96d91
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: http://git-master/r/437135
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2022-09-29 15:30:21 +05:30
Dara Ramesh
81b5f0ecbd ASoC: tegra-alt: t210: add pinmux support for i2s
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>
2022-09-29 15:30:21 +05:30
Songhee Baek
b097ef0c7b ASoC: tegra-alt: Support mono in T210 AMX/ADX
This change is for supporting mono input in AMX and ADX.

Bug 1442940

Change-Id: If3f51ddfafa56ed1474e110d2bbfe45450b714cd
Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-on: http://git-master/r/433237
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: Sumit Bhattacharya <sumitb@nvidia.com>
2022-09-29 15:30:21 +05:30
Songhee Baek
0c17f1f661 ASoC: tegra-alt: Unblock T210 SPDIF CIF setting
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>
2022-09-29 15:30:21 +05:30
Viraj Karandikar
9efe03d6de ASoC: tegra-alt: add support for sw spkprot plugin
Change-Id: I85402289234273d757470af73664282b2300f03e
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/432493
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
2022-09-29 15:30:21 +05:30
Viraj Karandikar
ca169a7687 ASoC: tegra-alt: clean APM methods and structures
- 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
2022-09-29 15:30:21 +05:30
Viraj Karandikar
57466bf754 ASoC: tegra-alt: Fix capture via ADSP
- Fix pointer function for PCM
- Pass rutime buffer size to ADSP
- Intialize msg handler for APMOUT
- Don't enable/disable ADMAIF when using ADSP
- Update mp3dec plugin name

Change-Id: I5a9c18f92dd37616567fe6ba7b622cbaa4da58ae
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/424045
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
2022-09-29 15:30:21 +05:30
Sumit Bhattacharya
4dffef50fa ASoC: tegra-alt: Add tegra210 ADSP audio driver
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>
2022-09-29 15:30:21 +05:30
Arun Shamanna Lakshmi
f230df8cfe ASoC: tegra-alt: Implement generic machine driver
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>
2022-09-29 15:30:21 +05:30
Sumit Bhattacharya
9f9764c597 ASoC: tegra-alt: Expose ADMAIF as codec
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>
2022-09-29 15:30:21 +05:30
Arun Shamanna Lakshmi
318dc455c5 ASoC: tegra-alt: Add kcontrols for SFC output rate
1. Add kcontrols to vary SFC output rate
2. Rename d_audio to ahub clock during xbar probe

Bug 1442940

Change-Id: If86bd476822c6cfe07af8fbc7d7ead8b21e2a7d2
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/417232
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-by: Rahul Mittal <rmittal@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
2022-09-29 15:30:21 +05:30
Songhee Baek
790ac51a9d ASoC: tegra_alt: Use DMA channel name from DT
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>
2022-09-29 15:30:21 +05:30
Arun Shamanna Lakshmi
d9c7333753 ASoC: tegra-alt: Add get/put handlers for T210 xbar
Bug 1442940

Change-Id: I633c144a4f22b1c9d41f656a47331358b46d43d7
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/412204
Reviewed-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
2022-09-29 15:30:21 +05:30
Arun Shamanna Lakshmi
1ce137c34c ASoC: tegra-alt: machine driver cleanup contd ..
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>
2022-09-29 15:30:21 +05:30
Arun Shamanna Lakshmi
0f8143d152 ASoC: tegra-alt: Add DAM and AFC driver
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>
2022-09-29 15:30:21 +05:30
Songhee Baek
bed2911d62 ASoC: tegra-alt: Add T210 grenada machine driver
This machine driver is for grenada platform with unit fpga.

Bug 1442940

Change-Id: Ifda6d493b115986f02b5497107a0f0894f73697d
Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/397316
(cherry picked from commit 0fbf59a029a0e275766002a10abe4ecdc31c8064)
Reviewed-on: http://git-master/r/402619
Tested-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
2022-09-29 15:30:21 +05:30
Songhee Baek
f9bb9e84e5 ASoC: tegra-alt: T210 AHUB drivers
This driver is for T210 AHUB components.

Bug 1442940

Change-Id: If6b33bc89cfc273f8024b7e4f6d644c170c2fe4f
Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/397314
(cherry picked from commit 3972fbeccbec85f74a0ed959212382db5471e65d)
Reviewed-on: http://git-master/r/355184
Tested-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Rahul Mittal <rmittal@nvidia.com>
2022-09-29 15:30:21 +05:30
Songhee Baek
7a66be7f52 ASoC: tegra-alt: vcm30t124: Add dai link for spdif
This change is for adding spdif dai in vcm30t124
machine driver.

Bug 1423733

Change-Id: I1a0bfed96092d0b18b6b6b8ece2b742de3054630
Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-on: http://git-master/r/344452
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bob Johnston <bjohnston@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2022-09-29 15:30:21 +05:30
Songhee Baek
1b120344b3 ASoC: tegra-alt: Add machine driver for E1860-B00
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>
2022-09-29 15:30:21 +05:30
Songhee Baek
3b8791b781 ASoC: tegra-alt: add spdif driver
This change is for adding spdif driver in tegra-alt ASoC.

Bug 1423733

Change-Id: Ic52b58ab9bd0e8cb82e7834a5d1d2f3f87550bf8
Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-on: http://git-master/r/339601
GVS: Gerrit_Virtual_Submit
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Reviewed-by: Gajanan Bhat <gbhat@nvidia.com>
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
2022-09-29 15:30:21 +05:30
Songhee Baek
062304a1d1 ASoC: tegra-alt: vcm30-t124 machine driver
This machine driver is for the vcm30_t124 platform supporting
dual codecs(wm8731 and ad1937).

Bug 1373091

Change-Id: Icdde8b5e9067dc3365009d6e6262a964986dae37
Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-on: http://git-master/r/290004
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Manoj Gangwal <mgangwal@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2022-09-29 15:30:21 +05:30
Songhee Baek
64a271ff0b ASoC: tegra-alt: Alternative DAPM-based driver
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>
2022-09-29 15:30:21 +05:30
Jon Hunter
f8c3f7a29e ASoC: tegra-alt: Fix system suspend handling
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>
2022-09-29 15:30:21 +05:30
Jon Hunter
a29581fc2e ASoC: tegra-alt: Fix parent runtime PM handling
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>
2022-09-29 15:30:21 +05:30
Mohan Kumar
85eae8d6ff ASoC: tegra-alt: Avoid reg access after shutdown
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>
2022-09-29 15:30:21 +05:30
Mohan Kumar
33c2382438 ASoC: tegra-alt: xbar unification changes
Unify the Makefile and Kconfig for xbar driver to support all chips.

Bug 200257345

Change-Id: If3eea1ca146ce5c4b0ee7b8b6cdd6ef642a5b698
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/1326993
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
2022-09-29 15:30:21 +05:30
Mohan Kumar
02bf5978b4 ASoC: tegra-alt: unify the fpga driver
Unify the fpga driver

Bug 200257345

Change-Id: I5a5ee7bd660ece145272e9d552125abedff7b859
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/1326848
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
2022-09-29 15:30:21 +05:30