Commit Graph

30 Commits

Author SHA1 Message Date
Jonathan Hunter
ce50d17412 ASoC: tegra-alt: Remove redundant clock utils function
The function tegra_alt_asoc_utils_set_parent() is only used by the Orca
Viper machine driver. Update the Orca Viper machine driver to use the
tegra_alt_asoc_utils_set_extern_parent() instead which also sets the
extern parent clock and remove the redundant
tegra_alt_asoc_utils_set_parent() function.

Please note that the Orca Viper platform is no longer supported and in
future will be removed.

Bug 1665446

Change-Id: I51ac355e92a1c3dbb65f94bff081edd1837f7bc6
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2016369
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Jonathan Hunter
dba7c3da80 ASoC: tegra-alt: Remove unused variables
Remove unused variables for the various Tegra sound driver files. Note
that these variables are not flagged by the compiler because they are
initialised but they are not actually used anywhere.

Bug 1665446

Change-Id: Id10bb316780813565847492b19025ba369188c09
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2016368
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Mohan Kumar
4a6ee45df7 ASoC: tegra-alt: fix dynamic pinmux config
Currently dynamic pinmux configuration for I2S, DMIC, DSPK modules
are present in runtime_resume() function which can be called even
without any audio usecase active on these modules. So this destroy
the purpose of programming pinmux only during stream active state.

This change has moved the dynamic pinmux code in these drivers to
dai ops callback of startup and shutdown which will ensure the
pinmux config happens only during the stream playback/capture.

Bug 200497486

Change-Id: I3c4e8a96d0d066b38c9aba5ffe530db5cf5246fc
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2029745
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Jonathan Hunter
a7307c2d19 ASoC: tegra-alt: Add mixer controls for configuring the ADX
The AMX driver provides userspace mixer controls for configuring the
module. This provides a much simpler way of configuring and using the
AMX versus the alternative where the AMX is configured via device-tree.

Currently, the ADX can only be configured by device-tree and so for
users that wish to use the ADX both the device-tree and audio machine
driver need to be updated. Add similar mixer controls for the ADX that
exist for the AMX so that the ADX can be easily configured via
userspace.

Bug 2382530

Change-Id: Idf8dc0ba3fe4bf30168c01318b9a5e169a8985d6
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1987561
(cherry picked from commit 1b2a25b33f972193ce25ee0b61d612266a9cae05)
Reviewed-on: https://git-master.nvidia.com/r/1991929
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Nicolin Chen
8b02cb388e ASoC: tegra-alt: Do not select all modules for T210REF_MOBILE_ALT
Not all platforms have to support modules such as AMX, ADX, MVC, and
etc, so selecting all the audio modules by default is wasting memory
for them.

This patch drops DMIC, AMX, ADX, AFC, MVC, OPE and ADSP from CONFIG
SND_SOC_TEGRA_T210REF_MOBILE_ALT, and keeps only essential ones. In
order not to break any exisiting use case, these CONFIGs will be set
to "def_tristate" so all platforms build them as usual. This means
anyone who does not need them will need to specifically disable them
in the defconfig.

Meanwhile, this patch adds IS_ENABLED() check at corresponding files.

Bug 2284925

Change-Id: I2e3853b5499046fc8de7256899c30d764160aebe
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1803446
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Dara Ramesh
edd7311299 ASoC: tegra-alt: add dma_set_mask parse
Add dma-mask parsing in device tree for pcm
driver to start allocations start from the
specified address and downwards.

Bug 200385990
Bug 200406253

Change-Id: I0443f9535eab76f24437544c5e684d9bc63f4b85
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1755673
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Jon Hunter
064224a173 ASoC: tegra-alt: Create jack mixer dynamically
For debug/testing purposes the Tegra audio machine driver creates a
'Jack-state' mixer control to allow the user to query/set the jack
state. Currently, the machine driver assumes that there is only one
jack, but on Galen there can be two jacks if the supermodule is used.
Therefore, add a helper function to create the 'Jack-state' mixer
control dynamically and append the codec prefix-name to the mixer
control name so that it has a unique name.

