Skip to content

Commit

Permalink
ASoC: Intel: sof_ssp_amp: remove dead code
Browse files Browse the repository at this point in the history
This patch fixes a dead code problem when calculating BE ID for each
HDMI-In link.

Signed-off-by: Brent Lu <[email protected]>
  • Loading branch information
brentlu authored and plbossart committed Nov 10, 2023
1 parent 9eafbd6 commit 976fea5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sound/soc/intel/boards/sof_ssp_amp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 :
Expand All @@ -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;
Expand All @@ -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++;
}
}

Expand Down

0 comments on commit 976fea5

Please sign in to comment.