From c9217a1b829892c0f2a384cbd0138f6f2ace8a35 Mon Sep 17 00:00:00 2001 From: Mohan Kumar Date: Thu, 1 Dec 2022 12:25:41 +0530 Subject: [PATCH] ASoC: tegra: Fix build for Linux v6.1 Upstream Linux kernel commit 3989ade2d1e7 ("ASoC: soc.h: remove num_cpus/codecs") removes the 'num_cpus' member from the 'snd_soc_pcm_runtime' structure because this is also available under the dai_link structure. This breaks building the Tegra ASoC drivers for Linux v6.1 and so update the Tegra ASoC drivers to align the latest mainline. Bug 3772918 Bug 3890034 Change-Id: If436222ec9e9a97acf82d50c5f9ce80e08ca1f1c Signed-off-by: Mohan Kumar Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819691 Reviewed-by: Sameer Pujar Reviewed-by: Sharad Gupta GVS: Gerrit_Virtual_Submit --- sound/soc/tegra/tegra_codecs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra_codecs.c b/sound/soc/tegra/tegra_codecs.c index c530ca6b..26cf7bbe 100644 --- a/sound/soc/tegra/tegra_codecs.c +++ b/sound/soc/tegra/tegra_codecs.c @@ -233,17 +233,17 @@ int tegra_codecs_runtime_setup(struct snd_soc_card *card, rtd = get_pcm_runtime(card, "dspk-playback-dual-tas2552"); if (rtd) { - for (i = 0; i < rtd->num_codecs; i++) { - if (!strcmp(rtd->dais[rtd->num_cpus + i]->name, + for (i = 0; i < rtd->dai_link->num_codecs; i++) { + if (!strcmp(rtd->dais[rtd->dai_link->num_cpus + i]->name, "tas2552-amplifier")) { err = snd_soc_dai_set_sysclk( - rtd->dais[rtd->num_cpus + i], + rtd->dais[rtd->dai_link->num_cpus + i], TAS2552_PDM_CLK_IVCLKIN, aud_mclk, SND_SOC_CLOCK_IN); if (err < 0) { dev_err(card->dev, "dais[%d] clock not set\n", - rtd->num_cpus + i); + rtd->dai_link->num_cpus + i); return err; } }