From 1be6c649b147b4e957e18aae9bee5690f53ed22e Mon Sep 17 00:00:00 2001 From: Sheetal Date: Fri, 20 Dec 2024 06:37:47 +0000 Subject: [PATCH] NVIDIA: SAUCE: ALSA: hda/tegra: Revert the HDA reset property check To be in sync with upstream kernel, revert the reset property check. As HDA has reset property will define it in DT. http://nvbugs/4788373 Signed-off-by: Sheetal Reviewed-by: Sameer Pujar Reviewed-by: Mohan kumar Signed-off-by: Vishwaroop A Acked-by: Noah Wager Acked-by: Jacob Martin Signed-off-by: Noah Wager --- sound/pci/hda/hda_tegra.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c index 6ac300ec1130..d8635248e4ed 100644 --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c @@ -494,7 +494,7 @@ static const struct hda_tegra_soc tegra234_data = { }; static const struct hda_tegra_soc tegra264_data = { - .has_hda2codec_2x_reset = false, + .has_hda2codec_2x_reset = true, .has_hda2hdmi = false, .has_hda2codec_2x = false, .input_stream = false, @@ -536,29 +536,27 @@ static int hda_tegra_probe(struct platform_device *pdev) return err; } - if (reset_control_get_count(&pdev->dev) > 0) { - hda->resets[hda->nresets++].id = "hda"; + hda->resets[hda->nresets++].id = "hda"; - /* - * "hda2hdmi" is not applicable for Tegra234. This is because the - * codec is separate IP and not under display SOR partition now. - */ - if (hda->soc->has_hda2hdmi) - hda->resets[hda->nresets++].id = "hda2hdmi"; + /* + * "hda2hdmi" is not applicable for Tegra234. This is because the + * codec is separate IP and not under display SOR partition now. + */ + if (hda->soc->has_hda2hdmi) + hda->resets[hda->nresets++].id = "hda2hdmi"; - /* - * "hda2codec_2x" reset is not present on Tegra194. Though DT would - * be updated to reflect this, but to have backward compatibility - * below is necessary. - */ - if (hda->soc->has_hda2codec_2x_reset) - hda->resets[hda->nresets++].id = "hda2codec_2x"; + /* + * "hda2codec_2x" reset is not present on Tegra194. Though DT would + * be updated to reflect this, but to have backward compatibility + * below is necessary. + */ + if (hda->soc->has_hda2codec_2x_reset) + hda->resets[hda->nresets++].id = "hda2codec_2x"; - err = devm_reset_control_bulk_get_exclusive(&pdev->dev, hda->nresets, + err = devm_reset_control_bulk_get_exclusive(&pdev->dev, hda->nresets, hda->resets); - if (err) - goto out_free; - } + if (err) + goto out_free; hda->clocks[hda->nclocks++].id = "hda"; if (hda->soc->has_hda2hdmi)