Bug 212159

Summary: No sound cards detected on Kabylake laptops after upgrade to kernel 5.8
Product: Drivers Reporter: Chris Chiu (chris.chiu)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED DUPLICATE    
Severity: high CC: yxl_22
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 5.8 Subsystem:
Regression: No Bisected commit-id:

Description Chris Chiu 2021-03-09 13:05:15 UTC
We have received reports that on some Kabylake laptops (Acer Swift SF314-54/55 and Lenovo Yoga C930...etc), all sound cards no longer be detected after upgrade to kernel later than 5.8. These laptops have one thing in common, all of them have Realtek audio codec and connect the internal microphone to DMIC of the Intel SST controller either [8086:9d71] or [8086:9dc8]. Please refer to https://bugzilla.kernel.org/show_bug.cgi?id=201251#c246 and https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1915117.

    From the dmesg of kernel 5.8, the sound related parts only output as follows but the expected snd_hda_codec_realtek and the snd_soc_skl are not even loaded then.
[ 13.357495] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 13.357500] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SST driver

    Building the kernel with the CONFIG_SND_SOC_INTEL_KBL removed can load the snd_hda_codec_realtek successfully. The pulseaudio and alsa-utils can detect the sound cards again. The result of bisecting between kernel 5.4 and 5.8 also get similar result, reverting the commit "ALSA: hda: Allow SST driver on SKL and KBL platforms with DMIC" (https://github.com/torvalds/linux/commit/df1fceacb24853d79f41a1dd717b32ab08fa5f3f) can fix the issue. I tried to generate the required firmware for snd_soc_skl but it did not help. Please refer to what I did in https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1915117/comments/14 and https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1915117/comments/18.

    Since the skl_hda_dsp_generic-tplg.bin and dfw_sst.bin are not in
the linux-firmware for SKL Intel SST which means the Intel SST support for Skylake family is not yet complete. Can we simply revert the "ALSA: hda: Allow SST driver on SKL and KBL platforms with DMIC" in the current stage and wait for SOF support for Skylake family? Or please suggest a better solution for this. Thanks
Comment 1 Chris Chiu 2021-03-09 13:08:50 UTC

*** This bug has been marked as a duplicate of bug 212081 ***
Comment 2 Xiaoliang Yu 2021-03-09 13:21:17 UTC
Many PCH ID 9d71 cards behave like this. It seems that most if the mainstream distros including fedora and ubuntu has dropped the codec support for skl platform in their kconfigs, I'm going to try re-compiling the vanilla kernel with those options on and see what will happen.
Without related kconfig options on , it won't work even if you get all modules/tplg/codecs pre-compiled and copied to the target machine.
Comment 3 Xiaoliang Yu 2021-03-10 05:58:20 UTC
(In reply to Chris Chiu from comment #1)
> 
> *** This bug has been marked as a duplicate of bug 212081 ***

Folowwing https://gist.github.com/crojewsk/4e6382bfb0dbfaaf60513174211f29cb sound output and dmic start to work, but still needs further fixing.

The volume for microhpne is too low to record any sound, 3.5mm detection fails, and the combo jack is not working.
Comment 4 Chris Chiu 2021-03-10 06:03:36 UTC
Can you try to quirk the pin like what I do in https://sourcegraph.com/github.com/torvalds/linux/-/commit/d0e185616a0331c87ce3aa1d7dfde8df39d6d002?visible=1 to verify if the jack detection works for you?
Comment 5 Xiaoliang Yu 2021-03-10 06:52:32 UTC
(In reply to Chris Chiu from comment #4)
> Can you try to quirk the pin like what I do in
> https://sourcegraph.com/github.com/torvalds/linux/-/commit/
> d0e185616a0331c87ce3aa1d7dfde8df39d6d002?visible=1 to verify if the jack
> detection works for you?

Is it in ubuntu kernel yet? I tried with ubuntu live-iso and it appears to be the same as fedora. SST driver should work in ubuntu, the critical kconfig CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC is not set in ubuntu kernel(pretty much in every distro) as well.

It's from a different vendor(Xiaomi Device [1d72:1947]) but sure, keep changing the pins and I believe it will be functional somehow. 

I'm on a cml-y notebook and it's the only device I can use currently. It's too slow to do the compiling. So I will try retasking first since it takes too long to compile again and again and again with different combinations.

As for the microphone, it stops working after resuming from S0 state, which may needs another fix together with the volume issue.