Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 877911 - sys-kernel/gentoo-sources-6.0.3: sound broken on hda codec
Summary: sys-kernel/gentoo-sources-6.0.3: sound broken on hda codec
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-22 14:52 UTC by Stefan Trenker
Modified: 2022-10-27 11:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
dmesg of broken kernel (dmesg-6.0.3-hda_codec-broken,82.43 KB, text/plain)
2022-10-22 14:54 UTC, Stefan Trenker
Details
dmesg of "fixed" kernel (dmesg-6.0.3-hda_codec-OK,84.89 KB, text/plain)
2022-10-22 14:54 UTC, Stefan Trenker
Details
HW Info (hwinfo,190.97 KB, text/plain)
2022-10-22 14:55 UTC, Stefan Trenker
Details
Kernel Config (6.0.3-kernel-config,208.95 KB, text/plain)
2022-10-22 14:55 UTC, Stefan Trenker
Details
Kernel Commit i have reverted (hda_codec-TO-BE-REVERTED.patch,2.52 KB, patch)
2022-10-22 14:56 UTC, Stefan Trenker
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Trenker 2022-10-22 14:52:34 UTC
On my Lenovo ThinkPad X1 Carbon Gen9 sound is broken on gentoo-sources-6.0.3.

"dmesg | grep hda" shows:
[   11.993449] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Parent card not yet available, widget card binding deferred
[   12.001169] snd_hda_codec_hdmi ehdaudio0D2: failed to create hda codec -12
[   12.001258] snd_hda_codec_hdmi ehdaudio0D2: ASoC: error at snd_soc_component_probe on ehdaudio0D2: -12
[   12.001283] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: failed to instantiate card -12
[   12.001494] skl_hda_dsp_generic: probe of skl_hda_dsp_generic failed with error -12

When I revert commit:
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 384426d7e9ddc..4ae8b9574778b 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c

from gentoo-sources-6.0.3 by "patch -R -p1 <...", sound is working again. The above dmesg then reads:
[   11.447436] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Parent card not yet available, widget card binding deferred
[   11.484308] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC287: line_outs=2 (0x14/0x17/0x0/0x0/0x0) type:speaker
[   11.484314] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   11.484315] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[   11.484317] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[   11.484318] snd_hda_codec_realtek ehdaudio0D0:    inputs:
[   11.484319] snd_hda_codec_realtek ehdaudio0D0:      Mic=0x19
[   11.530073] snd_hda_codec_realtek ehdaudio0D0: ASoC: sink widget AIF1TX overwritten
[   11.530085] snd_hda_codec_realtek ehdaudio0D0: ASoC: source widget AIF1RX overwritten
[   11.530242] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi3 overwritten
[   11.530249] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi2 overwritten
[   11.530253] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi1 overwritten
[   11.530257] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Codec Output Pin1 overwritten
[   11.530261] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Codec Input Pin1 overwritten
[   11.530267] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Analog Codec Playback overwritten
[   11.530272] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Digital Codec Playback overwritten
[   11.531264] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Alt Analog Codec Playback overwritten
[   11.531952] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Analog Codec Capture overwritten
[   11.531959] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Digital Codec Capture overwritten
[   11.531964] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Alt Analog Codec Capture overwritten
[   11.531975] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
[   11.555839] input: sof-hda-dsp Mic as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input20
[   11.555890] input: sof-hda-dsp Headphone as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input21
[   11.555954] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input22
[   11.556016] input: sof-hda-dsp HDMI/DP,pcm=4 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input23
[   11.556051] input: sof-hda-dsp HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input24

Seeing this i suggest to remove the mentioned commit from the tree (or find the error in this commit and patch the patch)

Reproducible: Always
Comment 1 Stefan Trenker 2022-10-22 14:54:20 UTC
Created attachment 825035 [details]
dmesg of broken kernel
Comment 2 Stefan Trenker 2022-10-22 14:54:52 UTC
Created attachment 825037 [details]
dmesg of "fixed" kernel
Comment 3 Stefan Trenker 2022-10-22 14:55:23 UTC
Created attachment 825039 [details]
HW Info
Comment 4 Stefan Trenker 2022-10-22 14:55:50 UTC
Created attachment 825041 [details]
Kernel Config
Comment 5 Stefan Trenker 2022-10-22 14:56:33 UTC
Created attachment 825043 [details, diff]
Kernel Commit i have reverted
Comment 6 Mike Pagano gentoo-dev 2022-10-22 15:05:55 UTC
omg best bug report ever.  Thanks, I'll take a look.
Comment 7 Mike Pagano gentoo-dev 2022-10-26 15:52:24 UTC
This patch is reverted in 6.0.4 and now available in gentoo-sources-6.0.5.

Can you test, please?
Comment 8 Stefan Trenker 2022-10-26 18:10:47 UTC
(In reply to Mike Pagano from comment #7)
> This patch is reverted in 6.0.4 and now available in gentoo-sources-6.0.5.
> 
> Can you test, please?

I can confirm the fix.
In gentoo-sources-6.0.5 sound is working again for my Lenovo Laptop

bully ~ # dmesg | grep hda
[   12.831154] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 5
[   12.831158] sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[   12.946247] Loading firmware: intel/sof-tplg/sof-hda-generic-4ch.tplg
[   12.947537] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Parent card not yet available, widget card binding deferred
[   12.987234] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC287: line_outs=2 (0x14/0x17/0x0/0x0/0x0) type:speaker
[   12.987238] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   12.987240] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[   12.987241] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[   12.987241] snd_hda_codec_realtek ehdaudio0D0:    inputs:
[   12.987242] snd_hda_codec_realtek ehdaudio0D0:      Mic=0x19
[   13.034758] snd_hda_codec_realtek ehdaudio0D0: ASoC: sink widget AIF1TX overwritten
[   13.034768] snd_hda_codec_realtek ehdaudio0D0: ASoC: source widget AIF1RX overwritten
[   13.034908] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi3 overwritten
[   13.034913] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi2 overwritten
[   13.034917] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi1 overwritten
[   13.034921] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Codec Output Pin1 overwritten
[   13.034925] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Codec Input Pin1 overwritten
[   13.034930] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Analog Codec Playback overwritten
[   13.034935] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Digital Codec Playback overwritten
[   13.034940] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Alt Analog Codec Playback overwritten
[   13.034946] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Analog Codec Capture overwritten
[   13.034952] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Digital Codec Capture overwritten
[   13.034957] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Alt Analog Codec Capture overwritten
[   13.034969] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
[   13.059317] input: sof-hda-dsp Mic as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input20
[   13.059370] input: sof-hda-dsp Headphone as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input21
[   13.059406] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input22
[   13.059447] input: sof-hda-dsp HDMI/DP,pcm=4 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input23
[   13.059487] input: sof-hda-dsp HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input24

bully ~ # uname -a
Linux bully 6.0.5-gentoo-x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 26 19:27:33 CEST 2022 x86_64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz GenuineIntel GNU/Linux
Comment 9 Mike Pagano gentoo-dev 2022-10-27 11:29:51 UTC
Thanks for testing and letting us know.