Some of the audio drivers have been upstreamed recently as part of
following series, https://lkml.org/lkml/2020/7/21/1357.
In upstream, DPCM solution is proposed which is different from what
is currently used in downstream. Hence there are conflicts related
to audio routing. To resolve the differences use 'CONFIG_TEGRA_DPCM'
checks. Once the DPCM proposal gets accepted and all remaining
drivers are updated to work with DPCM, the config and legacy routing
can be dropped.
K5.9 removes snd_soc_component_read and uses prototype
of snd_soc_component_read32. Hence update the call in tegra210_ahub.c
Bug 200597174
Change-Id: I9e563e3d8a62f335ba8c22397c0750bf29810d3d
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
The Inter-IC Sound (I2S) controller implements full-duplex, bi-directional
and single direction point to point serial interface. It can interface
with I2S compatible devices. Tegra I2S controller can operate as both
master and slave.
This patch registers I2S controller with ASoC framework. The component
driver exposes DAPM widgets, routes and kcontrols for the device. The DAI
driver exposes I2S interfaces, which can be used to connect different
components in the ASoC layer. Makefile and Kconfig support is added to
allow to build the driver. The I2S devices can be enabled in the DT via
"nvidia,tegra210-i2s" compatible binding.
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1595134890-16470-5-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Following changes are pushed as part of this commit:
- Update copyright signature as per new format.
- Remove references to "_ALT_" in header macros.
- Fix copyright year for I2S, DMIC, DSPK, ADMAIF and XBAR drivers.
- Fix file name in source header for Machine Utility driver.
Bug 2845498
Change-Id: I18b040a9d48a86a33f3ac6b6932d55e81d6414ac
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.9/+/2354014
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
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>
AHUB and few components have been pushed for upstream review. Though the
changes are still under review, we can leverage the work done on upstream
5.x and use the same here on 5.4 kernel. This helps to align the downstream
code. Any changes that happen because of upstream review can be cherry
picked here. If we plan for any downstream changes, upstream patch needs to
be pushed to keep the code in sync.
As of today current snapshot is pulled from v3 of AHUB series,
http://patchwork.ozlabs.org/project/linux-tegra/list/?series=159664
Above series was worked on later versions of linux-next and hence following
are the changes required for porting back on 5.4
* tegra_pcm_new() and tegra_pcm_free() are exposed from tegra_pcm.c and
component driver callbacks use these.
* Callback functions required for snd_pcm_ops in component driver are
implemented by tegra_pcm.c
* With this ADMAIF driver need not register platform device with ASoC
core.
For components (AHUB, ADMAIF, I2S, DMIC and DSPK) the downsream code
differs in few aspects from the code that was pushed for v3. Some of them
are listed below.
* I2S driver in downstream implements startup()/shutdown() calls for DAI,
which does some setup related to pinconfig and regulators. The same is
true for DMIC and DSPK drivers as well.
* Downstream ADMAIF drivers makes bandwidth requests in startup/shutdown()
calls and has helper function for dumping registers. It also has
additional DAI interfaces which are used for ADSP audio.
* Downstream AHUB driver has DAI interfaces for connecting to all other
modules.
These differences will be cherry-picked as and when it is necessary.
Bug 2845498
Change-Id: Id374967ecae26f6b7334a959fb23308d383c15f2
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Tegra210 and later audio drivers have been using 'tegra-alt' directory
from the beginning. As per the upstream roadmap, we plan to use the
same 'tegra' directory and place all the drivers under it. This patch
thus moves all the drivers to 'tegra' and renames the files accordingly.
The '_alt' suffix is removed from header and source files.
For some files still the '_alt' suffix is retained because 'tegra'
already has the corresponding files. Manual merge of following files is
needed and will be done in separate commits.
* tegra_asoc_utils_alt.c and tegra_asoc_utils.c
* tegra_asoc_utils_alt.h and tegra_asoc_utils.h
* tegra_pcm_alt.c and tegra_pcm.c
* tegra_pcm_alt.h and tegra_pcm.h
* Corresponding Makefile and Kconfig files.
* Source files related to ADSP audio, FPGA, bandwidth manager are not
considered at the moment and will be tracked separately.
Bug 2845498
Change-Id: I51dae3971c72b58d921dc19f0553a83422fd3f9e
Signed-off-by: Sameer Pujar <spujar@nvidia.com>