Bug 1217412

Summary: [aarch64][LenovoX13s] Missing wsa883x module for audio
Product: [openSUSE] openSUSE Tumbleweed Reporter: neobrain <deafening_trough502>
Component: KernelAssignee: openSUSE Kernel Bugs <kernel-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: afaerber, andrea.porta, ddavis, deafening_trough502, guillaume.gardet, ivan.ivanov, jcheung, jlee, jslaby, software_suseidp, tiwai
Version: CurrentFlags: guillaume.gardet: needinfo? (deafening_trough502)
Target Milestone: ---   
Hardware: aarch64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description neobrain 2023-11-22 16:23:41 UTC
The Lenovo X13s requires the wsa883x module to be enabled for audio support [1]. I verified this by building this module in isolation (i.e. without rebuilding the kernel and without otherwise changing the kernel config). Booting with the added module gets audio working (with some extra userspace bits from alsa-ucm and kernel-firmware).

CONFIG_SND_SOC_WSA883X=m

Could this module be built by default on aarch64 in openSUSE to get audio working out-of-the-box more easily?

[1] Example config in a dev branch for the X13s's SoC: https://github.com/jhovold/linux/blob/b2672eee6bf5e99bdc18d6a3e64df3dd96634059/arch/arm64/configs/johan_defconfig#L243C19-L243C19
Comment 1 Takashi Iwai 2023-11-22 16:28:48 UTC
Sure, it's fine to enable the module.
Is it the only missing one?
Comment 2 neobrain 2023-11-22 16:37:15 UTC
Yup, that's the only one I had to add.

It may also be worth knowing that two patches [1][2] to fix audio crackling issues have landed in Kernel 6.7-rc1 and have been proposed for backporting to 6.5/6.6 [3].

[1] https://github.com/jhovold/linux/commit/57630920f9c8b711bdfda5f7ae23c4fab64e1d95
[2] https://github.com/jhovold/linux/commit/3baa5a6153326e92a7355182c237911f5db5bead
[3] https://lore.kernel.org/all/ZV4hMR8oGQBSbnMl@hovoldconsulting.com/
Comment 3 Takashi Iwai 2023-11-22 16:54:52 UTC
OK, thanks.  Now I pushed the update of config/arm64/default and the backport of those two commits.
(The first commit can't be applied cleanly and needed some modification -- as now hitting to stable process; we can replace with the stable patches once after they landed, too.)
Comment 4 neobrain 2023-11-22 17:05:05 UTC
Impressive turnaround time, thanks! :)
Comment 10 Guillaume GARDET 2023-12-05 14:55:22 UTC
@neobrain, Could you test latest Tumbleweed please? Snapshot 20231203 [0] includes the kernel update which should solve this bug.

On my side, it did fix audio with GNOME live image, but the reduced package set may be the cause.

https://lists.opensuse.org/archives/list/arm@lists.opensuse.org/thread/2GRYHK42UHIDDWFE7NQ6PTHUMXT3KTBT/
Comment 11 neobrain 2023-12-05 17:17:55 UTC
Yup, can confirm audio is working here now with the current 6.6.3 kernel in TW.
Comment 12 neobrain 2023-12-06 08:55:00 UTC
For reference, it looks like PipeWire has problems playing back videos in Firefox properly: Videos on YouTube and other sites play around 20% too fast (causing audio to be higher-pitched than normally). Switching from pipewire to pulseaudio (zypper in pulseaudio) resolved this issue.

People on other distributions have reported the same effect, though I'm not sure if that's a bug in PipeWire itself then or somewhere else.
Comment 13 Takashi Iwai 2023-12-06 09:05:43 UTC
A possible difference is either the sample rate (44.1kHz vs 48kHz) or the period / buffer sizes.  PW uses a small period / buffer sizes while PA tries as large as possible.

You can observe the hardware setup in /proc/asound/card*/pcm* proc entries while playback.  It might give some hint.
Comment 21 Urvi Monty 2024-01-27 14:41:40 UTC
This appears to be broken again as of kernel-default-6.7.1-1.1.aarch64

The wsa883x module is not present at all. Audio is no longer working.

ls /usr/lib/modules
6.6.11-1-default  6.7.1-1-default

find /usr/lib/modules -name *wsa883*
/usr/lib/modules/6.6.11-1-default/kernel/sound/soc/codecs/snd-soc-wsa883x.ko.zst
Comment 22 Takashi Iwai 2024-01-29 14:36:08 UTC
The config seems to have been lost during the merge from master branch.
The fix was submitted.
Comment 27 Jiri Slaby 2024-07-10 05:10:02 UTC
I assume this fixed?
Comment 28 neobrain 2024-07-10 07:03:11 UTC
Yes, this has been working again for a while. Thanks all!