Earlier hardcoded pll base rates were leading to fractional divider
values for i2s multichannel config while deriving i2s bclk.
Hence updated clock rates and logic for >2 channel configs for t186ref
and higher boards such that the dynamic range between max plla and min plla
is < 35 MHz. Also, if desired bclk is above limit, the case will be
declared as not supported. Note that new facility will be used only in l4t
machine driver.
Bug 200702569
Change-Id: I83aba425f6dde30a1f29f85b16a1bbbebba14198
Signed-off-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2491744
(cherry picked from commit e0fe51d5e7ced073eb618e19836f88a023f70bdc)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2613507
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tegra platforms support multiple external codecs which in some cases
require initial setup or runtime setup. Since common machine driver is
used, it uses DAI link names passed from DT to apply specific settings.
Use the same logic for Tegra audio graph card driver as well. In doing
so separate out codec setup part and move the same to tegra_codec.c
source file. This is reference in current downstream machine driver
and future Tegra audio graph card driver.
Going ahead alternate solution need to be identified to avoid dependency
on DAI link names. Upstream generic audio graph driver does not support
such method and passing DAI link names from DT won't be entertained in
upstream.
Bug 200692799
Change-Id: I40d134e89405fd8bb2d9aebfe2bce82816b545bd
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Resolve linux-5.8-rc3 merge conflicts in k5.9 branch
(currently tracking mainline with linux-5.7.0)
Fix build errors in k5.9 branch after merge of linux-5.8-rc3
bug 200617764
Change-Id: I3a358fef6e8b7c5926fd0de05a03cee539547e8f
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Commit 209e5c7b4144 ("drivers: fix k5.9 build errors") fixes few build
errors, associated with audio, which are required for initial kernel-5.9
setup. However there are functional issues on TOT, where APE sound card
registration fails. The root cause of this problem is because of below
listed changes in ASoC core:
- 'snd_soc_ops' member is removed from 'component_driver' structure.
The PCM callbacks now have to be directly populated in the component
driver structure. ADMAIF and ADSP drivers are updated and Tegra PCM
driver is cleaned up accordingly.
- 'of_node' and 'dev_name' members are removed from 'snd_soc_codec_conf'
structure now and instead wrapper for these is provided under 'dlc'.
- Signature of 'snd_soc_get_pcm_runtime()' has changed now and it no
more accepts DAI link name as argument. But since we require specific
'rtd' based on DAI link names, the older version is duplicated in
machine driver.
- There are changes in trigger() order for start and stop now.
*_trigger_start()
|
|--> rtd trigger()
|--> component trigger()
|--> dai trigger()
*_trigger_stop()
|
|--> dai trigger()
|--> component trigger()
|--> rtd trigger()
Above is resulting in following:
|-> start ADMA
|-> start ADMAIF
|-> ...
|-> stop ADMAIF
|-> stop ADMA (unable to stop DMA channel print is seen here)
Current order in downstream for previous kernel versions is:
|-> start ADMA
|-> start ADMAIF
|-> ...
|-> stop ADMA
|-> stop ADMAIF
This issue is addressed by invoking DMA trigger() call from ADMAIF dai
trigger() itself to avoid the error during stop.
Bug 2845498
Change-Id: I1011555f51f5e0b0a448125a46b47df50e366d6f
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.9/+/2353304
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This reverts commit 9ac3457ed88631ef035fe9aa6baa4ce0cf2d5d5d
There are some conficts mainly because the revert is being done
on 5.4 kernel drivers and these are resolved manually.
Tegra can support S24_LE and the way it works is as follows.
* S24_LE is a 32-bit container with 24-bit data in LSBs and the
DMA is configured for 32-bit.
* When ADMAIF client channel is configured for 24-bits, it picks
up 24-bit(starting from LSB) from the ADMAIF FIFO. Higher 8-bits
are sign extended.
Earlier the confusion was primarily because of the way data gets
picked up from FIFO and the way data conversion happens at CIF.
Bug 200590182
Bug 2845498
Change-Id: Icd0d9fb8fdd0a08d39cb45d23b3f441eaba5a98c
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.4/+/2308468
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
There seems to be kernel panic happening when rt5659_set_jack_detect()
is called from the machine driver.
For now the jack detection is disabled to unblock 5.4 bringup and
can be separately tracked. A FIXME item is put. Once the issue is
resolved this patch can be reverted.
Bug 2845498
Change-Id: Ieb67e783a1dbcfb9ebbeb2bf301a818c94e38457
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
This patch enables Tegra machine driver used on Jetson platform.
Tegra210 and later Jetson platforms use the same machine driver.
Following is the summary from the patch:
* Enable the driver build in defconfig
* Remove "tegra-alt" ASoC utility file
* Renmae "tegra-alt" parser source file "tegra_asoc_dt_parser.c"
to "tegra_asoc_machine.c" and move it to "tegra" directory.
* Similarly "tegra_asoc_machine_alt.h" is renamed to
"tegra_asoc_machine.h" and moved to "tegra".
* Updated "tegra" ASoC utility files for supporting Tegra210 and
later.
* Rename machine driver file.
* The older parsing code is removed.
Bug 2845498
Change-Id: I42d9d2da59febb99ce00a29ce65d7a16f96b1327
Signed-off-by: Sameer Pujar <spujar@nvidia.com>