Patch "ASoC: amd: vangogh: Drop conflicting ACPI-based probing" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ASoC: amd: vangogh: Drop conflicting ACPI-based probing

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-amd-vangogh-drop-conflicting-acpi-based-probing.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b2ec6120f48384b58bc21b99a7e12b84b1d71278
Author: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxxxxxx>
Date:   Sat Dec 9 22:32:19 2023 +0200

    ASoC: amd: vangogh: Drop conflicting ACPI-based probing
    
    [ Upstream commit ddd1ee12a8fb6e4d6f86eddeba64c135eee56623 ]
    
    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@xxxxxxxxxxxxx>
    Reviewed-by: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>
    Link: https://msgid.link/r/20231209203229.878730-2-cristian.ciocaltea@xxxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/amd/vangogh/acp5x-mach.c b/sound/soc/amd/vangogh/acp5x-mach.c
index eda464545866..2ccc95d57783 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,
 };




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux