From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.1 From: nickel@altlinux.org To: devel-kernel@lists.altlinux.org Date: Tue, 7 Mar 2023 16:54:57 +0300 Message-Id: <20230307135457.80176-2-nickel@altlinux.org> X-Mailer: git-send-email 2.33.6 In-Reply-To: <20230307135457.80176-1-nickel@altlinux.org> References: <20230307135457.80176-1-nickel@altlinux.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Vasiliy Kovalev Subject: [d-kernel] [PATCH] ASoC: AMD: fix conflict use pci-acp driver for ES8336 codec X-BeenThere: devel-kernel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux kernel packages development List-Id: ALT Linux kernel packages development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2023 13:55:15 -0000 Archived-At: List-Archive: List-Post: From: Vasiliy Kovalev For a family of machines whose pci revision ID is 0x1 (renoir), working with the es8336 codec is only available through the snd-pci-acp3x driver (raven). Now we will use a specific driver if there is an acpi device detected as "ESSX8336" in the machine. Fixes: 5d33d36f777903 ("ASoC: AMD: add ACP machine driver for ES8336") Signed-off-by: Vasiliy Kovalev Signed-off-by: Nikolai Kostrigin --- sound/soc/amd/raven/pci-acp3x.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c index cdb8773b11f136..94e12a1483bb55 100644 --- a/sound/soc/amd/raven/pci-acp3x.c +++ b/sound/soc/amd/raven/pci-acp3x.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "acp3x.h" @@ -133,8 +134,11 @@ static int snd_acp3x_probe(struct pci_dev *pci, int ret, i; u32 addr, val; + dev_info(&pci->dev, "pci->revision = 0x%x\n", pci->revision); /* Raven and lucienne device detection */ - if (pci->revision != 0x00 && pci->revision != 0x01) + if (acpi_dev_get_first_match_dev("ESSX8336", NULL, -1)) + dev_info(&pci->dev, "use pci-acp for ES8336 codec\n"); + else if (pci->revision != 0x00) return -ENODEV; if (pci_enable_device(pci)) { -- 2.33.6