ASoC: amd: Convert to RUNTIME_PM_OPS() & coUse the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macrosinstead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() togetherwith pm_ptr(), whic
ASoC: amd: Convert to RUNTIME_PM_OPS() & coUse the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macrosinstead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() togetherwith pm_ptr(), which allows us dropping ugly __maybe_unusedattributes.This optimizes slightly when CONFIG_PM is disabled, too.Signed-off-by: Takashi Iwai <tiwai@suse.de>Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>Link: https://patch.msgid.link/20250317095603.20073-88-tiwai@suse.deSigned-off-by: Mark Brown <broonie@kernel.org>
show more ...
ASoC: amd: remove dpcm_xxx flagsdpcm_xxx flags are no longer needed. It converts dpcm_xxx flag toxxx_only if needed.Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>Link: http
ASoC: amd: remove dpcm_xxx flagsdpcm_xxx flags are no longer needed. It converts dpcm_xxx flag toxxx_only if needed.Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>Link: https://patch.msgid.link/87jze29vip.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: Switch back to struct platform_driver::remove()After commit 0edb555a65d1 ("platform: Make platform_driver::remove()return void") .remove() is (again) the right callback to implement forplat
ASoC: Switch back to struct platform_driver::remove()After commit 0edb555a65d1 ("platform: Make platform_driver::remove()return void") .remove() is (again) the right callback to implement forplatform drivers.Convert all drivers below sound/soc to use .remove(), with the eventualgoal to drop struct platform_driver::remove_new(). As .remove() and.remove_new() have the same prototypes, conversion is done by justchanging the structure member name in the driver initializer.Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>Link: https://patch.msgid.link/20240909151230.909818-2-u.kleine-koenig@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: Use *-y instead of *-objs in Makefile*-objs suffix is reserved rather for (user-space) host programs whileusually *-y suffix is used for kernel drivers (although *-objs worksfor that p
ASoC: amd: Use *-y instead of *-objs in Makefile*-objs suffix is reserved rather for (user-space) host programs whileusually *-y suffix is used for kernel drivers (although *-objs worksfor that purpose for now).Let's correct the old usages of *-objs in Makefiles.Signed-off-by: Takashi Iwai <tiwai@suse.de>Link: https://lore.kernel.org/r/20240507155540.24815-5-tiwai@suse.deSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: Switch to {RUNTIME,SYSTEM_SLEEP}_PM_OPSReplace the old SET_{RUNTIME,SYSTEM_SLEEP}_PM_OPS() helpers with theirmodern alternatives and drop the now unnecessary __maybe_unusedqua
ASoC: amd: vangogh: Switch to {RUNTIME,SYSTEM_SLEEP}_PM_OPSReplace the old SET_{RUNTIME,SYSTEM_SLEEP}_PM_OPS() helpers with theirmodern alternatives and drop the now unnecessary __maybe_unusedqualifier in the suspend and resume functions.Additionally, make use of pm_ptr() to ensure the PM ops are dropped whenbuilding with CONFIG_PM disabled.Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>Reviewed-by: Emil Velikov <emil.velikov@collabora.com>Link: https://msgid.link/r/20231209203229.878730-4-cristian.ciocaltea@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: Allow probing ACP PCI when SOF is disabledSince commit e89f45edb747 ("ASoC: amd: vangogh: Add check for acp configflags in vangogh platform"), the Vangogh ACP PCI driver could
ASoC: amd: vangogh: Allow probing ACP PCI when SOF is disabledSince commit e89f45edb747 ("ASoC: amd: vangogh: Add check for acp configflags in vangogh platform"), the Vangogh ACP PCI driver could not be usedanymore for boards which happen to have a matching entry in acp-configlist.Commit f18818eb0dbe ("ASoC: amd: vangogh: Add condition check for acpconfig flag") slightly changed the behaviour to permit loading thedriver if AMD_LEGACY flag is set. However, for AMD_SOF flag the probingis still denied, even if SOF support is disabled in kernelconfiguration.While this helps preventing conflicts between SOF and generic ACPdrivers, there are cases where a fallback to the generic non-SOF supportwould still be needed or useful, e.g. SOF firmware is not available ordoesn't work properly, SOF driver is broken or doesn't provide fullsupport for a particular hardware, or simply for testing/debugging thealternative solution. A real-life example is Steam Deck OLED, whichworks with both drivers.Prevent returning from probe() when ACP config indicates SOF support forthe current board *and* the Vangogh SOF driver is not enabled in kernelconfiguration.Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>Reviewed-by: Emil Velikov <emil.velikov@collabora.com>Link: https://msgid.link/r/20231209203229.878730-3-cristian.ciocaltea@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: Drop conflicting ACPI-based probingThe Vangogh machine driver variant based on the MAX98388 amplifier, asfound on Valve's Steam Deck OLED, relies on probing via an ACPI matcht
ASoC: amd: vangogh: Drop conflicting ACPI-based probingThe Vangogh machine driver variant based on the MAX98388 amplifier, asfound on Valve's Steam Deck OLED, relies on probing via an ACPI matchtable. This worked fine until commit 197b1f7f0df1 ("ASoC: amd: Add newdmi entries to config entry") enabled SOF support for the target machine(i.e. Galileo product), causing the sound card to enter the deferredprobe state indefinitely:$ cat /sys/kernel/debug/devices_deferredAMDI8821:00 acp5x_mach: Register card (acp5x-max98388) failedThe issue is related to commit e89f45edb747 ("ASoC: amd: vangogh: Addcheck for acp config flags in vangogh platform"), which tries tomitigate potential conflicts between SOF and generic ACP Vangoghdrivers, due to sharing the PCI device IDs.However, the solution is effective only if the machine driver isdirectly probed by pci-acp5x through platform_device_register_full().Hence, remove the conflicting ACPI based probing and rely exclusively onDMI 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>Reviewed-by: Emil Velikov <emil.velikov@collabora.com>Link: https://msgid.link/r/20231209203229.878730-2-cristian.ciocaltea@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: Add condition check for acp config flagAdd condition check for acp config flag to load legacy driver only.Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
ASoC: amd: vangogh: Add condition check for acp config flagAdd condition check for acp config flag to load legacy driver only.Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>Link: https://lore.kernel.org/r/20231206110620.1695591-2-venkataprasad.potturu@amd.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: convert not to use asoc_xxx()ASoC is now unified asoc_xxx() into snd_soc_xxx().This patch convert asoc_xxx() to snd_soc_xxx().Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@re
ASoC: amd: convert not to use asoc_xxx()ASoC is now unified asoc_xxx() into snd_soc_xxx().This patch convert asoc_xxx() to snd_soc_xxx().Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>Link: https://lore.kernel.org/r/878r9cs25b.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: acp5x-mach:add checks to avoid static analysis warningssnd_soc_card_get_codec_dai() can return NULL, but that value is notchecked for, leading to static analysis warnings.Signed-off-b
ASoC: amd: acp5x-mach:add checks to avoid static analysis warningssnd_soc_card_get_codec_dai() can return NULL, but that value is notchecked for, leading to static analysis warnings.Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>Reviewed-by: Rander Wang <rander.wang@intel.com>Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>Reviewed-by: Yaochun Hung <yc.hung@mediatek.com>Link: https://lore.kernel.org/r/20230731213748.440285-9-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: Add support for NAU8821/MAX98388 variantExtend the Vangogh machine driver to support a variant based on theNuvoton NAU88L21 Codec and the Analog Devices MAX98388 SpeakerAmplif
ASoC: amd: vangogh: Add support for NAU8821/MAX98388 variantExtend the Vangogh machine driver to support a variant based on theNuvoton NAU88L21 Codec and the Analog Devices MAX98388 SpeakerAmplifier.Additionally, enable probing via ACPI match table for this and futurehardware revisions.Co-developed-by: Lucas Tanure <lucas.tanure@collabora.com>Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com>Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>Link: https://lore.kernel.org/r/20230705214800.193244-4-cristian.ciocaltea@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: Use dmi_first_match() for DMI quirk handlingIn preparation for supporting ACPI probing, move DMI quirk handlinglogic at the probe's top, to be able to return as quickly as poss
ASoC: amd: vangogh: Use dmi_first_match() for DMI quirk handlingIn preparation for supporting ACPI probing, move DMI quirk handlinglogic at the probe's top, to be able to return as quickly as possible incase there is no DMI matching.Additionally, simplify the code by replacing dmi_check_system() andrelated callback with dmi_first_match(). While at it, also drop a fewunnecessary empty lines.Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>Link: https://lore.kernel.org/r/20230705214800.193244-3-cristian.ciocaltea@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: Make use of DRV_NAMEThe "acp5x_mach" string is provided for both driver name andMODULE_ALIAS. Since they need to match, ensure DRV_NAME macro is used inboth locations.Signed
ASoC: amd: vangogh: Make use of DRV_NAMEThe "acp5x_mach" string is provided for both driver name andMODULE_ALIAS. Since they need to match, ensure DRV_NAME macro is used inboth locations.Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>Link: https://lore.kernel.org/r/20230705214800.193244-2-cristian.ciocaltea@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: update pm_runtime enable sequencepm_runtime_allow() is not needed for ACP child platform devices.Replace pm_runtime_allow() with pm_runtime_mark_last_busy()& pm_runtime_set_active() in
ASoC: amd: update pm_runtime enable sequencepm_runtime_allow() is not needed for ACP child platform devices.Replace pm_runtime_allow() with pm_runtime_mark_last_busy()& pm_runtime_set_active() in pm_runtime enable sequence forACP child platform drivers.Signed-off-by: Arun Gopal <arungopal.kondaveeti@amd.com>Link: https://lore.kernel.org/r/Message-Id: <20230623214150.4058721-1-arungopal.kondaveeti@amd.com>Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: Add check for acp config flags in vangogh platformWe have SOF and generic ACP support enabled for Vangogh platformon some machines. Since we have same PCI id used for probing,
ASoC: amd: vangogh: Add check for acp config flags in vangogh platformWe have SOF and generic ACP support enabled for Vangogh platformon some machines. Since we have same PCI id used for probing,add check for machine configuration flag to avoid conflict withnewer pci drivers. Such machine flag has been initialized viadmi match on few Vangogh based machines. If no flag isspecified probe and register older platform device.Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>Link: https://lore.kernel.org/r/20230530110802.674939-1-venkataprasad.potturu@amd.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: acp5x-pcm-dma: Convert to platform remove callback returning voidThe .remove() callback for a platform driver returns an int which makesmany driver authors wrongly assume it's
ASoC: amd: vangogh: acp5x-pcm-dma: Convert to platform remove callback returning voidThe .remove() callback for a platform driver returns an int which makesmany driver authors wrongly assume it's possible to do error handling byreturning an error code. However the value returned is (mostly) ignoredand this typically results in resource leaks. To improve here there is aquest to make the remove callback return void. In the first step of thisquest all drivers are converted to .remove_new() which already returnsvoid.Trivially convert this driver from always returning zero in the removecallback to the void returning variant.Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>Acked-by: Takashi Iwai <tiwai@suse.de>Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>Link: https://lore.kernel.org/r/20230315150745.67084-22-u.kleine-koenig@pengutronix.deSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: Add components prefix in structs and function namesAdd prefixes 8821/35l41 in structs and function names so future platformscan be added and reference the correct sound card.A
ASoC: amd: vangogh: Add components prefix in structs and function namesAdd prefixes 8821/35l41 in structs and function names so future platformscan be added and reference the correct sound card.Also include acp5x prefix to cs35l41_conf.Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com>Link: https://lore.kernel.org/r/20230217110850.1045250-10-lucas.tanure@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: Centralize strings definitionReplace occurrences of strings by their definition, avoidingbugs where the string changed, but not all places have been modified.While at it renam
ASoC: amd: vangogh: Centralize strings definitionReplace occurrences of strings by their definition, avoidingbugs where the string changed, but not all places have been modified.While at it rename defines to use NAU8821 codec name instead of NUVOTONand align with the other defines.Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com>Link: https://lore.kernel.org/r/20230217110850.1045250-9-lucas.tanure@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: Move nau8821 and CPU side code up for future platformMove nau8821 and CPU side code up in the source so future platforms canbe added.Signed-off-by: Lucas Tanure <lucas.tanure
ASoC: amd: vangogh: Move nau8821 and CPU side code up for future platformMove nau8821 and CPU side code up in the source so future platforms canbe added.Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com>Link: https://lore.kernel.org/r/20230217110850.1045250-8-lucas.tanure@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: Check Bit Clock rate before snd_soc_dai_set_pllCheck bit clock is valid before setting it with snd_soc_dai_set_pllSigned-off-by: Lucas Tanure <lucas.tanure@collabora.com>Link
ASoC: amd: vangogh: Check Bit Clock rate before snd_soc_dai_set_pllCheck bit clock is valid before setting it with snd_soc_dai_set_pllSigned-off-by: Lucas Tanure <lucas.tanure@collabora.com>Link: https://lore.kernel.org/r/20230217110850.1045250-7-lucas.tanure@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: use for_each_rtd_components instead of forTo iterate over components use for_each_rtd_componentsAnd compare to component name, so asoc_rtd_to_codec and the dai code canbe remo
ASoC: amd: vangogh: use for_each_rtd_components instead of forTo iterate over components use for_each_rtd_componentsAnd compare to component name, so asoc_rtd_to_codec and the dai code canbe removedSigned-off-by: Lucas Tanure <lucas.tanure@collabora.com>Link: https://lore.kernel.org/r/20230217110850.1045250-6-lucas.tanure@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: remove unnecessarily included headersRemove unused includes and replace <linux/input.h> by<linux/input-event-codes.h>Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com>
ASoC: amd: vangogh: remove unnecessarily included headersRemove unused includes and replace <linux/input.h> by<linux/input-event-codes.h>Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com>Link: https://lore.kernel.org/r/20230217110850.1045250-5-lucas.tanure@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: use sizeof of variable instead of struct typeUse sizeof(*machine) instead of sizeof(struct acp5x_platform_info)There is a possibility of bug when variable type has changed but
ASoC: amd: vangogh: use sizeof of variable instead of struct typeUse sizeof(*machine) instead of sizeof(struct acp5x_platform_info)There is a possibility of bug when variable type has changed butcorresponding struct passed to the sizeof has not.Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com>Link: https://lore.kernel.org/r/20230217110850.1045250-4-lucas.tanure@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: Small code refactorSmall refactor of the code: - sort includes in alphabetical order - sort variables declarations by line length - remove unnecessary "struct snd_soc_card *c
ASoC: amd: vangogh: Small code refactorSmall refactor of the code: - sort includes in alphabetical order - sort variables declarations by line length - remove unnecessary "struct snd_soc_card *card" lines - insert blank lines before return - break/unbreak some lines for better read - align definesSigned-off-by: Lucas Tanure <lucas.tanure@collabora.com>Link: https://lore.kernel.org/r/20230217110850.1045250-3-lucas.tanure@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
ASoC: amd: vangogh: Remove unnecessary init functionRemove empty acp5x_cs35l41_init functionSigned-off-by: Lucas Tanure <lucas.tanure@collabora.com>Link: https://lore.kernel.org/r/20230217110850
ASoC: amd: vangogh: Remove unnecessary init functionRemove empty acp5x_cs35l41_init functionSigned-off-by: Lucas Tanure <lucas.tanure@collabora.com>Link: https://lore.kernel.org/r/20230217110850.1045250-2-lucas.tanure@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
123