From 1e35fdd8c55a105c4e2134087d1d0a98253bbfd5 Mon Sep 17 00:00:00 2001 From: Sameer Pujar Date: Thu, 3 Aug 2023 18:02:44 +0000 Subject: [PATCH] ASoC: tegra: Align with upstream DT for compatible and clock name It is nice to have downstream DTB working well with upstream kernel drivers. This gives a flexibile option for users to choose between out-of-tree and upstream audio drivers by selectively adding either of these to deny list. For clock PLLA_OUT0, upstream DT uses 'plla_out0' clock name where as downstream uses 'pll_a_out0'. So aligning with upstream DT makes probe to fail. Thus update the clock name in driver to match upstream DT bindings. The sound DT supports compatibles to either work with upstream or downstream machine drivers. Earlier the source 'tegra_codecs.c' was modified to make it potentially usable for upstream machine driver as well and thus it has upstream compatible checks. This check is now replaced with a flag which is known to be set only during upstream machine driver probe. Bug 4119612 Change-Id: Icd5d97343029e35a5702ff4dc527881fb9277346 Signed-off-by: Sameer Pujar Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2948525 Reviewed-by: Mohan Kumar D Reviewed-by: Dara Ramesh GVS: Gerrit_Virtual_Submit --- sound/soc/tegra/tegra_asoc_utils.c | 6 +++--- sound/soc/tegra/tegra_codecs.c | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/sound/soc/tegra/tegra_asoc_utils.c b/sound/soc/tegra/tegra_asoc_utils.c index fc53e996..a1353859 100644 --- a/sound/soc/tegra/tegra_asoc_utils.c +++ b/sound/soc/tegra/tegra_asoc_utils.c @@ -3,7 +3,7 @@ * tegra_asoc_utils.c - Harmony machine ASoC driver * * Author: Stephen Warren - * Copyright (c) 2010-2022 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2010-2023 NVIDIA CORPORATION. All rights reserved. */ #include @@ -364,9 +364,9 @@ int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data, return PTR_ERR(data->clk_pll_a); } - data->clk_pll_a_out0 = devm_clk_get(dev, "pll_a_out0"); + data->clk_pll_a_out0 = devm_clk_get(dev, "plla_out0"); if (IS_ERR(data->clk_pll_a_out0)) { - dev_err(data->dev, "Can't retrieve clk pll_a_out0\n"); + dev_err(data->dev, "Can't retrieve clk plla_out0\n"); return PTR_ERR(data->clk_pll_a_out0); } diff --git a/sound/soc/tegra/tegra_codecs.c b/sound/soc/tegra/tegra_codecs.c index 26cf7bbe..98d6ec68 100644 --- a/sound/soc/tegra/tegra_codecs.c +++ b/sound/soc/tegra/tegra_codecs.c @@ -2,7 +2,7 @@ // // tegra_codecs.c - External audio codec setup // -// Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved. +// Copyright (c) 2021-2023, NVIDIA CORPORATION. All rights reserved. #include #include @@ -20,11 +20,8 @@ static int tegra_audio_dai_init(struct snd_soc_pcm_runtime *rtd) { - struct device_node *node = rtd->card->dev->of_node; - /* Used for audio graph based sound cards only */ - if (of_device_is_compatible(node, "nvidia,tegra186-audio-graph-card") || - of_device_is_compatible(node, "nvidia,tegra210-audio-graph-card")) + if (rtd->card->component_chaining) return asoc_simple_dai_init(rtd); return 0;