Skip to contentSkip to conversation

ASoC: amd: Minor fixes for error handling

PATCH In review Takashi Iwai 2 participants 4 messages Nov 27, 2020 – Nov 30, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ASoC: amd: Minor fixes for error handling

Hi,

this is a set of patches to address the errors appearing on the machine that has no I2S DMIC on AMD machine but probed.

Takashi

===

Takashi Iwai (2):
ASoC: amd: Downgrade print level for invalid ACP mode
ASoC: amd: Return -ENODEV for non-existing ACPI call

 sound/soc/amd/raven/pci-acp3x.c     | 2 +-
 sound/soc/amd/renoir/rn-pci-acp3x.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/2 ASoC: amd: Downgrade print level for invalid ACP mode

The acp3x raven driver skips the probing when the given device isn't connected with I2S. This skip behavior itself is fine, but the driver also emits an error message "Invalid ACP audio mode" with KERN_ERR. This isn't nice since it appears on the boot screen even if a boot splash is running, although this itself is no real error.

Downgrade the print level to KERN_INFO so that this message won't appear on the console unnecessarily.

---
 sound/soc/amd/raven/pci-acp3x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/amd/raven/pci-acp3x.c +1 -1
index 31b797c8bfe6..a7de4e607961 100644
@@ -231,7 +231,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
 		}
 		break;
 	default:
-		dev_err(&pci->dev, "Invalid ACP audio mode : %d\n", val);
+		dev_info(&pci->dev, "Invalid ACP audio mode : %d\n", val);
 		ret = -ENODEV;
 		goto disable_msi;
 	}
Signature · 1 line
2.26.2
#2 lore raw

PATCH 2/2 ASoC: amd: Return -ENODEV for non-existing ACPI call

In reply to Takashi Iwai

AMD Renoir driver tries to identify the presence of DMIC by evaluating ACPI _WOV entry, and it returns -EINVAL when the ACPI call failed. This ended up an error message like
snd_rn_pci_acp3x: probe of 0000:04:00.5 failed with error -22
although the system is correctly set up.

For avoiding such a superfluous error message, change the return value to -ENODEV. Then the driver core just skips to the next one without complaining.

---
 sound/soc/amd/renoir/rn-pci-acp3x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/amd/renoir/rn-pci-acp3x.c +1 -1
index b943e59fc302..877350f38a68 100644
@@ -224,7 +224,7 @@ static int snd_rn_acp_probe(struct pci_dev *pci,
 		handle = ACPI_HANDLE(&pci->dev);
 		ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status);
 		if (ACPI_FAILURE(ret)) {
-			ret = -EINVAL;
+			ret = -ENODEV;
 			goto de_init;
 		}
 		if (!dmic_status) {
Signature · 1 line
2.26.2
maintainer
#3 lore raw
In reply to Takashi Iwai
Quoted 9 lines · Takashi Iwai

this is a set of patches to address the errors appearing on the machine that has no I2S DMIC on AMD machine but probed.

Takashi

===

[...]

Applied to

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

Thanks!

[1/2] ASoC: amd: Downgrade print level for invalid ACP mode

      commit: 2509bb342e476e740db448cce09c19b92905194e
[2/2] ASoC: amd: Return -ENODEV for non-existing ACPI call
      commit: ab5893fdc0693e4f747ef26194b6bbf628bdb044

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