From: nickel@altlinux.org
To: devel-kernel@lists.altlinux.org
Cc: Vasiliy Kovalev <kovalev@altlinux.org>
Subject: [d-kernel] [PATCH] ASoC: AMD: fix conflict use pci-acp driver for ES8336 codec
Date: Tue, 7 Mar 2023 16:54:57 +0300
Message-ID: <20230307135457.80176-2-nickel@altlinux.org> (raw)
In-Reply-To: <20230307135457.80176-1-nickel@altlinux.org>
From: Vasiliy Kovalev <kovalev@altlinux.org>
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 <kovalev@altlinux.org>
Signed-off-by: Nikolai Kostrigin <nickel@altlinux.org>
---
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 <linux/interrupt.h>
#include <linux/pm_runtime.h>
#include <linux/delay.h>
+#include <sound/soc-acpi.h>
#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
next prev parent reply other threads:[~2023-03-07 13:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 13:54 [d-kernel] [PATCH 0/1] Fix pci-acp driver selection for AMD platforms in 5.15 kernels nickel
2023-03-07 13:54 ` nickel [this message]
2023-03-08 22:10 ` Vitaly Chikunov
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=20230307135457.80176-2-nickel@altlinux.org \
--to=nickel@altlinux.org \
--cc=devel-kernel@lists.altlinux.org \
--cc=kovalev@altlinux.org \
/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
ALT Linux kernel packages development
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
public-inbox-index devel-kernel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git