Bug 2187533

Change-Id: Iac4351c319944e3d2c01d053fce9ea390c3f8db1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1748232
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Jon Hunter
01681eb712 ASoC: tegra-alt: Simplify jack detection
Linux jack detection for the generic Tegra machine driver is handled via
the sound soc-jack framework which registers the jack as an input device
with the kernel. Jack events are communicated to userspace via the
'jack_switch_types' definitions in 'sound/core/jack.c'.

Given that we no longer use the switch interface for communicating jack
events, simplify the mixer control code for the 'Jack-state' by aligning
the jack states with the 'snd_jack_types' enum and removing references
to the SWITCH_STATE definitions. This also allow us to completely remove
the jack notifier because we no longer need to convert the jack state
definitions.

Tested on Tegra186 Jetson-TX2 and Tegra194 Galen.

Bug 2187533

Change-Id: I61fdd32d79a1ec345578ebad57faf705e57343bd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1746207
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Viraj Karandikar
91f76fee05 tegra-alt: dmic: add start callback support
For mystique, after firmware is loaded on iM501, a message needs
to be sent to iM501 to enable hardware bypass mode when a raw
capture is required. This message should be sent after DMIC/PDM
clock is enabled and before actual capture starts (DMIC is enabled).

Since iM501 driver is a module, add a calllback function support.
iM501 driver registers a callback function on boot. DMIC driver
calls this function at the beginning of each capture session.

Bug 200404157

Change-Id: I49e81837232eec0393f4e8720f456a5d8137d945
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1725785
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Mohan Kumar
e0b1e0193b ASoC: tegra-alt: support dynamic prod settings
Add driver support for DSPK/DMIC/I2S for dynamic prod
settings.

Bug 200388806

Change-Id: I0c7d77a36a7c5d213b707321605cbe41d5b182d9
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1691746
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Mohan Kumar
6451c05c89 ASoc: tegra-alt: support dmic parent rate control
Certain platform requirement needs all the dmic controller
clocks to be in phase due to external hardware requirement.So
keeping this in mind changing parent rate to dmic clk rate to make
sure there is not phase difference between dmic controller's output
clocks as the dmick controller divider value will be 1 and it's a bypass.

Bug 200373630

Change-Id: Ie0016fe01c130efe4c45132c50b0783e8ee6404b
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1686105
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
Tested-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Jon Hunter
65ddde1a01 ASoC: tegra-alt: Add kcontrols for testing I2S TDM modes
To validate I2S TDM modes (such as dsp-a and dsp-b) on the Jetson TX2
we can jumper wire the I2S1 interface to the I2S2 interface and use
one I2S interface as the master and one as the slave. However, to test
TDM modes we need to re-configure both the I2S framing mode (dsp-a,
dsp-b, etc) as well as the I2S bit-clock and frame-sync master/slave
settings from userspace. Add kcontrols for re-configuring the frame
mode and master mode settings for I2S1 and I2S2 on the Jetson TX2.

Bug 2046053
Bug 1993721
Bug 200356303

Change-Id: Ifab626e9c92bf8e80a1797ea8f0f56d2232e8073
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1676733
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Viraj Karandikar
0be98410ad tegra-alt: dmic: add LR select control
Add LR select control to configure channel location

Bug 200373630

Change-Id: Iba8cbfac7908645a369b5167db68ddd8f991a5d5
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1691173
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Dara Ramesh
3b5bfa8461 ASoC: tegra-alt: remove SWITCH API's
- remove SWITCH driver API's and instead
  use jack input events to report  HEADSET
  status.

Bug 200395440

Change-Id: I3fc3a645331d044bf3b2fd7b890cee33f2b28246
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1671224
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Tested-by: Sameer Pujar <spujar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Jon Hunter
29defcb5da ASoC: tegra-alt: Fix restoration of PEQ settings
On Tegra194 the PEQ gain and shift settings are not maintained across
AUD powergate transitions. Simply by reading the gain/shift settings
from userspace via amixer/tinymix continuously causing the AUD powergate
to power cycle the settings can be seen to continuously change.

