All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: amd: vangogh: Add check for acp config flags in vangogh platform
@ 2023-05-30 11:07 Venkata Prasad Potturu
  2023-05-30 17:40 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Venkata Prasad Potturu @ 2023-05-30 11:07 UTC (permalink / raw)
  To: broonie, alsa-devel
  Cc: vsujithkumar.reddy, Vijendar.Mukunda, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, ssabakar, akondave, Venkata Prasad Potturu,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, open list

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 <venkataprasad.potturu@amd.com>
---
 sound/soc/amd/vangogh/acp5x.h     | 2 ++
 sound/soc/amd/vangogh/pci-acp5x.c | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/sound/soc/amd/vangogh/acp5x.h b/sound/soc/amd/vangogh/acp5x.h
index bd9f1c5684d1..ac1936a8c43f 100644
--- a/sound/soc/amd/vangogh/acp5x.h
+++ b/sound/soc/amd/vangogh/acp5x.h
@@ -147,6 +147,8 @@ static inline void acp_writel(u32 val, void __iomem *base_addr)
 	writel(val, base_addr - ACP5x_PHY_BASE_ADDRESS);
 }
 
+int snd_amd_acp_find_config(struct pci_dev *pci);
+
 static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
 				     int direction)
 {
diff --git a/sound/soc/amd/vangogh/pci-acp5x.c b/sound/soc/amd/vangogh/pci-acp5x.c
index e0df17c88e8e..c4634a8a17cd 100644
--- a/sound/soc/amd/vangogh/pci-acp5x.c
+++ b/sound/soc/amd/vangogh/pci-acp5x.c
@@ -125,10 +125,15 @@ static int snd_acp5x_probe(struct pci_dev *pci,
 {
 	struct acp5x_dev_data *adata;
 	struct platform_device_info pdevinfo[ACP5x_DEVS];
-	unsigned int irqflags;
+	unsigned int irqflags, flag;
 	int ret, i;
 	u32 addr, val;
 
+	/* Return if acp config flag is defined */
+	flag = snd_amd_acp_find_config(pci);
+	if (flag)
+		return -ENODEV;
+
 	irqflags = IRQF_SHARED;
 	if (pci->revision != 0x50)
 		return -ENODEV;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: amd: vangogh: Add check for acp config flags in vangogh platform
  2023-05-30 11:07 [PATCH] ASoC: amd: vangogh: Add check for acp config flags in vangogh platform Venkata Prasad Potturu
@ 2023-05-30 17:40 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-05-30 17:40 UTC (permalink / raw)
  To: alsa-devel, Venkata Prasad Potturu
  Cc: vsujithkumar.reddy, Vijendar.Mukunda, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, ssabakar, akondave, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, open list

On Tue, 30 May 2023 16:37:58 +0530, Venkata Prasad Potturu wrote:
> 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.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: amd: vangogh: Add check for acp config flags in vangogh platform
      commit: e89f45edb747ed88e97a5771dd6d3dd1eb517873

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-30 17:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-30 11:07 [PATCH] ASoC: amd: vangogh: Add check for acp config flags in vangogh platform Venkata Prasad Potturu
2023-05-30 17:40 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.