Commit Graph

3083 Commits

Author SHA1 Message Date
Arun Shamanna Lakshmi
d4f3d20ef1 ASoC: tegra-alt: Fix coverity issues in amx/adx
Coverity ID: 28085, 28086

Bug 1416640

Change-Id: Ic8fd3b9569d02ebee9225158ca59376b580cbb04
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/606415
Reviewed-by: Automatic_Commit_Validation_User
2022-09-29 15:30:21 +05:30
Sachin Nikam
a1b537c669 sound: soc: tegra-alt: Fix sparse warnings
Make local data and funcs static.

Bug 200032218

Change-Id: Ib2270a19df65b53f1b547efd3f4bc7bcfc0f15a4
Signed-off-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-on: http://git-master/r/600190
2022-09-29 15:30:21 +05:30
Sumit Bhattacharya
8bd1b0a7ae ASoC: tegra-alt: Add APE power domain support
1. Add APE power domain support to xbar and adsp driver.
2. Also add runtime PM support in adsp audio driver to ensure APE PM
   domain works properly.
3. Add code in xbar system suspend callback to support calling of all
   xbar child driver system suspend. This is required to properly
   support APE PM domain.

Bug 200039212

Change-Id: Ieb937b05e39d4e980872745e3b6580bca3eb6956
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/555433
2022-09-29 15:30:21 +05:30
Viraj Karandikar
dbae79bb60 sound: soc: tegra-alt: fix sparse warnings
Fix sparse warnings. Errors left in tegra210_adsp_alt.c are due to
non-NV code in soc.h

Bug 200032218

Change-Id: I0b17487684dddb7249e3c0c8132c5a1453f596ce
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/591743
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
Ajay Nandakumar
dd98011be3 include: linux: rename MSGQ_MSG_SIZE
Renaming MSGQ_MSG_SIZE to MSGQ_MSG_WSIZE as this macro returns the
size in word rather in bytes.

Bug 200025742
Bug 1526538

Change-Id: I7f1dd858fa9c8fc779d80afda95b66d66d7bd554
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Reviewed-on: http://git-master/r/558844
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2022-09-29 15:30:21 +05:30
Dara Ramesh
e38df8b899 asoc: tegra-alt: t210: admaif: remove clk apis
remove admaif clk get apis from admaif driver.

admaif module is under ahub clock and no separate
clock for this module.

Change-Id: I5354aff4aba5c1d3c5c759704e35e53803e67242
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: http://git-master/r/555497
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
2022-09-29 15:30:21 +05:30
Sumit Bhattacharya
1f080ab1eb ASoC: tegra-alt: T210 power management support
Set idle_bias_off for all t210 xbar modules to ensure module runtime
suspend/resume works when module is idle.

Ensure regcache is synced back to hardware during runtime resume so
that register content does not get lost if it is written during
runtime suspend state.

Add suspend APIs for all module to mark regcache dirty while device
goes into suspend to ensure register values does not get lost across
system suspend/resume.

Change-Id: I2828beeed859df4f8084dd70bbcde5ed62f2525c
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/555028
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:30:21 +05:30
Sumit Bhattacharya
36359cf890 ASoC: tegra: Enable/Disable parent runtime pm
Instead of using duplicate clock of "d_audio" for all AHUB modules
get/put runtime pm reference of the parent module from runtime_pm
suspend/resume routine of all AHUB modules. This will ensure AHUB
xbar is up before other drivers tries to access any register. Also
it will ensure both d_audio and APE clocks are enabled when needed.

Bug 200042312

Change-Id: I0346728f15b135bb619de40fbd3fc440a5505940
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/554863
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:30:21 +05:30
Arun Shamanna Lakshmi
5066fe1a3a ASoC: tegra-alt: Use flat regcache
When using RBTREE cache, there can be allocations the first time
a register is accessed. This can cause an attempt to schedule while
atomic in the case that the regmap is using a spinlock. This can be
resolved by using a flat cache.

Bug 200041820

Change-Id: Id69592cd5fadbb5ad9ccfdbb1f184733a332512c
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/552940
2022-09-29 15:30:21 +05:30
Arun Shamanna Lakshmi
684a5ee845 ASoC: tegra-alt: Reset T210 driver modules
1. Add soft reset for I2S, ADMAIF, AMX and ADX modules
    to handle successive start/stop scenarios
2. Flush AMX/ADX map table before sucessive mapping changes
3. Restore tx/rx_crtl, tx/rx_cif_crtl, i2s_ctrl
    and offset after soft reset

Bug 1442940

Change-Id: Id275fccf32857f897080f40ec2d9f25a532c262f
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: http://git-master/r/457198
2022-09-29 15:30:21 +05:30
Arun Shamanna Lakshmi
8f48438124 ASoC: tegra-alt: Improvement of t210 drivers
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
2022-09-29 15:30:21 +05:30
Dara Ramesh
be0ba9e3e9 ASoC: tegra-alt: SLCG: Implement MBIST WAR for i2s
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
2022-09-29 15:30:21 +05:30
Rahul Mittal
e0d96a36e9 ASoC: tegra-alt: Allow mono in dai params
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>
2022-09-29 15:30:21 +05:30
Arun Shamanna Lakshmi
0b660ae855 ASoC: tegra-alt: Create t210ref machine driver
This change is for creating t210ref machine driver for automotive

Bug 1442940
Bug 1537191

Change-Id: I6f13a5acdd36973ed79bd950b5ffeba19246a4d6
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: http://git-master/r/499969
2022-09-29 15:30:21 +05:30
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