2023-12-09 20:40:48

by Cristian Ciocaltea

[permalink] [raw]
Subject: [PATCH 0/5] Improve AMD ACP Vangogh audio support for Steam Deck OLED

This patch series provides several fixes and improvements to AMD ACP drivers
targeting the Vangogh platform, as found on the Valve's new Steam Deck OLED.

Although in theory the board should have been supported by both SOF and legacy
ACP drivers, as of next-20231208 the audio seems to be completely broken.

Please note this only restores the legacy support, while SOF will be handled in
a separate series.

Cristian Ciocaltea (5):
ASoC: amd: vangogh: Drop conflicting ACPI-based probing
ASoC: amd: vangogh: Allow probing ACP PCI when SOF is disabled
ASoC: amd: vangogh: Switch to {RUNTIME,SYSTEM_SLEEP}_PM_OPS
ASoC: amd: acp-config: Add missing MODULE_DESCRIPTION
ASoC: amd: acp: Add missing MODULE_DESCRIPTION in mach-common

sound/soc/amd/acp-config.c | 1 +
sound/soc/amd/acp/acp-mach-common.c | 1 +
sound/soc/amd/vangogh/acp5x-mach.c | 35 +++++++++++------------------
sound/soc/amd/vangogh/pci-acp5x.c | 19 +++++++++-------
4 files changed, 26 insertions(+), 30 deletions(-)

--
2.43.0


2023-12-09 20:41:51

by Cristian Ciocaltea

[permalink] [raw]
Subject: [PATCH 4/5] ASoC: amd: acp-config: Add missing MODULE_DESCRIPTION

Add the missing MODULE_DESCRIPTION() to avoid the following warning when
building with W=1:

WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/snd-acp-config.o

Fixes: f1bdd8d385a8 ("ASoC: amd: Add module to determine ACP configuration")
Signed-off-by: Cristian Ciocaltea <[email protected]>
---
sound/soc/amd/acp-config.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/sound/soc/amd/acp-config.c b/sound/soc/amd/acp-config.c
index 5c8cf75be009..42c2322cd11b 100644
--- a/sound/soc/amd/acp-config.c
+++ b/sound/soc/amd/acp-config.c
@@ -321,4 +321,5 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_sof_machines[] = {
};
EXPORT_SYMBOL(snd_soc_acpi_amd_acp63_sof_machines);

+MODULE_DESCRIPTION("AMD ACP Machine Configuration Module");
MODULE_LICENSE("Dual BSD/GPL");
--
2.43.0

2023-12-09 20:41:52

by Cristian Ciocaltea

