From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Venkata Prasad Potturu <venkataprasad.potturu@amd.com>,
Marian Postevca <posteuca@mutex.one>,
Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
Syed Saba Kareem <Syed.SabaKareem@amd.com>,
Alper Nebi Yasak <alpernebiyasak@gmail.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Rander Wang <rander.wang@intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Daniel Baluta <daniel.baluta@nxp.com>,
Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>,
Bard Liao <bard.liao@intel.com>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@collabora.com
Subject: [PATCH 1/5] ASoC: amd: vangogh: Drop conflicting ACPI-based probing
Date: Sat, 9 Dec 2023 22:32:19 +0200 [thread overview]
Message-ID: <20231209203229.878730-2-cristian.ciocaltea@collabora.com> (raw)
In-Reply-To: <20231209203229.878730-1-cristian.ciocaltea@collabora.com>
The Vangogh machine driver variant based on the MAX98388 amplifier, as
found on Valve's Steam Deck OLED, relies on probing via an ACPI match
table. This worked fine until commit 197b1f7f0df1 ("ASoC: amd: Add new
dmi entries to config entry") enabled SOF support for the target machine
(i.e. Galileo product), causing the sound card to enter the deferred
probe state indefinitely:
$ cat /sys/kernel/debug/devices_deferred
AMDI8821:00 acp5x_mach: Register card (acp5x-max98388) failed
The issue is related to commit e89f45edb747 ("ASoC: amd: vangogh: Add
check for acp config flags in vangogh platform"), which tries to
mitigate potential conflicts between SOF and generic ACP Vangogh
drivers, due to sharing the PCI device IDs.
However, the solution is effective only if the machine driver is
directly probed by pci-acp5x through platform_device_register_full().
Hence, remove the conflicting ACPI based probing and rely exclusively on
DMI quirks for sound card setup.
Fixes: dba22efd0d17 ("ASoC: amd: vangogh: Add support for NAU8821/MAX98388 variant")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
sound/soc/amd/vangogh/acp5x-mach.c | 35 +++++++++++-------------------
1 file changed, 13 insertions(+), 22 deletions(-)
diff --git a/sound/soc/amd/vangogh/acp5x-mach.c b/sound/soc/amd/vangogh/acp5x-mach.c
index de4b478a983d..7878e061ecb9 100644
--- a/sound/soc/amd/vangogh/acp5x-mach.c
+++ b/sound/soc/amd/vangogh/acp5x-mach.c
@@ -439,7 +439,15 @@ static const struct dmi_system_id acp5x_vg_quirk_table[] = {
.matches = {
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Valve"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Jupiter"),
- }
+ },
+ .driver_data = (void *)&acp5x_8821_35l41_card,
+ },
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Valve"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Galileo"),
+ },
+ .driver_data = (void *)&acp5x_8821_98388_card,
},
{}
};
@@ -452,25 +460,15 @@ static int acp5x_probe(struct platform_device *pdev)
struct snd_soc_card *card;
int ret;
- card = (struct snd_soc_card *)device_get_match_data(dev);
- if (!card) {
- /*
- * This is normally the result of directly probing the driver
- * in pci-acp5x through platform_device_register_full(), which
- * is necessary for the CS35L41 variant, as it doesn't support
- * ACPI probing and relies on DMI quirks.
- */
- dmi_id = dmi_first_match(acp5x_vg_quirk_table);
- if (!dmi_id)
- return -ENODEV;
-
- card = &acp5x_8821_35l41_card;
- }
+ dmi_id = dmi_first_match(acp5x_vg_quirk_table);
+ if (!dmi_id || !dmi_id->driver_data)
+ return -ENODEV;
machine = devm_kzalloc(dev, sizeof(*machine), GFP_KERNEL);
if (!machine)
return -ENOMEM;
+ card = dmi_id->driver_data;
card->dev = dev;
platform_set_drvdata(pdev, card);
snd_soc_card_set_drvdata(card, machine);
@@ -482,17 +480,10 @@ static int acp5x_probe(struct platform_device *pdev)
return 0;
}
-static const struct acpi_device_id acp5x_acpi_match[] = {
- { "AMDI8821", (kernel_ulong_t)&acp5x_8821_98388_card },
- {},
-};
-MODULE_DEVICE_TABLE(acpi, acp5x_acpi_match);
-
static struct platform_driver acp5x_mach_driver = {
.driver = {
.name = DRV_NAME,
.pm = &snd_soc_pm_ops,
- .acpi_match_table = acp5x_acpi_match,
},
.probe = acp5x_probe,
};
--
2.43.0
next prev parent reply other threads:[~2023-12-09 20:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-09 20:32 [PATCH 0/5] Improve AMD ACP Vangogh audio support for Steam Deck OLED Cristian Ciocaltea
2023-12-09 20:32 ` Cristian Ciocaltea [this message]
2023-12-09 20:32 ` [PATCH 2/5] ASoC: amd: vangogh: Allow probing ACP PCI when SOF is disabled Cristian Ciocaltea
2023-12-09 20:32 ` [PATCH 3/5] ASoC: amd: vangogh: Switch to {RUNTIME,SYSTEM_SLEEP}_PM_OPS Cristian Ciocaltea
2023-12-09 20:32 ` [PATCH 4/5] ASoC: amd: acp-config: Add missing MODULE_DESCRIPTION Cristian Ciocaltea
2023-12-09 20:32 ` [PATCH 5/5] ASoC: amd: acp: Add missing MODULE_DESCRIPTION in mach-common Cristian Ciocaltea
2023-12-11 15:12 ` [PATCH 0/5] Improve AMD ACP Vangogh audio support for Steam Deck OLED Emil Velikov
2023-12-11 17:04 ` Cristian Ciocaltea
2023-12-19 18:06 ` Mark Brown
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=20231209203229.878730-2-cristian.ciocaltea@collabora.com \
--to=cristian.ciocaltea@collabora.com \
--cc=AjitKumar.Pandey@amd.com \
--cc=Syed.SabaKareem@amd.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=alpernebiyasak@gmail.com \
--cc=bard.liao@intel.com \
--cc=broonie@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=kernel@collabora.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=posteuca@mutex.one \
--cc=rander.wang@intel.com \
--cc=tiwai@suse.com \
--cc=venkataprasad.potturu@amd.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®