mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: amd: yc: Fix bug where quirks code was skipped due to early return.
@ 2024-12-10 12:11 Yang Zhao
  0 siblings, 0 replies; only message in thread
From: Yang Zhao @ 2024-12-10 12:11 UTC (permalink / raw)
  Cc: Yang Zhao, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Mario Limonciello, Jiawei Wang, end.to.start,
	Venkata Prasad Potturu, linux-sound, linux-kernel

Replaced the early return with DMI quirks code.
This ensures that DMI quirks are executed.

Fixes: 4095cf872084 ("ASoC: amd: yc: Fix for enabling DMIC on acp6x via _DSD entry")
Signed-off-by: Yang Zhao <etoyz688@gmail.com>
---
 sound/soc/amd/yc/acp6x-mach.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
index e38c5885dadf..9dfbcd00b897 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -23,7 +23,7 @@ SND_SOC_DAILINK_DEF(acp6x_pdm,
 
 SND_SOC_DAILINK_DEF(dmic_codec,
 		    DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec.0",
-						  "dmic-hifi")));
+							      "dmic-hifi")));
 
 SND_SOC_DAILINK_DEF(pdm_platform,
 		    DAILINK_COMP_ARRAY(COMP_PLATFORM("acp_yc_pdm_dma.0")));
@@ -583,13 +583,12 @@ static int acp6x_probe(struct platform_device *pdev)
 
 	if (is_dmic_enable && wov_en)
 		platform_set_drvdata(pdev, &acp6x_card);
-	else
-		return 0;
-
-	/* check for any DMI overrides */
-	dmi_id = dmi_first_match(yc_acp_quirk_table);
-	if (dmi_id)
-		platform_set_drvdata(pdev, dmi_id->driver_data);
+	else {
+		/* check for any DMI overrides */
+		dmi_id = dmi_first_match(yc_acp_quirk_table);
+		if (dmi_id)
+			platform_set_drvdata(pdev, dmi_id->driver_data);
+	}
 
 	card = platform_get_drvdata(pdev);
 	if (!card)
@@ -601,8 +600,8 @@ static int acp6x_probe(struct platform_device *pdev)
 	ret = devm_snd_soc_register_card(&pdev->dev, card);
 	if (ret) {
 		return dev_err_probe(&pdev->dev, ret,
-				"snd_soc_register_card(%s) failed\n",
-				card->name);
+				     "snd_soc_register_card(%s) failed\n",
+				     card->name);
 	}
 	return 0;
 }
-- 
2.47.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-10 12:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-10 12:11 [PATCH] ASoC: amd: yc: Fix bug where quirks code was skipped due to early return Yang Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®