| 78d39246 | 09-Dec-2023 |
Cristian Ciocaltea <[email protected]> |
ASoC: amd: vangogh: Switch to {RUNTIME,SYSTEM_SLEEP}_PM_OPS
Replace the old SET_{RUNTIME,SYSTEM_SLEEP}_PM_OPS() helpers with their modern alternatives and drop the now unnecessary __maybe_unused qua
ASoC: amd: vangogh: Switch to {RUNTIME,SYSTEM_SLEEP}_PM_OPS
Replace the old SET_{RUNTIME,SYSTEM_SLEEP}_PM_OPS() helpers with their modern alternatives and drop the now unnecessary __maybe_unused qualifier in the suspend and resume functions.
Additionally, make use of pm_ptr() to ensure the PM ops are dropped when building with CONFIG_PM disabled.
Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
| 2cef11ec | 09-Dec-2023 |
Cristian Ciocaltea <[email protected]> |
ASoC: amd: vangogh: Allow probing ACP PCI when SOF is disabled
Since commit e89f45edb747 ("ASoC: amd: vangogh: Add check for acp config flags in vangogh platform"), the Vangogh ACP PCI driver could
ASoC: amd: vangogh: Allow probing ACP PCI when SOF is disabled
Since commit e89f45edb747 ("ASoC: amd: vangogh: Add check for acp config flags in vangogh platform"), the Vangogh ACP PCI driver could not be used anymore for boards which happen to have a matching entry in acp-config list.
Commit f18818eb0dbe ("ASoC: amd: vangogh: Add condition check for acp config flag") slightly changed the behaviour to permit loading the driver if AMD_LEGACY flag is set. However, for AMD_SOF flag the probing is still denied, even if SOF support is disabled in kernel configuration.
While this helps preventing conflicts between SOF and generic ACP drivers, there are cases where a fallback to the generic non-SOF support would still be needed or useful, e.g. SOF firmware is not available or doesn't work properly, SOF driver is broken or doesn't provide full support for a particular hardware, or simply for testing/debugging the alternative solution. A real-life example is Steam Deck OLED, which works with both drivers.
Prevent returning from probe() when ACP config indicates SOF support for the current board *and* the Vangogh SOF driver is not enabled in kernel configuration.
Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
| ddd1ee12 | 09-Dec-2023 |
Cristian Ciocaltea <[email protected]> |
ASoC: amd: vangogh: Drop conflicting ACPI-based probing
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 t
ASoC: amd: vangogh: Drop conflicting ACPI-based probing
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 <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
| dba22efd | 05-Jul-2023 |
Cristian Ciocaltea <[email protected]> |
ASoC: amd: vangogh: Add support for NAU8821/MAX98388 variant
Extend the Vangogh machine driver to support a variant based on the Nuvoton NAU88L21 Codec and the Analog Devices MAX98388 Speaker Amplif
ASoC: amd: vangogh: Add support for NAU8821/MAX98388 variant
Extend the Vangogh machine driver to support a variant based on the Nuvoton NAU88L21 Codec and the Analog Devices MAX98388 Speaker Amplifier.
Additionally, enable probing via ACPI match table for this and future hardware revisions.
Co-developed-by: Lucas Tanure <[email protected]> Signed-off-by: Lucas Tanure <[email protected]> Signed-off-by: Cristian Ciocaltea <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
| 3dd26e27 | 05-Jul-2023 |
Cristian Ciocaltea <[email protected]> |
ASoC: amd: vangogh: Use dmi_first_match() for DMI quirk handling
In preparation for supporting ACPI probing, move DMI quirk handling logic at the probe's top, to be able to return as quickly as poss
ASoC: amd: vangogh: Use dmi_first_match() for DMI quirk handling
In preparation for supporting ACPI probing, move DMI quirk handling logic at the probe's top, to be able to return as quickly as possible in case there is no DMI matching.
Additionally, simplify the code by replacing dmi_check_system() and related callback with dmi_first_match(). While at it, also drop a few unnecessary empty lines.
Signed-off-by: Cristian Ciocaltea <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
| e9023248 | 17-Feb-2023 |
Lucas Tanure <[email protected]> |
ASoC: amd: vangogh: Add components prefix in structs and function names
Add prefixes 8821/35l41 in structs and function names so future platforms can be added and reference the correct sound card. A
ASoC: amd: vangogh: Add components prefix in structs and function names
Add prefixes 8821/35l41 in structs and function names so future platforms can be added and reference the correct sound card. Also include acp5x prefix to cs35l41_conf.
Signed-off-by: Lucas Tanure <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
| c10955e4 | 17-Feb-2023 |
Lucas Tanure <[email protected]> |
ASoC: amd: vangogh: Centralize strings definition
Replace occurrences of strings by their definition, avoiding bugs where the string changed, but not all places have been modified. While at it renam
ASoC: amd: vangogh: Centralize strings definition
Replace occurrences of strings by their definition, avoiding bugs where the string changed, but not all places have been modified. While at it rename defines to use NAU8821 codec name instead of NUVOTON and align with the other defines.
Signed-off-by: Lucas Tanure <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
| a719afe6 | 17-Feb-2023 |
Lucas Tanure <[email protected]> |
ASoC: amd: vangogh: use for_each_rtd_components instead of for
To iterate over components use for_each_rtd_components And compare to component name, so asoc_rtd_to_codec and the dai code can be remo
ASoC: amd: vangogh: use for_each_rtd_components instead of for
To iterate over components use for_each_rtd_components And compare to component name, so asoc_rtd_to_codec and the dai code can be removed
Signed-off-by: Lucas Tanure <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
| 50e81116 | 17-Feb-2023 |
Lucas Tanure <[email protected]> |
ASoC: amd: vangogh: use sizeof of variable instead of struct type
Use 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 type
Use sizeof(*machine) instead of sizeof(struct acp5x_platform_info)
There is a possibility of bug when variable type has changed but corresponding struct passed to the sizeof has not.
Signed-off-by: Lucas Tanure <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
| ddd42a12 | 17-Feb-2023 |
Lucas Tanure <[email protected]> |
ASoC: amd: vangogh: Small code refactor
Small 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 refactor
Small 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 defines
Signed-off-by: Lucas Tanure <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|