Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e89f45e

Browse files
Venkata-Prasad-Potturubroonie
authored andcommitted
ASoC: amd: vangogh: Add check for acp config flags in vangogh platform
We have SOF and generic ACP support enabled for Vangogh platform 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 Vangogh based machines. If no flag is specified probe and register older platform device. Signed-off-by: Venkata Prasad Potturu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 13e75f4 commit e89f45e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

sound/soc/amd/vangogh/acp5x.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ static inline void acp_writel(u32 val, void __iomem *base_addr)
147147
writel(val, base_addr - ACP5x_PHY_BASE_ADDRESS);
148148
}
149149

150+
int snd_amd_acp_find_config(struct pci_dev *pci);
151+
150152
static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
151153
int direction)
152154
{

sound/soc/amd/vangogh/pci-acp5x.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,15 @@ static int snd_acp5x_probe(struct pci_dev *pci,
125125
{
126126
struct acp5x_dev_data *adata;
127127
struct platform_device_info pdevinfo[ACP5x_DEVS];
128-
unsigned int irqflags;
128+
unsigned int irqflags, flag;
129129
int ret, i;
130130
u32 addr, val;
131131

132+
/* Return if acp config flag is defined */
133+
flag = snd_amd_acp_find_config(pci);
134+
if (flag)
135+
return -ENODEV;
136+
132137
irqflags = IRQF_SHARED;
133138
if (pci->revision != 0x50)
134139
return -ENODEV;

0 commit comments

Comments
 (0)