[permalink] [raw]
Subject: [PATCH 2/5] 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]>
---
sound/soc/amd/vangogh/pci-acp5x.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/soc/amd/vangogh/pci-acp5x.c b/sound/soc/amd/vangogh/pci-acp5x.c
index 3826443d77b9..10755c07949c 100644
--- a/sound/soc/amd/vangogh/pci-acp5x.c
+++ b/sound/soc/amd/vangogh/pci-acp5x.c
@@ -130,9 +130,13 @@ static int snd_acp5x_probe(struct pci_dev *pci,
int ret, i;
u32 addr, val;

- /* Return if acp config flag is defined */
+ /*
+ * Return if ACP config flag is defined, except when board
+ * supports SOF while it is not being enabled in kernel config.
+ */
flag = snd_amd_acp_find_config(pci);
- if (flag != FLAG_AMD_LEGACY)
+ if (flag != FLAG_AMD_LEGACY &&
+ (flag != FLAG_AMD_SOF || IS_ENABLED(CONFIG_SND_SOC_SOF_AMD_VANGOGH)))
return -ENODEV;

irqflags = IRQF_SHARED;
--
2.43.0

2023-12-11 15:13:47

by Emil Velikov

[permalink] [raw]
Subject: Re: [PATCH 0/5] Improve AMD ACP Vangogh audio support for Steam Deck OLED

On 2023/12/09, Cristian Ciocaltea wrote:
> This patch series provides several fixes and improvements to AMD ACP drivers
> targeting the Vangogh platform, as found on the Valve's new Steam Deck OLED.
>
> Although in theory the board should have been supported by both SOF and legacy
> ACP drivers, as of next-20231208 the audio seems to be completely broken.
>
> Please note this only restores the legacy support, while SOF will be handled in
> a separate series.
>
> Cristian Ciocaltea (5):
> ASoC: amd: vangogh: Drop conflicting ACPI-based probing
> ASoC: amd: vangogh: Allow probing ACP PCI when SOF is disabled
> ASoC: amd: vangogh: Switch to {RUNTIME,SYSTEM_SLEEP}_PM_OPS
> ASoC: amd: acp-config: Add missing MODULE_DESCRIPTION
> ASoC: amd: acp: Add missing MODULE_DESCRIPTION in mach-common
>

If it were me, I'd drop the Fixes tag in the latter two patches since
the warning is harmless and as-is it'll get into the -stable
maintainers' list, who are already pretty swamped with patches.

Regardless, for the series:
Reviewed-by: Emil Velikov <[email protected]>

HTH
Emil

2023-12-11 17:05:20

by Cristian Ciocaltea

[permalink] [raw]
Subject: Re: [PATCH 0/5] Improve AMD ACP Vangogh audio support for Steam Deck OLED

On 12/11/23 17:12, Emil Velikov wrote:
> On 2023/12/09, Cristian Ciocaltea wrote:
>> This patch series provides several fixes and improvements to AMD ACP drivers
>> targeting the Vangogh platform, as found on the Valve's new Steam Deck OLED.
>>
>> Although in theory the board should have been supported by both SOF and legacy
>> ACP drivers, as of next-20231208 the audio seems to be completely broken.
>>
>> Please note this only restores the legacy support, while SOF will be handled in
>> a separate series.
>>
>> Cristian Ciocaltea (5):
>> ASoC: amd: vangogh: Drop conflicting ACPI-based probing
>> ASoC: amd: vangogh: Allow probing ACP PCI when SOF is disabled
>> ASoC: amd: vangogh: Switch to {RUNTIME,SYSTEM_SLEEP}_PM_OPS
>> ASoC: amd: acp-config: Add missing MODULE_DESCRIPTION
>> ASoC: amd: acp: Add missing MODULE_DESCRIPTION in mach-common
>>
>
> If it were me, I'd drop the Fixes tag in the latter two patches since
> the warning is harmless and as-is it'll get into the -stable
> maintainers' list, who are already pretty swamped with patches.

Sure, I can drop them if there is a need for v2.

> Regardless, for the series:
> Reviewed-by: Emil Velikov <[email protected]>

Thanks for the review,
Cristian

> HTH
> Emil

2023-12-19 18:07:18

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 0/5] Improve AMD ACP Vangogh audio support for Steam Deck OLED

On Sat, 09 Dec 2023 22:32:18 +0200, Cristian Ciocaltea wrote:
> This patch series provides several fixes and improvements to AMD ACP drivers
> targeting the Vangogh platform, as found on the Valve's new Steam Deck OLED.
>
> Although in theory the board should have been supported by both SOF and legacy
> ACP drivers, as of next-20231208 the audio seems to be completely broken.
>
> Please note this only restores the legacy support, while SOF will be handled in
> a separate series.
>
> [...]

Applied to

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

Thanks!

[1/5] ASoC: amd: vangogh: Drop conflicting ACPI-based probing
commit: ddd1ee12a8fb6e4d6f86eddeba64c135eee56623
[2/5] ASoC: amd: vangogh: Allow probing ACP PCI when SOF is disabled
commit: 2cef11ec3dfd5f14d8ddef917682408ed01e5805
[3/5] ASoC: amd: vangogh: Switch to {RUNTIME,SYSTEM_SLEEP}_PM_OPS
commit: 78d3924675d4e076faa5600b48b8565fcb135ee0
[4/5] ASoC: amd: acp-config: Add missing MODULE_DESCRIPTION
commit: 6e202e758b4b8d85dfb909c8eb710db8c6160303
[5/5] ASoC: amd: acp: Add missing MODULE_DESCRIPTION in mach-common
commit: 576f3aef47f42f368db08fd5e3f49880c4493bf5

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