summaryrefslogtreecommitdiffstats
path: root/sound/soc/amd/yc/pci-acp6x.c
diff options
context:
space:
mode:
authorSyed Saba Kareem <Syed.SabaKareem@amd.com>2023-04-12 14:46:16 +0530
committerMark Brown <broonie@kernel.org>2023-04-12 12:52:01 +0100
commitbddcfb0802eb69b0f51293eab5db33d344c0262f (patch)
tree09319bbef6586c965fa6beeecf1e0c8d2bbb854f /sound/soc/amd/yc/pci-acp6x.c
parentd93ee84e3eb5d1afc081e57ca37f1411a01f2c94 (diff)
downloadlinux-stable-bddcfb0802eb69b0f51293eab5db33d344c0262f.tar.gz
linux-stable-bddcfb0802eb69b0f51293eab5db33d344c0262f.tar.bz2
linux-stable-bddcfb0802eb69b0f51293eab5db33d344c0262f.zip
ASoC: amd: Add check for acp config flags
We have SOF and generic ACP support enabled for Rembrandt and pheonix platforms on some machines. Since we have same PCI id used for probing, add check for machine configuration flag to avoid conflict with newer pci drivers. Such machine flag has been initialized via dmi match on few Chrome machines. If no flag is specified probe and register older platform device. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230412091638.1158901-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/amd/yc/pci-acp6x.c')
-rw-r--r--sound/soc/amd/yc/pci-acp6x.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/amd/yc/pci-acp6x.c b/sound/soc/amd/yc/pci-acp6x.c
index 77c5fa1f7af1..7af6a349b1d4 100644
--- a/sound/soc/amd/yc/pci-acp6x.c
+++ b/sound/soc/amd/yc/pci-acp6x.c
@@ -149,10 +149,16 @@ static int snd_acp6x_probe(struct pci_dev *pci,
int index = 0;
int val = 0x00;
u32 addr;
- unsigned int irqflags;
+ unsigned int irqflags, flag;
int ret;
irqflags = IRQF_SHARED;
+
+ /* Return if acp config flag is defined */
+ flag = snd_amd_acp_find_config(pci);
+ if (flag)
+ return -ENODEV;
+
/* Yellow Carp device check */
switch (pci->revision) {
case 0x60: