From 4b10da62b4f09157398d67dabba57b1bca7091be Mon Sep 17 00:00:00 2001 From: Sheetal Date: Mon, 21 Apr 2025 13:13:20 +0000 Subject: [PATCH] NVIDIA: SAUCE: ASoC: tegra: Add isomgrbw missing integration PCM device initialization missed while backporting the change to downstream kernel. http://nvbugs/4453712 Fixes: c884c85567ae("ASoC: tegra: Add interconnect support") Signed-off-by: Sheetal Reviewed-by: Sameer Pujar Reviewed-by: Sharad Gupta Signed-off-by: Kartik Rajput Acked-by: Noah Wager Acked-by: Jacob Martin Signed-off-by: Noah Wager --- sound/soc/tegra/tegra_isomgr_bw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/tegra/tegra_isomgr_bw.c b/sound/soc/tegra/tegra_isomgr_bw.c index 16a160f4d0e3..062613126f94 100644 --- a/sound/soc/tegra/tegra_isomgr_bw.c +++ b/sound/soc/tegra/tegra_isomgr_bw.c @@ -22,7 +22,7 @@ int tegra_isomgr_adma_setbw(struct snd_pcm_substream *substream, struct tegra_adma_isomgr *adma_isomgr = admaif->adma_isomgr; struct snd_pcm_runtime *runtime = substream->runtime; struct snd_pcm *pcm = substream->pcm; - u32 type = substream->stream, bandwidth = 0, pcm_id; + u32 type = substream->stream, bandwidth = 0; int sample_bytes; if (!adma_isomgr) @@ -41,8 +41,8 @@ int tegra_isomgr_adma_setbw(struct snd_pcm_substream *substream, * No action if stream is running and bandwidth is already set or * stream is not running and bandwidth is already reset */ - if ((adma_isomgr->bw_per_dev[type][pcm_id] && is_running) || - (!adma_isomgr->bw_per_dev[type][pcm_id] && !is_running)) + if ((adma_isomgr->bw_per_dev[type][pcm->device] && is_running) || + (!adma_isomgr->bw_per_dev[type][pcm->device] && !is_running)) return 0; if (is_running) { @@ -63,12 +63,12 @@ int tegra_isomgr_adma_setbw(struct snd_pcm_substream *substream, adma_isomgr->current_bandwidth += bandwidth; } else { - adma_isomgr->current_bandwidth -= adma_isomgr->bw_per_dev[type][pcm_id]; + adma_isomgr->current_bandwidth -= adma_isomgr->bw_per_dev[type][pcm->device]; } mutex_unlock(&adma_isomgr->mutex); - adma_isomgr->bw_per_dev[type][pcm_id] = bandwidth; + adma_isomgr->bw_per_dev[type][pcm->device] = bandwidth; dev_dbg(dev, "Setting up bandwidth to %d KBps\n", adma_isomgr->current_bandwidth);