diff mbox series

[01/27] ASoC: Intel: sof_ssp_amp: remove dead code

Message ID 20231127152654.28204-2-peter.ujfalusi@linux.intel.com (mailing list archive)
State Accepted
Commit 9425039741e84120fc936fbb5a9a7a1410fd9409
Headers show
Series ASoC: Intel: Link handling rework and fixes | expand

Commit Message

Péter Ujfalusi Nov. 27, 2023, 3:26 p.m. UTC
From: Brent Lu <brent.lu@intel.com>

This patch fixes a dead code problem when calculating BE ID for each
HDMI-In link.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Balamurugan C <balamurugan.c@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
---
 sound/soc/intel/boards/sof_ssp_amp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/intel/boards/sof_ssp_amp.c b/sound/soc/intel/boards/sof_ssp_amp.c
index 137ba64254bc..22f37cf3a2ad 100644
--- a/sound/soc/intel/boards/sof_ssp_amp.c
+++ b/sound/soc/intel/boards/sof_ssp_amp.c
@@ -124,6 +124,7 @@  sof_card_dai_links_create(struct device *dev, enum sof_ssp_codec amp_type,
 		/* the topology supports HDMI-IN uses fixed BE ID for DAI links */
 		fixed_be = true;
 
+		be_id = HDMI_IN_BE_ID;
 		for (i = 1; i <= num_of_hdmi_ssp; i++) {
 			int port = (i == 1 ? (sof_ssp_amp_quirk & SOF_HDMI_CAPTURE_1_SSP_MASK) >>
 						SOF_HDMI_CAPTURE_1_SSP_SHIFT :
@@ -138,7 +139,7 @@  sof_card_dai_links_create(struct device *dev, enum sof_ssp_codec amp_type,
 			links[id].name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-HDMI", port);
 			if (!links[id].name)
 				return NULL;
-			links[id].id = fixed_be ? (HDMI_IN_BE_ID + i - 1) : id;
+			links[id].id = be_id;
 			links[id].codecs = &snd_soc_dummy_dlc;
 			links[id].num_codecs = 1;
 			links[id].platforms = platform_component;
@@ -147,6 +148,7 @@  sof_card_dai_links_create(struct device *dev, enum sof_ssp_codec amp_type,
 			links[id].no_pcm = 1;
 			links[id].num_cpus = 1;
 			id++;
+			be_id++;
 		}
 	}