Commit bc4166782c07 ("tegra-alt: Enable ahubram prog. in hw_params")
partially fix the problem by re-configuring the gain/shift settings to
their default settings each time the PEQ is in-use, however, even with
this change, if the user changes the settings, they are not preserved.

On Tegra186 the PEQ gain and shift settings are not preserved after
transitioning to low power states such as SC7. There is a difference
between the PMC on Tegra186 and Tegra194, such that Tegra194 no longer
supports SRAM retention for the AUD powergate which explains why the
device behave slightly differently.

To ensure that the PEQ gain and shift settings are preserved for all
devices add save and restore helpers and invoke them from the OPE
runtime-pm handlers.

Bug 2072802
Bug 200375657

Change-Id: Ic867bcfd355a50eba8ba538a9471722b824df3c5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1679636
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Mohan Kumar
9216eec344 ASoC: tegra_alt: add DMIC enable/disable functions
Add functions to enable/disable DMIC and export them.
These are needed in case where DMIC clock needs to be
enabled without any capture use case.

Bug 200391366

Change-Id: Ia35f897de4e1ffa1b78e04c5c26004c867fa1d0d
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1661680
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
Tested-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Hariharan Sivaraman
540f5ece2c tegra-adsp-alt: increase num of plugins
Increase number of supported plugins by ADSP
from 10 to 20

Bug 2048629

Change-Id: I44410252635fafb4b4d484ce75e642286e954ab2
Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1664190
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Jon Hunter
6191131ae7 ASoC: tegra-alt: Fix return type for getting the bclk ratio
The functions tegra_machine_get_bclk_ratio() and
tegra_machine_get_bclk_ratio_t18x() have a return type of unsigned int
but can return a negative error code on failure. This may cause users
of this function to get a very large bit clock ratio. Although it is
improbable that the bit clock ratio will ever be large enough to
overflow a signed integer, it is best to avoid changing the type of
the bit clock ratio variable. Therefore, return the bit clock ratio
via a pointer passed to the functions tegra_machine_get_bclk_ratio()
and tegra_machine_get_bclk_ratio_t18x().

Bug 2025176

Change-Id: Ia6e9a1ef68f53ebb594746f812de65a18269925f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1655982
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Sameer Pujar
f99b7b3ed9 ASoC: tegra-alt: update mic only jack state
h2w switch state is updated for mic only jack detection. This is needed
for intel HDA header support, where only mic jack insertion is possible
and corresponding change is needed in WiredAccessoryManager.java for
android to switch routing to jack capture.

Following are the h2w switch state values,
0 - nothing connected
1 - both mic and hp jacks connected
2 - hp jack connected
3 - mic jack connected

Changed enum names for clarity.
Note: WiredAccessoryManager.java on Android uses these switch values for
identifying the jack type and hence these values should not be altered
independently.

Bug 200360770

Change-Id: I326b2704bdf68698ebad67ebab77ab07de743214
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1642236
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Jon Hunter
efb17516ee ASoC: tegra-alt: Improve support for I2S RJM
For I2S right-justified mode, the Tegra210 I2S driver assumes that
the bclk rate is 64*fs and the data is always 16-bit and therefore
sets the data offset to 16. However, the Tegra TRM states ...

 "In RJ mode, data starts (r/2 – n) SCLKs after the LRCK edge
  (offset = r/2 – n, where r = number of SCLKs per LRCK,
  n = number of bits/sample)."

Therefore, the Tegra I2S driver should set the data position
depending on the bit-clock ratio setting and the data format
(16-bit or 32-bit) that is used.

Bug 2027259

