Bug 1161152 - No sound in qemu openQA since update to kernel 5.4
No sound in qemu openQA since update to kernel 5.4
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel
Current
aarch64 Other
: P5 - None : Normal (vote)
: ---
Assigned To: E-mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-01-17 07:22 UTC by Guillaume GARDET
Modified: 2020-01-20 11:00 UTC (History)
6 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Fix patch (7.02 KB, patch)
2020-01-20 10:40 UTC, Takashi Iwai
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume GARDET 2020-01-17 07:22:23 UTC
There is no sound in openQA tests within qemu since update to kernel 5.4. Kernel 5.3 was fine.

Related kernel traces: 
[   16.337715] snd_hda_intel 0000:00:01.0: CORB reset timeout#1, CORBRP = 0
[   16.338620] snd_hda_intel 0000:00:01.0: no codecs found!

Full serial log: 
https://openqa.opensuse.org/tests/1146059/file/serial0.txt
Comment 1 Takashi Iwai 2020-01-17 08:36:49 UTC
Interesting, I didn't know that qemu emulates the HD-audio device even on arm64.

Does the problem appear not specifically on openQA but generally with qemu and linux-5.4 on arm?
Comment 2 Guillaume GARDET 2020-01-17 09:13:08 UTC
Yes, this is a problem in qemu on aarch64, not only within openQA.

There were some updates on snd_hda_intel between kernel 5.3 and 5.4.
Comment 3 Takashi Iwai 2020-01-17 10:44:37 UTC
Right, and the question is which change hitting this.  I suspect the change of the register accessor to the direct MMIO read/write, but not quite sure.

What's the easiest procedure to reproduce and debug locally, preferably without the dedicated hardware?
Comment 4 Guillaume GARDET 2020-01-17 11:23:08 UTC
The easiest way, would be use JeOS image from:
https://openqa.opensuse.org/tests/1146608/asset/hdd/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64-2020.01.08-Snapshot20200115.raw.xz

uncompress it and boot it manually with qemu-system-aarch64.
Info at: https://en.opensuse.org/openSUSE:AArch64#Running_openSUSE_from_raw_image

Do not forget to add '-soundhw hda' option for qemu-system-aarch64.
Comment 5 Takashi Iwai 2020-01-17 13:49:26 UTC
Thanks, I could reproduce it locally.  Will debug / test further later.

(BTW, qemu-uef-aarch64 is missing on Leap 15.1 or TW?)
Comment 6 Guillaume GARDET 2020-01-17 14:30:17 UTC
(In reply to Takashi Iwai from comment #5)
> Thanks, I could reproduce it locally.  Will debug / test further later.

Great, thanks.

> (BTW, qemu-uef-aarch64 is missing on Leap 15.1 or TW?)

It is a known problem. qemu-uefi-aarch64 is only in ARM repos because there is no export to x86_64 repo (built in aarch64 only).
Comment 7 Takashi Iwai 2020-01-20 10:40:28 UTC
Found out that it's a regression due to the recent simplification of HD-audio helper code.  The aligned MMIO access is enforced for ARM, not only for snd-hda-tegra but also for snd-hda-intel, and that broke QEMU by some unknown reason.

I'm going to submit the fix patch to upstream and backport to relevant branches.
Comment 8 Takashi Iwai 2020-01-20 10:40:46 UTC
Created attachment 827816 [details]
Fix patch
Comment 9 Guillaume GARDET 2020-01-20 10:46:10 UTC
(In reply to Takashi Iwai from comment #7)
> Found out that it's a regression due to the recent simplification of
> HD-audio helper code.  The aligned MMIO access is enforced for ARM, not only
> for snd-hda-tegra but also for snd-hda-intel, and that broke QEMU by some
> unknown reason.
> 
> I'm going to submit the fix patch to upstream and backport to relevant
> branches.

Thanks a lot!
Comment 10 Takashi Iwai 2020-01-20 11:00:09 UTC
The fix was pushed to stable for-next branch.  It'll be merged soon later (hopefully).