Skip to contentSkip to conversation

ASoC: amd: yc: Fix the wrong return value

PATCH In review Venkata Prasad Potturu 4 participants 6 messages Dec 10, 2024 – Dec 29, 2024

Subsystems (3)
lore
Share & tools
lore

Venkata Prasad Potturu

author reviewer
#0 lore raw

PATCH v2 1/1 ASoC: amd: yc: Fix the wrong return value

With the current implementation, when ACP driver fails to read ACPI _WOV entry then the DMI overrides code won't invoke, may cause regressions for some BIOS versions.

Add a condition check to jump to check the DMI entries incase of ACP driver fail to read ACPI _WOV method.

Fixes 4095cf872084 (ASoC: amd: yc: Fix for enabling DMIC on acp6x via _DSD entry)

---

Changes since v1:
- removed redundant "&& wov_en" check

 sound/soc/amd/yc/acp6x-mach.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
sound/soc/amd/yc/acp6x-mach.c +9 -4
index e38c5885dadf..ecf57a6cb7c3 100644
@@ -578,14 +578,19 @@ static int acp6x_probe(struct platform_device *pdev)
 
 	handle = ACPI_HANDLE(pdev->dev.parent);
 	ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status);
-	if (!ACPI_FAILURE(ret))
+	if (!ACPI_FAILURE(ret)) {
 		wov_en = dmic_status;
+		if (!wov_en)
+			return -ENODEV;
+	} else {
+		/* Incase of ACPI method read failure then jump to check_dmi_entry */
+		goto check_dmi_entry;
+	}
 
-	if (is_dmic_enable && wov_en)
+	if (is_dmic_enable)
 		platform_set_drvdata(pdev, &acp6x_card);
-	else
-		return 0;
 
+check_dmi_entry:
 	/* check for any DMI overrides */
 	dmi_id = dmi_first_match(yc_acp_quirk_table);
 	if (dmi_id)
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 8 lines · Venkata Prasad Potturu

With the current implementation, when ACP driver fails to read ACPI _WOV entry then the DMI overrides code won't invoke, may cause regressions for some BIOS versions.

Add a condition check to jump to check the DMI entries incase of ACP driver fail to read ACPI _WOV method.

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: amd: yc: Fix the wrong return value

      commit: 984795e76def5c903724b8d6a8228e356bbdf2af

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

#2 lore raw

the patch that has already been added to the kernel breaks the work of acp6x and the microphone no longer works, so far I am looking for the reason in this person's code, but it is obvious that this patch breaks the work of acp6x.



author reviewer
#3 lore raw

Hi,

Quoted 1 line · ...

the patch that has already been added to the kernel breaks the work of acp6x and the microphone no longer works, so far I am looking for the reason in this person's code, but it is obvious that this patch breaks the work of acp6x.

We have tested this patch at our end, it's working fine. Could you please share the dev_dbg logs.

With this patch if ACPI method read failure then jump to check dmi entry, if dmi entries also not found then driver won't register sound card it will return -ENODEV.

Could you please share more details on this issue.

#4 lore raw
Quoted 11 lines · potturu venkata prasad

Hi,

Quoted 1 line · ...

the patch that has already been added to the kernel breaks the work of acp6x and the microphone no longer works, so far I am looking for the reason in this person's code, but it is obvious that this patch breaks the work of acp6x.

We have tested this patch at our end, it's working fine. Could you please share the dev_dbg logs.

With this patch if ACPI method read failure then jump to check dmi entry, if dmi entries also not found then driver won't register sound card it will return -ENODEV.

Could you please share more details on this issue.

Do you perhaps have microphone disabled in your BIOS?

I think it would be really helpful to open a kernel bugzilla and attach the output of the following:

1) acpidump > acpidump.bin
(attach acpidump.bin)

2) dmesg > dmesg.txt
(attach dmesg.txt)

3) dmidecode > dmidecode.txt
(attach dmidecode.txt)

#5 lore raw
In reply to potturu venkata prasad


да действительно микрофон работает на второй версии патча которого еще нет в стабильной ветке ядра, 1 версия не отработала и ломала работу acp6x, хотя и вторая версия патча выглядит странной и явно нуждается в переработке goto не очень хорошее решение как мне кажется