Change-Id: Ic87b33aa19f956f4ac35c1444e4cd4148fe0ba4d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1649565
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Asha Talambedu
ce578ecac2 tegra-alt: Enable ahubram prog. in hw_params
ahub ram programmed during coedc init is getting
reset. Therefore, need to reinitialise in hw_params

Bug 200375657

Change-Id: Ie59eb09ccc325d50a90b8f9e0c38ba7e14de472f
Signed-off-by: Asha Talambedu <atalambedu@nvidia.com>
(cherry picked from commit 043e22ae245946f5391c5ddf4a475be45698cbe8)
Reviewed-on: https://git-master.nvidia.com/r/1640135
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Mohan Kumar
168d0bf316 ASoC: tegra-alt: set cya bit for amx auto disable
Set cya bit for amx auto disable feature to work.

Bug 200375235

Change-Id: I174453f97e9fd173bf1cb8d5e65d29766618ec6c
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1625291
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Mohan Kumar
4c26e42c42 ASoC: tegra-alt: control for dspk osr value
Add support for mixer controls for dspk osr value.

Bug 200369647

Change-Id: I551898357d2545c7e1b41e57593820c6126fb16e
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1609919
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2022-09-29 15:30:21 +05:30
Sameer Pujar
5a7c6d070c ASoC: tegra-alt: add arad dai link
This adds arad as part of xbar dai link, which acts as dummy link.
This is required for dapm path completion and cif configuration.
Since there will be conflicts, similar arad link code is removed
from auto machine drivers.

Bug 200364103

Change-Id: I55245c3d6f9efac0d3ea8ef9d485080e106adbac
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1609942
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2022-09-29 15:30:21 +05:30
Mohan Kumar
7f64062c25 ASoC: tegra-alt: control for dmic osr value
Add support for mixer controls for dmic osr value.

Bug 200369647

Change-Id: I06e180dae328fd7d7e7e0a27cad2b31e5747cd2f
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1608824
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Mohan Kumar
b9596edbb5 ASoC: tegra-alt: fix aud mclk reset
aud mclk reset is available only for t186, so move all the code
related to aud mclk reset under t186 chip check.

Bug 200365570

Change-Id: I2a7ff5eff583b138dca507336408779f5228a2d8
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1600769
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Mohan Kumar
e9c51282bb ASoC: tegra-alt: Discontinue APE SPDIF support
As there are no real usecase for SPDIF currently and lack of
clock support for SPDIF, discontinuing the spdif support.

Bug 200355251

Change-Id: I9734915715ec21aabbf999c08cea588cf2fcb08f
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1584289
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Sameer Pujar
d8cccfd903 ASoC: tegra-alt: remove devm_clk_put() APIs
Clock resource is associated with a device and when the device
is unbound, the resource is freed. Drivers get the clock handle
by using devm_clk_get(). No need for an explicit devm_clk_put()
to release the clock, this is handled automatically when the
device lifetime ends.

Bug 200346429

Change-Id: I0885723e3a9a3fb41e54524ddacc3415f571576c
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1574311
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
2022-09-29 15:30:21 +05:30
Dipesh Gandhi
93e212df79 ASoC: tegra-alt: add amx auto disable support
Change adds support for auto enable/disable feature
in amx for t19x onward soc family.

Jira EMA-876

Change-Id: I8b9a63e6d186984632da6114c29e5fb8a0537b61
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1573651
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
Sameer Pujar
681288f1be ASoC: tegra-alt: restructure drivers
Because of the way in which Makefile is defined for the drivers,
each driver file is getting compliled as separate *.ko module.
This results in loading of all the *.ko modules for maintaining
the functionality.

Current patch re-organises makefile and thus terga-alt structure,
 - utils/ : will provide all the helper functions,
 - machine_drivers/ : lists all the machine specific drivers we have,
 - tegra-alt/*.c : ahub module drivers, each would have a separate
   driver module,
 - include/ : all the local header files needed for driver modules

Bug 200346429

Change-Id: Ic659879a0d6e8ef48b0d79b81059fba4c069591e
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1559745
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30