ASoC: tegra-alt: Fix machine driver

ASRC config was enabled for all chip versions and this leads to
writing in the dai_links array for T210 platforms which is not
acceptable as there was no ASRC present on it. Fix this issue
by having extra runtime compatible check for t210.

Bug 200555164

Change-Id: I3714d4aed77b6cecc262db443219920f872c3e17
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2210518
(cherry picked from commit f9598cb45db19454a77fd78f680cc2b8db50cc7b)
Reviewed-on: https://git-master.nvidia.com/r/2210938
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sameer Pujar <spujar@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>
This commit is contained in:
Mohan Kumar
2019-10-03 09:13:22 +05:30
committed by Sameer Pujar
parent a1372cf4d0
commit be22100ee2

View File

@@ -679,6 +679,8 @@ static void set_dai_ops(struct tegra_machine *machine)
&tegra_machine_compr_ops;
#endif
#if IS_ENABLED(CONFIG_SND_SOC_TEGRA186_ASRC_ALT)
if (!(of_machine_is_compatible("nvidia,tegra210") ||
of_machine_is_compatible("nvidia,tegra210b01"))) {
/* set ASRC params. The default is 2 channels */
for (i = 0; i < 6; i++) {
int tx = TEGRA186_DAI_LINK_ASRC1_TX1 + i;
@@ -689,6 +691,7 @@ static void set_dai_ops(struct tegra_machine *machine)
machine->asoc->dai_links[rx].params =
&tegra_machine_asrc_link_params[i];
}
}
#endif
}