From 2509bb342e476e740db448cce09c19b92905194e Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 27 Nov 2020 15:31:58 +0100 Subject: [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. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20201127143200.16272-2-tiwai@suse.de Signed-off-by: Mark Brown --- sound/soc/amd/raven/pci-acp3x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c index 31b797c8bfe6..a7de4e607961 100644 --- a/sound/soc/amd/raven/pci-acp3x.c +++ b/sound/soc/amd/raven/pci-acp3x.c @@ -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; } From ab5893fdc0693e4f747ef26194b6bbf628bdb044 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 27 Nov 2020 15:31:59 +0100 Subject: [PATCH 2/2] ASoC: amd: Return -ENODEV for non-existing ACPI call 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. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20201127143200.16272-3-tiwai@suse.de Signed-off-by: Mark Brown --- sound/soc/amd/renoir/rn-pci-acp3x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/amd/renoir/rn-pci-acp3x.c b/sound/soc/amd/renoir/rn-pci-acp3x.c index b943e59fc302..877350f38a68 100644 --- a/sound/soc/amd/renoir/rn-pci-acp3x.c +++ b/sound/soc/amd/renoir/rn-pci-acp3x.c @@ -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) {