Bug 218677

Summary: Steam Deck OLED 6.8.2 nau8821-max fails
Product: Drivers Reporter: Daniel (dmanlfc)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: NEW ---    
Severity: normal CC: bagasdotme
Priority: P3    
Hardware: AMD   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:

Description Daniel 2024-04-02 22:58:18 UTC
I'm adding this here, I hope it's the correct place.

Currently the Steam Deck OLED fails with Kernel 6.8.2 when trying to initialise the topology for the device.
I'm using the `sof-vangogh-nau8821-max.tplg` file from the Steam Deck OLED and associated firmware.

When I manually patched support for the 6.6 or 6.7 mainline kernel it worked fine.
Now the official implementation fails as per below.

Do we need an updated topology file?

dmesg info...

[   12.844720] snd_hda_intel 0000:04:00.1: enabling device (0000 -> 0002)
[   12.846177] snd_hda_intel 0000:04:00.1: Handle vga_switcheroo audio client
[   12.853045] max98388 i2c-ADS8388:00: MAX98388 revisionID: 0x41
[   12.854798] max98388 i2c-ADS8388:01: MAX98388 revisionID: 0x41
[   13.049834] input: HD-Audio Generic HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:08.1/0000:04:00.1/sound/card0/input10
[   13.095674] input: FTS3528:00 2808:1015 as /devices/platform/AMDI0010:01/i2c-1/i2c-FTS3528:00/0018:2808:1015.0003/input/input16
[   13.114799] input: HD-Audio Generic HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:08.1/0000:04:00.1/sound/card0/input11
[   13.115023] input: Valve Software Steam Controller as /devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb1/1-3/1-3:1.0/0003:28DE:1205.0001/input/input19
[   13.120952] snd_sof_amd_vangogh 0000:04:00.5: enabling device (0000 -> 0002)
[   13.167809] snd_sof_amd_vangogh 0000:04:00.5: Firmware paths/files for ipc type 0:
[   13.169329] snd_sof_amd_vangogh 0000:04:00.5:  Topology file:     amd/sof-tplg/sof-vangogh-nau8821-max.tplg
[   13.171103] input: FTS3528:00 2808:1015 UNKNOWN as /devices/platform/AMDI0010:01/i2c-1/i2c-FTS3528:00/0018:2808:1015.0003/input/input18
[   13.171619] input: HD-Audio Generic HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:08.1/0000:04:00.1/sound/card0/input12
[   13.172518] hid-steam 0003:28DE:1205.0001: input,hidraw2: USB HID v1.10 Mouse [Valve Software Steam Controller] on usb-0000:04:00.4-3/input0
[   13.172556] input: HD-Audio Generic HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:08.1/0000:04:00.1/sound/card0/input13
[   13.173623] hid-steam 0003:28DE:1205.0004: hiddev0: USB HID v1.10 Device [Valve Software Steam Controller] on usb-0000:04:00.4-3/input2
[   13.215330] snd_sof_amd_vangogh 0000:04:00.5: Firmware info: version 0:0:0-7863d
[   13.217053] snd_sof_amd_vangogh 0000:04:00.5: Firmware: ABI 3:26:0 Kernel ABI 3:23:0
[   13.234447] hid-steam 0003:28DE:1205.0004: Steam Controller 'FYZZ34102C64' connected
[   13.242606] input: Steam Deck as /devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb1/1-3/1-3:1.2/0003:28DE:1205.0004/input/input20
[   13.289530] snd_sof_amd_vangogh 0000:04:00.5: Topology: ABI 3:26:0 Kernel ABI 3:23:0
[   13.291262] hid-multitouch 0018:2808:1015.0003: input,hidraw1: I2C HID v1.00 Device [FTS3528:00 2808:1015] on i2c-FTS3528:00
[   13.291402] sof_mach nau8821-max: ASoC: physical link acp-bt-codec (id 2) not exist
[   13.291500] input: Valve Software Steam Controller as /devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb1/1-3/1-3:1.1/0003:28DE:1205.0002/input/input21
[   13.296647] sof_mach nau8821-max: ASoC: topology: could not load header: -22
[   13.298510] snd_sof_amd_vangogh 0000:04:00.5: error: tplg component load failed -22
[   13.300270] snd_sof_amd_vangogh 0000:04:00.5: error: failed to load DSP topology -22
[   13.302008] snd_sof_amd_vangogh 0000:04:00.5: ASoC: error at snd_soc_component_probe on 0000:04:00.5: -22
[   13.303785] sof_mach nau8821-max: ASoC: failed to instantiate card -22
[   13.305586] sof_mach nau8821-max: error -EINVAL: Failed to register card(sof-nau8821-max)
Comment 1 Daniel 2024-04-03 01:24:20 UTC
I think I see the problem - `BT_BE_ID` is enum 3, not 2.
Comment 2 Daniel 2024-04-03 05:05:59 UTC
This fixed it, I don't know if this should be changed upstream or an updated topology file.
Comment 3 Bagas Sanjaya 2024-04-06 13:03:37 UTC
(In reply to Daniel from comment #0)
> I'm adding this here, I hope it's the correct place.
> 
> Currently the Steam Deck OLED fails with Kernel 6.8.2 when trying to
> initialise the topology for the device.
> I'm using the `sof-vangogh-nau8821-max.tplg` file from the Steam Deck OLED
> and associated firmware.
> 
> When I manually patched support for the 6.6 or 6.7 mainline kernel it worked
> fine.
> Now the official implementation fails as per below.
> 

Can you attach the patch?

> Do we need an updated topology file?

Where is it?

Confused...
Comment 4 Bagas Sanjaya 2024-04-06 13:11:33 UTC
Forwarded to LKML [1].

[1]: https://lore.kernel.org/lkml/ZhFJZoful6nEFskW@archie.me/
Comment 5 Daniel 2024-04-06 13:36:28 UTC
Here you go:

diff --git a/sound/soc/amd/acp/acp-mach.h b/sound/soc/amd/acp/acp-mach.h
index a48546d8d4..3b69dfa806 100644
--- a/sound/soc/amd/acp/acp-mach.h
+++ b/sound/soc/amd/acp/acp-mach.h
@@ -27,8 +27,8 @@
 enum be_id {
 	HEADSET_BE_ID = 0,
 	AMP_BE_ID,
+    BT_BE_ID,
 	DMIC_BE_ID,
-	BT_BE_ID,
 };
 
 enum cpu_endpoints {