mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Zhao <etoyz688@gmail.com>
Cc: Yang Zhao <etoyz688@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	Mario Limonciello <mario.limonciello@amd.com>,
	Jiawei Wang <me@jwang.link>,
	"end.to.start" <end.to.start@mail.ru>,
	Venkata Prasad Potturu <venkataprasad.potturu@amd.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: amd: yc: Fix bug where quirks code was skipped due to early return.
Date: Tue, 10 Dec 2024 20:11:02 +0800	[thread overview]
Message-ID: <20241210121106.497223-1-etoyz688@gmail.com> (raw)

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


                 reply	other threads:[~2024-12-10 12:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241210121106.497223-1-etoyz688@gmail.com \
    --to=etoyz688@gmail.com \
    --cc=broonie@kernel.org \
    --cc=end.to.start@mail.ru \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=me@jwang.link \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=venkataprasad.potturu@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®