[SRU] add ucm to make alsa/sof driver work under PA (variants of Lenovo X1 Carbon 7th, Dell cnl and cml machines)

Bug #1859754 reported by Hui Wang
48
This bug affects 7 people
Affects Status Importance Assigned to Milestone
HWE Next
Fix Released
Undecided
Unassigned
alsa-lib (Ubuntu)
Invalid
Undecided
Unassigned
Bionic
Fix Released
Undecided
Hui Wang
Eoan
Fix Released
Undecided
Hui Wang

Bug Description

This ucm is only for Eoan and Bionic, for focal and future versions, we plan to integrate the ucm2 instead of this ucm, and the ucm2 depends on the alsa-lib-1.2.1 and pluseaudio-v14, the ucm2 is under developing by the community, is not ready yet.

[Impact]
In the oem project, we have a couple of Lenovo and Dell machines which
connect the digital mic to PCH directly, this design needs the new
sound driver soc/sof, and this driver can't work under pulseaudio
automatically, we need to integrate the ucm for the driver, then the
sof dirver could work under pulseaudio and gnome.

This ucm is maintained by intel audio team, and it is not upstreamed
and will not be upstreamed, since the community is developing the ucm2
which is based on at least alsa-lib-1.2.1 and pulseaudio-v14.0 (still
under developing), for bionic and eoan, we have to integrate this ucm
since the alsa-lib version is too low. For focal and future version, we
are going to integrate the ucm2 after the ucm2 is ready.

This ucm is already verified in the oem project, now it is time to put it
into the stock ubuntu.

[Fix]
These ucm files are backported from sof_ucm1 branch of
https://github.com/thesofproject/alsa-ucm-conf.git

[Test Case]
Boot the eoan kernel or oem-osp1-bionic kernel, then check the log of
pulseaudio, the ucm files are loaded successfully, then check the
gnome-sound-setting, both output and input devices work well.

[Regression Risk]
Low, just add some new ucm files, and this will not affect other machines,
and those new added ucm files are only used by specific machines which enable
the sof driver.

Hui Wang (hui.wang)
Changed in alsa-lib (Ubuntu):
importance: Undecided → High
tags: added: originate-from-1856130 somerville
Revision history for this message
Hui Wang (hui.wang) wrote :

This is the debdiff for eoan:

Revision history for this message
Hui Wang (hui.wang) wrote :

This is the debdiff for bionic:

Hui Wang (hui.wang)
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, I'm going to sponsor that, including to focal since by SRU rules we need to get the fix there first. That's going to be replaced by the alsa update at some point but that one is not ready yet

Changed in alsa-lib (Ubuntu):
status: New → Fix Committed
Revision history for this message
Hui Wang (hui.wang) wrote :

Thanks Seb.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Is the same change still present in the current focal-proposed alsa-lib 1.2.1.2-2 ?

Revision history for this message
Hui Wang (hui.wang) wrote :

Reply #5:

No, the change is not in the 1.2.1 and will not apply to 1.2.1. these confs are ucm1 version, they are only for eoan and bionic. For alsa-lib 1.2.1, the upstream is writing ucm2 confs and it is not finished yet. So let's SRU the ucm confs for eoan and bionic first. And in future the ucm2 conf are not in the alsa-lib anymore, they are moved to https://github.com/alsa-project/alsa-ucm-conf.

In order to help us enable the dmic on eoan and bionic, Intel is maintaining these ucm1 confs (https://github.com/thesofproject/alsa-ucm-conf.git).

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Hui, or anyone else affected,

Accepted alsa-lib into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/alsa-lib/1.1.9-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in alsa-lib (Ubuntu Eoan):
status: New → Fix Committed
tags: added: verification-needed verification-needed-eoan
Changed in alsa-lib (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Hui, or anyone else affected,

Accepted alsa-lib into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/alsa-lib/1.1.3-5ubuntu0.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Hui Wang (hui.wang) wrote : Re: add ucm to make alsa/sof driver work under PA (variants of Lenovo X1 Carbon 7th, Dell cnl and cml machines)

Recently some users reported the headset-mic input volume is too low, after installing the 1.1.9-0ubuntu1.1 on eoan and 1.1.3-5ubuntu0.3 on bionic, I reproduced the issue of "headset-mic input volume is too low", so please drop the debdiff of #1 and #2, I will upload new debdiffs which put the input volume higher.

Verification failed on Eoan (input volume is to low):
On a machine of Lenovo X1 Carbon 7th, I already installed 19.10 (eoan) on it, then run sudo apt install libasound2, then the libasound is upgraded to 1.1.9-0ubuntu1.1, check the /usr/share/alsa/ucm, all expected folders and files are there. upgrade the linux-firmware to 1.183.4, put snd_hda_intel and snd_soc_skl in the /etc/modporbe.d/blacklist.conf, reboot

now we could see speaker, dmic from gnome-sound-setting, if plug headset, we could see headphone and headset-mic from UI, if we plug hdmi monitor with audio capability, we could see hdmi-audio from UI, all worked as expected.

But there is one issue, for headset-mic, we need to set the input volume to maximum from UI, otherwise I couldn't record any sound.

Verification failed on Bionic (input volume is to low):
On a machine of Dell vistro 5390, I already installed 18.04 (bionic) on it, then run sudo apt install libasound2, then the libasound is upgraded to 1.1.3-5ubuntu0.3, check the /usr/share/alsa/ucm, all expected folders and files are there. upgrade the linux-firmware to 1.173.15, Install the linux-oem-osp1 kernel, put snd_soc_skl in the /etc/modporbe.d/blacklist.conf, reboot

now we could see speaker, dmic from gnome-sound-setting, if plug headset, we could see headphone and headset-mic from UI, if we plug hdmi monitor with audio capability, we could see hdmi-audio from UI, all worked as expected.

But there is one issue, for headset-mic, we need to set the input volume to maximum from UI, otherwise I couldn't record any sound.

tags: added: verification-failed verification-failed-bionic verification-failed-eoan
removed: verification-needed verification-needed-bionic verification-needed-eoan
Revision history for this message
Hui Wang (hui.wang) wrote :

This is the updated debdiff for eoan (adjust the input volume). thx.

Revision history for this message
Hui Wang (hui.wang) wrote :

This is the updated debdiff for bionic (adjust the input volume). thx.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (alsa-lib/1.1.9-0ubuntu1.1)

All autopkgtests for the newly accepted alsa-lib (1.1.9-0ubuntu1.1) for eoan have finished running.
The following regressions have been reported in tests triggered by the package:

openjdk-lts/11.0.6+10-1ubuntu1~19.10.1 (armhf)
openjdk-lts/blacklisted (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/eoan/update_excuses.html#alsa-lib

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Hui Wang (hui.wang) wrote : Re: add ucm to make alsa/sof driver work under PA (variants of Lenovo X1 Carbon 7th, Dell cnl and cml machines)

For the regression of openjdk-lts/11.0.6+10-1ubuntu1~19.10.1 (armhf), it is a "jdk FLAKY timed out"

For the regression of openjdk-lts/blacklisted (arm64), I can't open the log, it always reports "This package is blacklisted. To get the entry removed, contact a member of the release team." I guess it is a FLAKY test too.

And I checked the log of the 1st regression, it has nothing to do with alsa-lib or libasound2.

If it is OK to enqueue the SRU, please enqueue the debdiff of #10 and #11.

thx.

Revision history for this message
Hui Wang (hui.wang) wrote :

I opened a similar bug for focal, we need to put the alsa-ucm-conf and alsa-topology-conf to the focal image.

This is the bug link: https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/1862505

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :

Any changes to have this backported to 18.04 ?

Revision history for this message
Hui Wang (hui.wang) wrote :

For 18.04 and 19.10, the alsa-lib only supports ucm, Intel audio team write the ucm confs and this is sth I plan to SRU to Eoan and Bionic in this bug.

For 20.04, we choose alsa-lib-1.2.1.2, it supports ucm2, and upstream writes the ucm2 confs based on the Intel audio team's work, we use #1862505 to track it.

So the ucm for bionic and eoan is not backported from ucm2 of 1.2.1.2, it is maintained by Intel: https://github.com/thesofproject/alsa-ucm-conf.git

the ucm2 for focal is maintained by upstream: https://github.com/alsa-project/alsa-ucm-conf.git, it is written based on the Intel's work.

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :
Download full text (5.6 KiB)

On a machine Lenovo Thinkpad X1 Carbon 7th, running Bionic, verification failed.

What i did:

1) Enabled Proposed repository
2) Installed libasound2:

```
> dpkg -l | grep libasound2
ii libasound2:amd64 1.1.3-5ubuntu0.3 amd64 shared library for ALSA applications
ii libasound2-data 1.1.3-5ubuntu0.3 all Configuration files and profiles for ALSA drivers
ii libasound2-plugins:amd64 1.1.1-1ubuntu1 amd64 ALSA library additional plugins

```

3) Upgraded linux-firmware to "1.173.15"
4) Installed "linux-oem-osp1" - "5.0.0-1038-oem-osp1"
5) Verified that all the UCM files are there:

