Bug 2254698 - HWY-WXX9 sound dead
Summary: HWY-WXX9 sound dead
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-12-15 09:11 UTC by Igor Ch
Modified: 2024-03-06 18:45 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
the kernel log. (111.49 KB, text/plain)
2023-12-15 09:11 UTC, Igor Ch
no flags Details

Description Igor Ch 2023-12-15 09:11:57 UTC
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.

Comment 1 Igor Ch 2023-12-16 21:33:57 UTC
issue persists with kernel 6.7.0-0.rc5.20231215git3f7168591ebf.45.fc40

Comment 2 Tommaso 2023-12-17 10:31:34 UTC
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

Comment 3 Igor Ch 2023-12-17 10:47:06 UTC
 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...

Comment 4 Tommaso 2023-12-17 11:04:54 UTC
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.

Comment 5 Tommaso 2023-12-24 11:28:24 UTC
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

Comment 6 Tommaso 2023-12-27 10:06:13 UTC
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.

Comment 7 Igor Ch 2023-12-27 16:47:14 UTC
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

Comment 8 Igor Ch 2023-12-27 17:09:09 UTC
the sound is popping after a bit time passes from the last audio played. could be related to the regression

Comment 9 Igor Ch 2023-12-27 17:21:53 UTC
sound is sped up after leaving sleep mode, it seems. Looks like i'm replication the known issues from the linux-sound-huawei now.

Comment 10 Tommaso 2023-12-28 11:47:22 UTC
(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.

Comment 11 Tommaso 2024-03-06 18:45:47 UTC
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?


Note You need to log in before you can comment on or make changes to this bug.