Created attachment 2004389 [details] the kernel log. 1. Please describe the problem: Huawei Matebook D16 (HWY-WXX9), with an es8336 audio codec, after installing a clean copy of fedora rawhide, checking all the firmware, the sound is dead: the sound card is gone when doing cat /proc/asound/cards, only hdmi audio interface shows up 2. What is the Version-Release number of the kernel: kernel-6.7.0-0.rc5.20231213git88035e5694a8.43.fc40.x86_64 3. Did it work previously in Fedora? If so, what kernel version did the issue *first* appear? Old kernels are available for download at https://koji.fedoraproject.org/koji/packageinfo?packageID=8 : i don't think it ever worked. the kernel got a commit related to adding support of this laptop's audio codec only a week ago. 4. Can you reproduce this issue? If so, please provide the steps to reproduce the issue below: 1) install fedora (workstation/rawhide) 2) open settings 3) navigate to audio 4) see dummy output 5) cope 5. Does this problem occur with the latest Rawhide kernel? To install the Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by ``sudo dnf update --enablerepo=rawhide kernel``: yes. 6. Are you running any modules that not shipped with directly Fedora's kernel?: no. 7. Please attach the kernel logs. You can get the complete kernel log for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the issue occurred on a previous boot, use the journalctl ``-b`` flag.
issue persists with kernel 6.7.0-0.rc5.20231215git3f7168591ebf.45.fc40
Apparently the Fedora kernel is missing the proper module that enables the sound driver. It would be perfect if the CONFIG_SND_SOC_AMD_LEGACY_MACH flag was enabled in the kernel configuration. Also there is a regression in the PM handling of the AMD ACP sound controller. Here you will find further information: > https://github.com/codepayne/linux-sound-huawei/issues/26
I can build kernel with CONFIG_SND_SOC_AMD_LEGACY_MACH flag enabled, to test it further. Though as for regression in the PM handling, best i can do is use the provided workaround and wait for a fix by AMD...
apparently the fixes are underway. Here is the list: https://patchwork.kernel.org/project/alsa-devel/patch/20231113123345.2196504-1-Syed.SabaKareem@amd.com/ https://patchwork.kernel.org/project/alsa-devel/patch/20231116053405.2574081-1-Syed.SabaKareem@amd.com/ https://patchwork.kernel.org/project/alsa-devel/patch/20231215130300.1247475-1-Syed.SabaKareem@amd.com/ One had been lost and was re-sent on Friday 15 December but I don't know if it will already be included in the latest release candidate... let's hope.
I opened a merge request to enable the necessary flags. This is my first time contributing so let's see how it unwraps https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2842
the driver is finally enabled in today's Fedora Workstation Rawhide. You still need to apply the workaround but try it and let us know.
Can confirm that with using the latest (at the moment of writing this) kernel, and applied workaround, the sound works. The only thing left to fix, is the internal mic, i guess
the sound is popping after a bit time passes from the last audio played. could be related to the regression
sound is sped up after leaving sleep mode, it seems. Looks like i'm replication the known issues from the linux-sound-huawei now.
(In reply to Igor Ch from comment #7) > Can confirm that with using the latest (at the moment of writing this) > kernel, and applied workaround, the sound works. The only thing left to fix, > is the internal mic, i guess Both the internal and headset mic are working but the former is not detected by Pipewire (or whatever it is, I don't know how the audio stack works). You can test them by running: > arecord -f S32_LE -c 2 -r 48000 -D hw:1,1 | aplay where hw:1,1 is the internal mic and hw:1,0 is the headset mic. I got the devices by running arecord -l A custom profile is probably needed. We could ask on the pipewire repo. (In reply to Igor Ch from comment #9) > Looks like i'm replication the known issues from the linux-sound-huawei now. yep, I would move the discussion to the respective repos. As for Fedora, I don't think there is anything else to do.
The issue of accelerated audio when using pipewire has been fixed https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3744 Also, as of kernel 6.8-rc the workaround is no longer needed. Maybe this ticket can be marked as solved?