```
ucm
├── apq8064-tabla-snd-card
├── broadwell-rt286
├── chtrt5645
├── DAISY-I2S
├── DB410c
├── Dell-WD15-Dock
├── GoogleNyan
├── HDAudio-Lenovo-DualCodecs
├── LENOVO-20QE000VMC-ThinkPadX1Carbon7th-20QE000VMC
├── LENOVO-20QESITR05-ThinkPadX1Carbon7th-20QESITR05
├── LENOVO-20UB0SIT17-ThinkPadX1YogaGen5-20UB0SIT17
├── LENOVO-MFG_IN_GO-ThinkPad-MFG_IN_GO
├── Manta-I2S
├── Manta-SPDIF
├── msm8974-taiko-mtp-snd-card
├── PandaBoard
├── PandaBoardES
├── PAZ00
├── SDP4430
├── skylake-rt286
├── sof-skl_hda_card
├── tegraalc5632
├── tegra-rt5640
├── Tuna
└── VEYRON-I2S
```

6) Blacklisted "snd_soc_skl" and "snd_hda_intel" on "/etc/modprobe.d/blacklist.conf"
7) Verified that SOF firmware has been loaded correctly:

```
  dmesg | grep sof | grep -iv microsoft
[ 3.558639] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[ 3.558647] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[ 3.558800] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[ 3.567161] sof-audio-pci 0000:00:1f.3: Linked as a consumer to 0000:00:02.0
[ 3.567247] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 3.607451] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[ 3.607454] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 3.641575] sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
[ 3.641577] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[ 3.723585] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:1:0-0f736
[ 3.723587] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:7:0 Kernel ABI 3:6:0
[ 3.723588] sof-audio-pci 0000:00:1f.3: warn: FW ABI is more recent than kernel
[ 3.723793] sof-audio-pci 0000:00:1f.3: firmware boot complete
[ 3.969365] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:7:0 Kernel ABI 3:6:0
[ 3.969366] sof-audio-pci 0000:00:1f.3: warn: topology ABI is more recent than kernel
[ 3.969369] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp3 Tx not handled
[ 3.970268] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec0_in not handled
[ 3.970269] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp2 Tx not handled
[ 3.970986] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec1_in not handled
[ 3.970989] sof-audio-pci 0000:00:1f.3: warning: widget t...

Read more...

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :

Following my last comment, this is what i see from gnome audio settings.

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :

It seems that adding "load-module module-alsa-source device=hw:0,7" to "/etc/pulse/default.pa" i have the mic recognized and working, see the attachment.

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :
Revision history for this message
Hui Wang (hui.wang) wrote :

That is because the ucm is not loaded successfully.

please change cset "name='Headset Mic Boost Volume' 1" to cset "name='Mic Boost Volume' 2" in the all LENOVO_*/LENOVO_*.conf; then reboot.

If it doesn't work, please upload log of "pactl list cards", maybe your machine has a specific dmi string that those 4 folders doesn't match the cardlongname of your machine.

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :
Download full text (3.4 KiB)

Thanks for your reply @hui.wang

So, i've tried to change "name='Mic Boost Volume' 2"" all the LENOVO files but nothing changed.

Your assumption about the cardlongname was right, because it seems that is different from the versioned ones, mine is "LENOVO-20QD00LKIX-ThinkPadX1Carbon7th-20QD00LKIX".

  pactl list cards
Card #0
 Name: alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic
 Driver: module-alsa-card.c
 Owner Module: 7
 Properties:
  alsa.card = "0"
  alsa.card_name = "sof-skl_hda_card"
  alsa.long_card_name = "LENOVO-20QD00LKIX-ThinkPadX1Carbon7th-20QD00LKIX"
  alsa.driver_name = "snd_soc_skl_hda_dsp"
  device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
  sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
  device.bus = "pci"
  device.vendor.id = "8086"
  device.vendor.name = "Intel Corporation"
  device.product.id = "9dc8"
  device.string = "0"
  device.description = "sof-skl_hda_card"
  module-udev-detect.discovered = "1"
  device.icon_name = "audio-card-pci"
 Profiles:
  input:stereo-fallback: Stereo Input (sinks: 0, sources: 1, priority: 51, available: no)
  input:multichannel-input: Multichannel Input (sinks: 0, sources: 1, priority: 1, available: yes)
  output:stereo-fallback: Stereo Output (sinks: 1, sources: 0, priority: 5100, available: yes)
  output:stereo-fallback+input:stereo-fallback: Stereo Output + Stereo Input (sinks: 1, sources: 1, priority: 5151, available: yes)
  output:stereo-fallback+input:multichannel-input: Stereo Output + Multichannel Input (sinks: 1, sources: 1, priority: 5101, available: yes)
  output:multichannel-output: Multichannel Output (sinks: 1, sources: 0, priority: 100, available: yes)
  output:multichannel-output+input:stereo-fallback: Multichannel Output + Stereo Input (sinks: 1, sources: 1, priority: 151, available: yes)
  output:multichannel-output+input:multichannel-input: Multichannel Duplex (sinks: 1, sources: 1, priority: 101, available: yes)
  off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
 Active Profile: output:stereo-fallback+input:multichannel-input
 Ports:
  analog-input-mic: Microphone (priority: 8700, latency offset: 0 usec, not available)
   Properties:
    device.icon_name = "audio-input-microphone"
   Part of profile(s): input:stereo-fallback, output:stereo-fallback+input:stereo-fallback, output:multichannel-output+input:stereo-fallback
  multichannel-input: Multichannel Input (priority: 0, latency offset: 0 usec)
   Part of profile(s): input:multichannel-input, output:stereo-fallback+input:multichannel-input, output:multichannel-output+input:multichannel-input
  analog-output-speaker: Speakers (priority: 10000, latency offset: 0 usec)
   Properties:
    device.icon_name = "audio-speakers"
   Part of profile(s): output:stereo-fallback, output:stereo-fallback+input:stereo-fallback, output:stereo-fallback+input:multichannel-input
  analog-output-headphones: Headphones (priority: 9000, latency offset: 0 usec, not available)
   Properties:
    device.icon_name = "audio-headphones"
   Part of profile(s): output:stereo-fallback, output:stereo-fallback+input:stereo-fallback, output:stereo-fallback+input:multichannel-input
  ...

Read more...

Revision history for this message
Hui Wang (hui.wang) wrote :

@Paolo,

That is easy to fix.

change cset "name='Headset Mic Boost Volume' 1" to cset "name='Mic Boost Volume' 2" in the all LENOVO_*/LENOVO_*.conf

sudo cp -rf /usr/share/alsa/ucm/LENOVO-MFG_IN_GO-ThinkPad-MFG_IN_GO/ /usr/share/alsa/ucm/LENOVO-20QD00LKIX-ThinkPadX1Carbon7th-20QD00LKIX/

sudo mv /usr/share/alsa/ucm/LENOVO-20QD00LKIX-ThinkPadX1Carbon7th-20QD00LKIX/LENOVO-MFG_IN_GO-ThinkPad-MFG_IN_GO.conf /usr/share/alsa/ucm/LENOVO-20QD00LKIX-ThinkPadX1Carbon7th-20QD00LKIX/LENOVO-20QD00LKIX-ThinkPadX1Carbon7th-20QD00LKIX.conf

reboot

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :

@hui.wang thans for your reply.

 tree -L 1 .
.
├── apq8064-tabla-snd-card
├── broadwell-rt286
├── chtrt5645
├── DAISY-I2S
├── DB410c
├── Dell-WD15-Dock
├── GoogleNyan
├── HDAudio-Lenovo-DualCodecs
├── LENOVO-20QD00LKIX-ThinkPadX1Carbon7th-20QD00LKIX
├── LENOVO-20QE000VMC-ThinkPadX1Carbon7th-20QE000VMC
├── LENOVO-20QESITR05-ThinkPadX1Carbon7th-20QESITR05
├── LENOVO-20UB0SIT17-ThinkPadX1YogaGen5-20UB0SIT17
├── LENOVO-MFG_IN_GO-ThinkPad-MFG_IN_GO
├── Manta-I2S
├── Manta-SPDIF
├── msm8974-taiko-mtp-snd-card
├── PandaBoard
├── PandaBoardES
├── PAZ00
├── SDP4430
├── skylake-rt286
├── sof-skl_hda_card
├── tegraalc5632
├── tegra-rt5640
├── Tuna
└── VEYRON-I2S

> grep -r "Headset Mic Boost Volume" LENOVO-*
LENOVO-20QD00LKIX-ThinkPadX1Carbon7th-20QD00LKIX/LENOVO-20QD00LKIX-ThinkPadX1Carbon7th-20QD00LKIX.conf: cset "name='Headset Mic Boost Volume' 2"
LENOVO-20QE000VMC-ThinkPadX1Carbon7th-20QE000VMC/LENOVO-20QE000VMC-ThinkPadX1Carbon7th-20QE000VMC.conf: cset "name='Headset Mic Boost Volume' 2"
LENOVO-20QESITR05-ThinkPadX1Carbon7th-20QESITR05/LENOVO-20QESITR05-ThinkPadX1Carbon7th-20QESITR05.conf: cset "name='Headset Mic Boost Volume' 2"
LENOVO-20UB0SIT17-ThinkPadX1YogaGen5-20UB0SIT17/LENOVO-20UB0SIT17-ThinkPadX1YogaGen5-20UB0SIT17.conf: cset "name='Headset Mic Boost Volume' 1"
LENOVO-MFG_IN_GO-ThinkPad-MFG_IN_GO/LENOVO-MFG_IN_GO-ThinkPad-MFG_IN_GO.conf: cset "name='Headset Mic Boost Volume' 2"

But nothing changed, i still need "load-module module-alsa-source device=hw:0,7" under "/etc/pulse/default.pa" to see a working mic.

How can i see which ucm files getting loaded by Alsa ?

Revision history for this message
Hui Wang (hui.wang) wrote :

@Paolo,

Just remove "Headset" from all LENOVO-*.conf, change that line to cset "name='Mic Boost Volume' 2"
reboot

Revision history for this message
Hui Wang (hui.wang) wrote :

@Paolo,

To check if ucm files getting loaded, what I know is to check the pusleaudio's log.

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :

@hui.wang thanks, it's finally works, i've got both speakers and mic recognized as specified in the UCM files.

There is just another major drawback that affect thinkpad x1 carbon 7th which has 5 speakers 4+1, but only 2 of them gets recognized, as shown in the attachment.

Should the UCM file be in charge of this ?

Revision history for this message
Hui Wang (hui.wang) wrote :

@Paolo,

So far, both ucm2 from upstream and ucm from Intel only support 2 speakers, for Bass speakers support, the upstream is discussing it, please read this thread: https://mailman.alsa-project.org/pipermail/alsa-devel/2020-February/162701.html, if you have some idea, please reply that thread.

And after the Bass speakers support is ready, I will co-work with Intel audio team to backport it to ucm. (maybe need some change in the pulseaudio too.)

Revision history for this message
Hui Wang (hui.wang) wrote :

@sponsor team,

The change of 'Headset Mic Boost Volume' 1" to 'Mic Boost Volume' 2" in the all LENOVO_*/LENOVO_*.conf is already in the updated debdiff (#10 and #11).

And those 4 LENOVO folder names cover all machines we enabled in the oem projects.

If need to add new machines' support, I will collect a couple of new machines then open a new SRU.

So if possible, please help enqueue the #10 and #11.

thx.

Revision history for this message
Hui Wang (hui.wang) wrote :

This is the debdiff based on the 0ubuntu1.1 in the -propose.

Fix the input volume problem and add a new ucm for LENOVO X1 carbaon variant (#22).

thx.

Revision history for this message
Hui Wang (hui.wang) wrote :

This is the debdiff based on the 5ubuntu0.3 in the -propose Bionic.

Fix the input volume problem and add a new ucm for LENOVO X1 carbaon variant (#22).

thx.

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :

Hello @hui.wang, it seems that HDMI audio output is not working as expected, i can see the HDMI[1-3] devices (why 3 ?) but trying to using, when attached to a TV for example, what i get is just a new "dummy output" device.

How should i debug this ? Thanks a lot!

Revision history for this message
Hui Wang (hui.wang) wrote :

After attaching to a TV, please upload dmesg, alsa-info.txt (run alsa-info to generate ala-info.txt) and the log of "pactl list".

thx.

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :
Revision history for this message
Paolo Mainardi (paolomainardi) wrote :

pactl list after attaching an hdmi tv

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :

And this one is the only hdmi-related thing i can found on dmesg:

"[17231.810042] HDMI HDA Codec ehdaudio0D2: hdac_hdmi_present_sense: disconnect for pin:port 5:0"

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :

The previous comment missed the attachment.

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :

Just for the sake of clarity, this is what i see from gnome audio settings.

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :
Download full text (5.9 KiB)

I found some more interesting logs, while switching the hdmi1-3 output:

Feb 26 20:35:00 spark-carbon-cto kernel: [17745.742041] [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=206059 end=206060) time 138 us, min 1431, max 1439, scanline start 1428, end 1440
Feb 26 20:35:01 spark-carbon-cto slack.desktop[26636]: [02/26/20, 20:35:01:025] info: [DND] (T025L5BAC) Checking for changes in DND status for the following members: U02Q8NN0E,U025P7R5R,U03KJ3DUQ,U02Q7NP19,U03HD1F72,U025P3QLV,U03BQJS0V,U025P6YRF,UNF2WRT7H,U632EB0SF,U03BQM6CV,U288F67HS,UKFNC48SX,U3N5QH4P3,U0D78EXC4,U03V5EH0K
Feb 26 20:35:01 spark-carbon-cto slack.desktop[26636]: [02/26/20, 20:35:01:026] info: [DND] (T025L5BAC) Will check for changes in DND status again in 5 minutes
Feb 26 20:35:01 spark-carbon-cto CRON[2554]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 26 20:35:01 spark-carbon-cto kernel: [17746.899506] wlp0s20f3: Limiting TX power to 20 (23 - 3) dBm as advertised by 90:35:6e:e2:d6:3c
Feb 26 20:35:05 spark-carbon-cto kernel: [17750.175668] wlp0s20f3: Limiting TX power to 17 (23 - 6) dBm as advertised by 90:35:6e:e2:d6:3c
Feb 26 20:35:15 spark-carbon-cto pulseaudio[2923]: [pulseaudio] sink.c: Default and alternate sample rates are the same.
Feb 26 20:35:15 spark-carbon-cto pulseaudio[2923]: [pulseaudio] alsa-ucm.c: Failed to enable ucm device HDMI1
Feb 26 20:35:15 spark-carbon-cto pulseaudio[2923]: [pulseaudio] source.c: Default and alternate sample rates are the same.
Feb 26 20:35:15 spark-carbon-cto rtkit-daemon[1436]: Supervising 1 threads of 1 processes of 1 users.
Feb 26 20:35:15 spark-carbon-cto rtkit-daemon[1436]: Successfully made thread 2562 of process 2923 (n/a) owned by '1002' RT at priority 5.
Feb 26 20:35:15 spark-carbon-cto rtkit-daemon[1436]: Supervising 2 threads of 1 processes of 1 users.
Feb 26 20:35:15 spark-carbon-cto pulseaudio[2923]: [pulseaudio] source.c: Default and alternate sample rates are the same.
Feb 26 20:35:15 spark-carbon-cto rtkit-daemon[1436]: Supervising 2 threads of 1 processes of 1 users.
Feb 26 20:35:15 spark-carbon-cto rtkit-daemon[1436]: Successfully made thread 2564 of process 2923 (n/a) owned by '1002' RT at priority 5.
Feb 26 20:35:15 spark-carbon-cto rtkit-daemon[1436]: Supervising 3 threads of 1 processes of 1 users.
Feb 26 20:35:15 spark-carbon-cto gsd-media-keys[3115]: Unable to get default source
Feb 26 20:35:17 spark-carbon-cto pulseaudio[2923]: [pulseaudio] sink.c: Default and alternate sample rates are the same.
Feb 26 20:35:17 spark-carbon-cto pulseaudio[2923]: [pulseaudio] alsa-ucm.c: Failed to enable ucm device HDMI2
Feb 26 20:35:17 spark-carbon-cto pulseaudio[2923]: [pulseaudio] source.c: Default and alternate sample rates are the same.
Feb 26 20:35:17 spark-carbon-cto rtkit-daemon[1436]: Supervising 1 threads of 1 processes of 1 users.
Feb 26 20:35:17 spark-carbon-cto rtkit-daemon[1436]: Successfully made thread 2565 of process 2923 (n/a) owned by '1002' RT at priority 5.
Feb 26 20:35:17 spark-carbon-cto rtkit-daemon[1436]: Supervising 2 threads of 1 processes of 1 users.
Feb 26 20:35:17 spark-carbon-cto pulseaudio[2923]: [pulseaudio] source.c: Default and alt...

Read more...

Revision history for this message
Hui Wang (hui.wang) wrote :

@Paolo,

The kernel you installed is too old, we integrated Intel's kernel patch to switch to use snd-hda-codec-hdmi instead of soc/codecs/hdac_hdmi.c.

Please update your kernel to Ubuntu-5.3.0-40.32 then redo the test.

And please don't install Ubuntu-5.3.0-41.33, there is some regression in the -41 kernel. And all these issues will be addressed in the -42 kernel.

Alex Tu (alextu)
tags: added: oem-priority originate-from-1863233
tags: added: verification-needed verification-needed-eoan
removed: verification-failed verification-failed-eoan
tags: added: verification-needed-bionic
removed: verification-failed-bionic
Hui Wang (hui.wang)
tags: added: verification-done-bionic
removed: verification-needed-bionic
Hui Wang (hui.wang)
tags: added: verification-done verification-done-eoan
removed: verification-needed verification-needed-eoan
23 comments hidden view all 103 comments
Revision history for this message
Martin Seener (martinseener) wrote :

Sorry: This script https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9. This activated everything so far.

Revision history for this message
Michael Reiger (mighyflea) wrote :

@hui.wang Looks good here:

michael@metalmachine:~$ cat /sys/devices/virtual/dmi/id/bios_version
N2HET46W (1.29 )
michael@metalmachine:~$

Revision history for this message
Hui Wang (hui.wang) wrote :

The kernel 5.3.0-43 and 5.0.0-1043-oem-osp1 are ready, I just booted with these kernels, no errors so far. And with these kernels, no need to blacklist snd_soc_skl and snd_hda_intel.

For looking for ucm based on bios version, please test this alsa-lib 1.1.9-0ubuntu1.2+testucm in https://launchpad.net/~hui.wang/+archive/ubuntu/audio-master.

sudo add-apt-repository ppa:hui.wang/audio-master
sudo apt-get update
sudo apt install libasound2
reboot

thx.

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :

thanks @hui.wang, where can i find the 5.3.0-43 ? is it in the upstream repos ?

Revision history for this message
Hui Wang (hui.wang) wrote :

@Paolo,

Enable Pre-released updates (eoan-proposed) in the Software & Updates
sudo apt-get update
sudo apt install linux-image-unsigned-5.3.0-4 {pressing tab}, it will list -43 kernel.

Revision history for this message
Paolo Mainardi (paolomainardi) wrote :

Ok thanks @jui.wang, it's in the pre-released updates, because i saw that -42 had been promoted upstream between yesterday and today causing several issues, i had to manually downgrade to -40.

Revision history for this message
Michael Reiger (mighyflea) wrote :

Looks good so far; with kernel 5.3.0-43 from proposed and the libasound2 from your ppa.

Microphone selection seems to be a bit iffy when I have a headset plugged into the headset jack (both are available to select, and the default seems to be the built-in one) but otherwise good.

Revision history for this message
Eddie Dunn (eddie-dunn) wrote :

@hui.wang

My USB headset no longer works. I installed kernel 5.3.0-43 from proposed and libasound2 from your ppa.

$ uname -a
Linux eddie-minut 5.3.0-43-generic #36-Ubuntu SMP Mon Mar 16 13:29:01 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ cat /sys/devices/virtual/dmi/id/bios_version
N2HET46W (1.29 )
$ dpkg -l libasound2
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-================-=========================-============-====================================
ii libasound2:amd64 1.1.9-0ubuntu1.2++testucm amd64 shared library for ALSA applications

$ dmesg
...
[ 464.139786] usb 1-3: Manufacturer: Kingston
[ 464.378226] input: Kingston HyperX Cloud Flight Wireless Headset Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.3/0003:0951:16C4.0005/input/input33
[ 464.437214] input: Kingston HyperX Cloud Flight Wireless Headset as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.3/0003:0951:16C4.0005/input/input34
[ 464.437594] input: Kingston HyperX Cloud Flight Wireless Headset as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.3/0003:0951:16C4.0005/input/input35
[ 464.437943] input: Kingston HyperX Cloud Flight Wireless Headset as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.3/0003:0951:16C4.0005/input/input36
[ 464.438711] hid-generic 0003:0951:16C4.0005: input,hiddev0,hidraw1: USB HID v1.11 Device [Kingston HyperX Cloud Flight Wireless Headset] on usb-0000:00:14.0-3/input3
[ 465.169150] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[ 465.264582] sof-audio-pci 0000:00:1f.3: firmware boot complete
[ 465.578000] debugfs: File 'Analog Playback and Capture' in directory 'HDA Analog' already present!
[ 465.703404] debugfs: File 'Analog Playback and Capture' in directory 'HDA Analog' already present!
[ 532.954965] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[ 533.052406] sof-audio-pci 0000:00:1f.3: firmware boot complete
[ 543.902184] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0

When I plug in a headset with a mic in the 3.5mm port, it still seems to use the internal mic instead of that of the headset.

I also get a lot of popping sounds in the 3.5mm headset when playing audio, but that might not be related to this issue as I had that on kernel 5.3.0-41 as well.

Revision history for this message
Hui Wang (hui.wang) wrote :

@eddie,

If your usb audio doesn't work, please file a new bug against the linux kernel. Let's track your issue in that bug.

thx.

Revision history for this message
Alexander Fieroch (fieroch) wrote :

I tried kernel 5.3.0-43 from proposed but my notebook does not wake up from S3 suspend anymore (Lenovo Carbon X1 7th gen). I'm returning to kernel 5.3.0-40 where this is working...

Revision history for this message
Hui Wang (hui.wang) wrote :

@Alexander,

It is a kernel issue, please upload your dmesg to this bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1845678.

Let us use 1845678 to track 5.3 kernel issue..

thx.

Revision history for this message
Eddie Dunn (eddie-dunn) wrote :

@hui.wang

I'm not sure that I should file a bug against the Linux kernel; My USB headset works fine on 5.3.0-43-generic if I *don't* install libasound2 from your PPA.

Revision history for this message
Hui Wang (hui.wang) wrote :

@Eddie,

"When I plug in a headset with a mic in the 3.5mm port, it still seems to use the internal mic instead of that of the headset."

What happens if you manually select usb headset from gnome-sound-setting->input devices.

Revision history for this message
Jean- (jean-helou) wrote :

After enabling selective updates from proposed, I ran

> sudo apt install linux-image-5.3.0-43-generic linux-modules-extra-5.3.0-43-generic linux-firmware/eoan-proposed libasound2/eoan-proposed
> sudo add-apt-repository ppa:hui.wang/audio-master
> sudo apt-get update
> sudo apt install libasound2

I removed "options snd-hda-intel dmic_detect=0" from /etc/modprobe.d/alsa-base.conf and restarted.

I can see the onboard sound card and microphone in gnome's interface. I used alsa mixer to maxout all levels.
I was able to record sound and play it back using sound recorder
I was able to play music from spotify and youtube
I was unable to use the "test" feature of gnome settings : I can open the window, but neither the front right nor front left buttons in the test play any sound

Connecting my bluetooth headset correctly switched output automatically to the headset but didn't switch input to the headset. I was however able to manually set input to the headset. disconnecting and reconnecting the headset after manually selecting it didn't fix the autoselection of the microphone but that feels like an unrelated issue.

Revision history for this message
Hui Wang (hui.wang) wrote :

"I was unable to use the "test" feature of gnome settings : I can open the window, but neither the front right nor front left buttons in the test play any sound"

That is sth I never met before, please check if speaker-sof-skl_hda_card is selected and if profile is play HiFi Music.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package alsa-lib - 1.1.3-5ubuntu0.4

---------------
alsa-lib (1.1.3-5ubuntu0.4) bionic; urgency=medium

  * d/p/0019-adjust-input-volume-and-a-new-LENOVO-ucm.patch
    Fix the input volume in the ucm and add a new ucm for a
    LENOVO X1 Carbon variant
    (LP: #1859754)

 -- Hui Wang <email address hidden> Thu, 20 Feb 2020 12:59:22 +0800

Changed in alsa-lib (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Update Released

The verification of the Stable Release Update for alsa-lib has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote : Re: add ucm to make alsa/sof driver work under PA (variants of Lenovo X1 Carbon 7th, Dell cnl and cml machines)

This bug was fixed in the package alsa-lib - 1.1.9-0ubuntu1.2

---------------
alsa-lib (1.1.9-0ubuntu1.2) eoan; urgency=medium

  * d/p/0009-adjust-input-volume-and-a-new-LENOVO-ucm.patch
  - Fix the input volume in the ucm and add a new ucm for a
    LENOVO X1 Carbon variant
    (LP: #1859754)

 -- Hui Wang <email address hidden> Thu, 20 Feb 2020 12:02:03 +0800

Changed in alsa-lib (Ubuntu Eoan):
status: Fix Committed → Fix Released
summary: - add ucm to make alsa/sof driver work under PA (variants of Lenovo X1
- Carbon 7th, Dell cnl and cml machines)
+ [SRU] add ucm to make alsa/sof driver work under PA (variants of Lenovo
+ X1 Carbon 7th, Dell cnl and cml machines)
Changed in alsa-lib (Ubuntu):
status: Fix Committed → Invalid
Changed in hwe-next:
status: New → Fix Released
Changed in alsa-lib (Ubuntu):
importance: High → Undecided
Changed in alsa-lib (Ubuntu Bionic):
assignee: nobody → Hui Wang (hui.wang)
Changed in alsa-lib (Ubuntu Eoan):
assignee: nobody → Hui Wang (hui.wang)
Changed in alsa-lib (Ubuntu):
assignee: Hui Wang (hui.wang) → nobody
Revision history for this message
Jean- (jean-helou) wrote :

Sorry, I forgot to subscribe and didn't get notified.

Attached is my dmesg after a clean reboot, and a screenshot of the gnome-settings in which I don't get sound notifications

Revision history for this message
Jean- (jean-helou) wrote :
Revision history for this message
Jean- (jean-helou) wrote :

I encounter a few other issues which appeared since I upgraded to this setup when using a secondary screen over HDMI and a bose QCII bluetooth headset.

- output automatically switches to the headset but microphone doesn't
- forcing the microphone to the headset triggers switches to output (says to the HDMI in gnome settings but is in fact to speakers )
- after successfully setting both input and output to the headphones, in a google meet session where I successfully joined and am actively participating. If I try to enble presentation mode, I get a weird error where the headset gets deactivated/activated very quickly in a loop while it looks like sound alternates from headset to internal card (and meet ends up automatically muting myself). Only way out is to kill the headset. after which the system recovers.

Revision history for this message
Hui Wang (hui.wang) wrote :

@Jean,

You mentioned Bluetooth audio, that remind me that the testing alsa-lib in the #66 has some problem, I just fixed it and uploaded a new version to it, please try it. And testing alsa-lib is not SRUed yet, I plan to SRU it with this bug: #1868210.

And Because the pulseaudio+ucm works greatly different from pulseaudio+non-ucm, most pulseaudio+ucm machines are headless embedded systems, it can't work as well as pulseauido+non-ucm on desktop system. To support the internal mic, Intel provided this ucm. If you prefer pulseaudio+non-ucm, you could add "options snd-hda-intel dmic_detect=0" in the /etc/modprobe.d/alsa-base.conf.

With the ucm, the internal mic and headset-mic belong to different sources, and all output devices and input devices separate to different profiles, that makes the auto-selection/switch among audio devices nearly not work. And if you manually select an output device which is not in the current profile, and two or more input devices are in the new profile, you will see input device is changed when you select output device. This is a pulseaudio bug maybe, if pulseaudio has fix, I will backport it.

About the issue on google meet, it is a problem, do you also meet the similar issue on other audio apps?

Revision history for this message
Jean- (jean-helou) wrote :
Download full text (19.6 KiB)

Thanks for the explanations. I'll keep working with pulseaudio+ucm for now so as to be able to test your fixes. If it becomes too unbearable I'll revert to dmic_detect=0

>About the issue on google meet, it is a problem, do you also meet the similar issue on other audio apps?

Regarding the microphone issue, it seems to be chromium specific, possibly related to the fact that chromium is a snap and is therefore sandboxed.

here is the corresponding dmesg trace :
[24350.178216] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[24350.270480] sof-audio-pci 0000:00:1f.3: firmware boot complete
[24354.651222] input: 2C:41:A1:47:C5:93 as /devices/virtual/input/input24
[24354.693912] audit: type=1107 audit(1585155460.615:229): pid=1284 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal" bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="CheckPermissions" name=":1.8" mask="receive" pid=8453 label="snap.spotify.spotify" peer_pid=1291 peer_label="unconfined"
                exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
[24354.930070] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24354.940107] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24354.940110] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24354.940110] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24364.030170] Bluetooth: hci0: SCO packet for unknown connection handle 257
[24364.030176] Bluetooth: hci0: SCO packet for unknown connection handle 257
[24364.030177] Bluetooth: hci0: SCO packet for unknown connection handle 257
[24365.009964] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.009968] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.019991] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.019995] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.019996] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.094089] Bluetooth: hci0: SCO packet for unknown connection handle 257
[24365.094093] Bluetooth: hci0: SCO packet for unknown connection handle 257
[24365.094095] Bluetooth: hci0: SCO packet for unknown connection handle 257
[24365.244985] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.244988] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.244989] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.254999] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.255003] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.255004] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.467006] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.467011] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.467012] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.467014] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.477005] Bluetooth: hci0: SCO packet for unknown connection handle 0
[24365.522114] Bluetooth: hci0: SCO packet for unknown connection handle 257
[24365.52...

Revision history for this message
Jean- (jean-helou) wrote :

I just installed the latest package from your PPA: it actually makes the looping issue worse. now the issue occurs as soon as I create a meeting in meets.google.com with chromium.

I tried right after to create a meeting in firefox and couldnt' get the headset to work at all. After restarting the headset, in firefox the headset behaved as I would expect and I didn't have the error anymore.

I attached the whole boot's dmesg to this comment.

Revision history for this message
Jean- (jean-helou) wrote :

the dmesg with only the chrome attempt

Revision history for this message
Ingo Bürk (ingo-buerk) wrote :

A friend of mine has a Carbon 7th-gen and did the following update this morning:

```
Start-Date: 2020-03-29 09:23:18
Commandline: apt-get upgrade
Requested-By: christoph (1000)
Upgrade: fdiskämd64 (2.31.1-0.4ubuntu3.5, 2.31.1-0.4ubuntu3.6),
uuid-runtimeämd64 (2.31.1-0.4ubuntu3.5, 2.31.1-0.4ubuntu3.6),
libfdisk1ämd64 (2.31.1-0.4ubuntu3.5, 2.31.1-0.4ubuntu3.6),
libasound2-dataämd64 (1.1.3-5ubuntu0.2, 1.1.3-5ubuntu0.4),
libmount1ämd64 (2.31.1-0.4ubuntu3.5, 2.31.1-0.4ubuntu3.6),
util-linuxämd64 (2.31.1-0.4ubuntu3.5, 2.31.1-0.4ubuntu3.6), mountämd64
(2.31.1-0.4ubuntu3.5, 2.31.1-0.4ubuntu3.6), libblkid1ämd64
(2.31.1-0.4ubuntu3.5, 2.31.1-0.4ubuntu3.6), libuuid1ämd64
(2.31.1-0.4ubuntu3.5, 2.31.1-0.4ubuntu3.6), libsmartcols1ämd64
(2.31.1-0.4ubuntu3.5, 2.31.1-0.4ubuntu3.6), rfkillämd64
(2.31.1-0.4ubuntu3.5, 2.31.1-0.4ubuntu3.6), uuid-devämd64
(2.31.1-0.4ubuntu3.5, 2.31.1-0.4ubuntu3.6), bsdutilsämd64
(1:2.31.1-0.4ubuntu3.5, 1:2.31.1-0.4ubuntu3.6), libasound2ämd64
(1.1.3-5ubuntu0.2, 1.1.3-5ubuntu0.4)
End-Date: 2020-03-29 09:23:34
```

After a reboot, his sound output stopped working as well as the microphone input. The change from libasouns@1.1.3-5ubuntu0.2 to libasound@1.1.3-5ubuntu0.4 seems, given the diff, to be the most likely root cause for this. In the kernel messages we can see the following:

```
[ 21.624861] HDMI HDA Codec ehdaudio0D2: Max dais supported: 3
[ 21.626971] snd_soc_skl 0000:00:1f.3: Direct firmware load for 9dc8-LENOVO-TP-N2H-4704-tplg.bin failed with error -2
[ 21.626973] snd_soc_skl 0000:00:1f.3: tplg fw 9dc8-LENOVO-TP-N2H-4704-tplg.bin load failed with -2, falling back to dfw_sst.bin
[ 21.628197] snd_soc_skl 0000:00:1f.3: Direct firmware load for dfw_sst.bin failed with error -2
[ 21.628198] snd_soc_skl 0000:00:1f.3: Fallback tplg fw dfw_sst.bin load failed with -2
[ 21.628200] snd_soc_skl 0000:00:1f.3: Failed to init topology!
[ 21.628201] snd_soc_skl 0000:00:1f.3: ASoC: failed to probe component -2
[ 21.628213] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: failed to instantiate card -2
[ 21.628229] skl_hda_dsp_generic: probe of skl_hda_dsp_generic failed with error -2
```

I'm currently posting this for him as after some attempts to downgrade there is a problem with booting altogether. Is someone able to confirm that this change likely caused this and possibly what we can do to fix it / what other information we'd need to provide? Thanks!

Revision history for this message
Hui Wang (hui.wang) wrote :

@Ingo,

According to the kernel log you posted, I guess you install the 5.3.0-42/41 kernel, please try with 5.3.0-43 kernel.

Revision history for this message
Ingo Bürk (ingo-buerk) wrote :

@Hui Wang

Thanks for the quick reply. If I understand correctly, 5.3.0-43 is not yet in the bionic repository, but in bionic-proposed. I'm a bit hesitant to install this after having just gotten the system back to boot again. Is it intentional that there is this incompatibility but libasound is already available and the corresponding kernel is not?

Is there alternatively a way to downgrade libasound safely to 1.1.3-5ubuntu0.2? "apt-get install libasound2=1.1.3-5ubuntu0.2" yielded an error that it could not be found.

Revision history for this message
Hui Wang (hui.wang) wrote :

It is a kernel issue if your kernel is -42/-41, even you downgrade the libasound, it will not help. either you install -43 kernel or you could workaround it by adding "options snd-hda-intel dmic_detect=0" in the /etc/modprobe.d/alsa-base.conf.

Revision history for this message
Ingo Bürk (ingo-buerk) wrote :

Thanks so much for your help. It seems to work again now after adding those options and switching the device once in pavucontrol. Really appreciate your fast responses!

Revision history for this message
Martin Seener (martinseener) wrote :

I just see kernel 5.3.0-45-101 as a new kernel and in the changelog only see "Bump ABI". Where can i see all changes and will it fix more of this issue here or make it worse again?

Revision history for this message
Hui Wang (hui.wang) wrote :

some fixing patches are in the 5.3.0-43, but somehow they are not in the 5.3.0-45. I just checked the 5.3.0-46, those patches are in the -46 kernel.

So please use -43 kernel or wait for -46 kernel.

Revision history for this message
ramon (ramon-perez) wrote :

I have a X1C7, Ubuntu 19.10 (Kernel 5.3.0-45), and only get a "dummy output" in the gnome settings. If I boot with boot parameter snd_hda_intel.dmic_detect=0 I get a working soundcard (hda intel pch, only stereo) but no mic support. Also the mute LED does not work (but did a few kernel updates before as did the 4.0 support). Any hints? Wait for 46-kernel? Maybe my specific model is not in the ucm files?

Revision history for this message
Hui Wang (hui.wang) wrote :

Please wait for -46 or install -43, the mute led problem will be fixed in the -46 since I just checked the patch is in the -46 kernel. And if the ucm doesn't cover your machine, please install 1.1.9-0ubuntu1.2++++testucm from https://launchpad.net/~hui.wang/+archive/ubuntu/audio-master before the 1.3 is ready.

Revision history for this message
ramon (ramon-perez) wrote :

Thank you for your reply and your work in general, Hui Wang! If any testing is helpful let me know. I get the Product Name "20QES01L00" via dmidecode but future versions will check for bios version instead, right? Does 1.1.9-0ubuntu1.2++++testucm already do this? (I had the led problem also with the -43 kernel but not with earlier ones)

Revision history for this message
Lukas W (lukas-wgny) wrote :

Hi, thanks for your work! I am having some trouble and would be grateful for advice. I have a X1C7, running KDE neon (based on LTS 18.04). Two days ago the package libasound2 was updated, which I suspect broke sound & mic on my system. I had it working before on kernel 5.3.0.40 with some solutions from the web (linking sof files, blacklisting snd_hda_intel & snd_soc_skl and some other fixes). Sadly this configuration does not work anymore since the update of libasound2. I have also tried kernels 5.3.0.42, 5.3.0.45 and upstream 5.5.10. Upstream restores the function of my speakers but still no microphone. Updating libasound2 to version 1.1.3-5ubuntu0.4+++++ucm from your PPA also did not fix the mic.

pactl list card gives:
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "LENOVO-20QD00KSUK-ThinkPadX1Carbon7th"
alsa.driver_name = "snd_soc_skl_hda_dsp"

The long_card_name is not present as a folder in /usr/share/alsa/ucm. Could that be the problem? Tried installing 1.1.9-0ubuntu1.2++++testucm but failed as it's in the repository for eoan, not bionic. Is there any other solution I could try? Thanks a lot

Revision history for this message
Hui Wang (hui.wang) wrote :

@Lukas,

Please try with 5.3.0-46, -42 and -45 has some problem.

Revision history for this message
Lukas W (lukas-wgny) wrote :

Thanks for your answer. I am too hesitant to try -46 from bionic-proposed as that requires updating ~30 other dependencies from -proposed.
I got the mic to work with upstream kernel 5.5.10, libasound2 1.1.3-5ubuntu0.5 and libasound2-data (from bionic-proposed, they did not have any other dependencies). Need to change the input device each time an application starts capturing in pavucontrol, but I'm ok with that until -46 makes it into bionic-updates. Thanks again!

Revision history for this message
Reshad Dernjani (reshadd94) wrote :
Revision history for this message
Jean- (jean-helou) wrote :

in #28 @hui.wang wrote
>So far, both ucm2 from upstream and ucm from Intel only support 2 speakers, for Bass speakers support, the upstream is discussing it, please read this thread: https://mailman.alsa-project.org/pipermail/alsa-devel/2020-February/162701.html, if you have some idea, please reply that thread.

Is there a bug in launchpad I could subscribe to to be notified when there are things to try to get the bass speakers working ?
I have read through the upstream thread but it seems to die without resolutions, I have been unable to find further mentions of this issue in the mailing list archive (Maybe because I don't know which keywords to look for) It's quite annoying to have such a weak sound : whenever we have a group chat on visio we have to plug an external speaker to get a decent volume :(

Displaying first 40 and last 40 comments. View all 103 comments or add a comment.