mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
There are test cases in ap_audio, which check for different data formats and producer/consumer modes for Tegra I2S and external codec I2S. Add these controls for a full GVS coverage. Two types of DAI links are handled: - Normal/codec2codec DAI links where the DAI mapping is done by default between Tegra and external codec I2S. So just calling legacy tegra_machine_add_i2s_codec_controls() API from override driver is good enough. - For DPCM case, the DAIs are not directly mapped and thus codec is dummy for Tegra I2S. Hence for this DAPM function snd_soc_dapm_dai_get_connected_widgets() is used to find the connected codec widget and apply the complementary DAI format setting. Also use this opportunity to cleanup Linux version code check. It is now recommended to define a macro for the relevant kernel version and macro name is related to what actually is changing for a kernel version. Bug 4451662 Bug 4453772 Change-Id: I881838411af5498e4d7f1dec76b3c11ad05de12b Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3097585 GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com> Reviewed-by: Sharad Gupta <sharadg@nvidia.com> Reviewed-by: Mohan kumar <mkumard@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com>