[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 on 2020-01-15
44
This bug affects 6 people
Affects Status Importance Assigned to Milestone
HWE Next
Undecided
Unassigned
alsa-lib (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
Hui Wang
Eoan
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) on 2020-01-15
Changed in alsa-lib (Ubuntu):
importance: Undecided → High
tags: added: originate-from-1856130 somerville
Hui Wang (hui.wang) wrote :

This is the debdiff for eoan:

Hui Wang (hui.wang) wrote :

This is the debdiff for bionic:

Hui Wang (hui.wang) on 2020-01-15
description: updated
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
Hui Wang (hui.wang) wrote :

Thanks Seb.

Łukasz Zemczak (sil2100) wrote :

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

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).

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
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.

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
Hui Wang (hui.wang) wrote :

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

Hui Wang (hui.wang) wrote :

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

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!

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.

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

Paolo Mainardi (paolomainardi) wrote :

Any changes to have this backported to 18.04 ?

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.

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...

Paolo Mainardi (paolomainardi) wrote :

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

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.

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.

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...

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

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 ?

Hui Wang (hui.wang) wrote :

@Paolo,

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

Hui Wang (hui.wang) wrote :

@Paolo,

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

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 ?

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.)

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.

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.

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.

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!

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.

Paolo Mainardi (paolomainardi) wrote :

pactl list after attaching an hdmi tv

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"

Paolo Mainardi (paolomainardi) wrote :

The previous comment missed the attachment.

Paolo Mainardi (paolomainardi) wrote :

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

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...

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.

Paolo Mainardi (paolomainardi) wrote :

@hui.wang,

I confirm that now everything works as expected, thanks for your outstanding work.
Just to be understand a bit more the release cycle, what is the plan to integrate all the things we did in this thread into the 18.04 standard repository ? Is already planned or for now it's better to just stick with the proposed repository ?

Thanks!

Alex Tu (alextu) on 2020-02-27
tags: added: oem-priority originate-from-1863233
Łukasz Zemczak (sil2100) wrote :

Hello! Is this actually verified already? Asking since there is another alsa-lib upload in the queue, blocked on this one getting released.

Hui Wang (hui.wang) wrote :

@sil2100,

The alsa-lib in proposed has some minor problems, need the new uploaded alsa-lib in the queue to fix it. The new uploaded alsa-lib in the queue is an incremental fix for proposed.

Could we release them together? or it is also fine to release the proposed alsa-lib first, then release the new one in the queue in the next cycle.

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.2 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, what testing has been performed on the package 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.

tags: added: verification-needed verification-needed-eoan
removed: verification-failed verification-failed-eoan
Łukasz Zemczak (sil2100) 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.4 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, what testing has been performed on the package 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.

tags: added: verification-needed-bionic
removed: verification-failed-bionic

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

openjdk-lts/unknown (i386)

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!

Hui Wang (hui.wang) wrote :

On a Dell Vostro-5390, install the 18.04 (bionic).

Then enable the Pre-released updates (bionic-proposed) in the Software & Updates.
sudo apt-get update
sudo apt install linux-firmware (1.173.16)
sudo apt install linux-image-5.0.0-1042-oem-osp1 (for ubuntu 5.0 kernel, only oem-osp1 supports sof driver).
sudo apt install libasound2 (1.1.3-5ubuntu0.4)
reboot
open the gnome-sound-setting, we can see speaker from output device and Digital Microphone from input device. I can play sound to speaker and record sound from Microphone. Plug a headset, I can see headphone, headset mic and headphone mic. They all work well and the recording volume is fine too. Plug a hdmi monitor with audio capability, I can see the hdmi audio in the UI, then I can play sound via hdmi monitor.

Verified done on bionic (18.04).

tags: added: verification-done-bionic
removed: verification-needed-bionic
Hui Wang (hui.wang) wrote :

Install the 19.10 (Eoan) on a Lenovo X1C7 (the machine type dmi string is LENOVO-MFG_GO_ThinkPad-MFG_IN_GO).
Enable Pre-released updates (eoan-proposed) in the Software & Updates
sudo apt-get update
sudo apt install linux-image-5.3.0-40-generic linux-modules-extra-5.3.0-42-generic
sudo apt linux-firmware (1.183.4)
sudo apt install libasound2 (1.1.9-0ubuntu1.2)
blacklist snd_soc_skl and snd_hda_intel in the /etc/modprobe.d/blacklist.conf (after linux-image-5.3.0-43-generic is ready, the blacklist is not needed anymore)
reboot
open the gnome-sound-setting, we can see speaker from output device and Digital Microphone from input device. I can play sound to speaker and record sound from Microphone. Plug a headset, I can see headphone and headset mic. They all work well and the recording volume is fine too. Plug a hdmi monitor with audio capability, I can see the hdmi audio in the UI, then I can play sound via hdmi monitor.

Verified done on Eoan (19.10)

tags: added: verification-done verification-done-eoan
removed: verification-needed verification-needed-eoan
Paolo Mainardi (paolomainardi) wrote :

Still having other troubles, it seems that usb audio cards don't get recognized correctly.

I see this:

▶ cat /proc/asound/cards
 0 [sofsklhdacard ]: sof-skl_hda_car - sof-skl_hda_card
                      LENOVO-20QD00LKIX-ThinkPadX1Carbon7th-20QD00LKIX
 1 [C920 ]: USB-Audio - HD Pro Webcam C920
                      HD Pro Webcam C920 at usb-0000:00:14.0-2.2.1.4, high speed

But cannot use it through pulseaudio/gnome.

Paolo Mainardi (paolomainardi) wrote :

Please discard the last message, the webcam has just a mic, my bad :)

Michael Reiger (mighyflea) wrote :

Hi, I tried with the instructions from comment #49 and it almost works for me.

(You have the kernel versions mixed between 5.3.0-40 and 5.3.0-42 - I presume that was an accident?)

With Kernel 5.3.0-42 I have no sound at all, and it hangs when I try to shut down / reboot - might be a different problem.
With Kernel 5.3.0-40 I have sound - just regular stereo as expected, but that works.
The microphone is detected, but it will not record sound, that is the almost part.

The funny thing is: If I plug anything into the headset jack - headset or just plain speakers without a microphone - not only does the output, and input if it is a headset, work through the jack, but I can also record from the internal microphone. So the combination stereo speakers on the headphone jack and internal microphone for recording works.

This is my sound card:
cat /proc/asound/cards
 0 [sofsklhdacard ]: sof-skl_hda_car - sof-skl_hda_card
                      LENOVO-20QD003JGE-ThinkPadX1Carbon7th-20QD003JGE

This is the system info from dmidecode:
Handle 0x0012, DMI type 1, 27 bytes
System Information
 Manufacturer: LENOVO
 Product Name: 20QD003JGE
 Version: ThinkPad X1 Carbon 7th

Is there a trick I am missing, or does the patch still need work?

Happy to provide more info.

Hui Wang (hui.wang) wrote :

The kernel 5.3.0-41 and 5.3.0-42 have some regression, please don't use them, we could wait for the -43 or just use -40.

From the card long name you provided "LENOVO-20QD003JGE-ThinkPadX1Carbon7th-20QD003JGE", your machine is not covered by this SRU, that means the ucm doesn't work on your machine, so it is expected the internal mic doesn't work.

I am preparing another SRU for alsa-lib, in that SRU I will hack the existing alsa-lib to let alsa-lib find the ucm based on the BIOS_Version instead of only based on the cardname/cardlongname. With that new SRU, for all X1C7 variants, we could use one ucm folder to support them.

Michael Reiger (mighyflea) wrote :

I am back on Kernel 5.3.0-40.

That would explain my microphone troubles.
Will try out the new version when it is -proposed and give feedback.

Thank you for the good work!

Paolo Mainardi (paolomainardi) wrote :

Hi everyone again, i am experiencing some APCI issues using 5.3.0-40 with sof drivers activated. It happens, almost randomly at this stage that the system is not waking up after a sleep, initiated by Gnome, what i see is just the fn led active on the X1-carbon-7h.
It seems that disabling sof and loading the standard kernel modules (the blacklisted ones) the problem disappear. I saw that in 41 and 42 there are some ACPI-related fixes, but suddenly they broke the mic.

Is this something tracked somewhere ? Is there something should i check to debug this error ?

Thanks.

Hui Wang (hui.wang) wrote :

@Paolo,

Please wait for -43 kernel. (41 and 42) has some regression.

Paolo Mainardi (paolomainardi) wrote :

Hi @hui.wang, ok thanks, is there an ETA for -43 to be released ?

Łukasz Zemczak (sil2100) wrote :

Hui, does this mean the current SRU shouldn't be released? Or is it still good to go?

Hui Wang (hui.wang) wrote :

@sil2100, it is good to go, please release it.

thx.

Devin Bayer (akvadrako) wrote :

Hello. I am wondering why this only applies to certain models of the X1C7. I had to make an additional file to get my Mic working:

 LENOVO-20QDCTO1WW-ThinkPadX1Carbon7th-20QDCTO1WW.conf

Is this something I should report upstream?

Michael Reiger (mighyflea) wrote :

@advadrako would you mind sharing that file?

Hui Wang (hui.wang) wrote :

@Devin and Michael,

That is because the X1C7 has too many configs: like different cpu, different ramsize or different disk size, each config has a unique cardlongname. And For this SRU, we only covered the configs we need to certify in our OEM enablement project.

LENOVO noticed this issue too, they told us the alsa-lib could find and load the ucm by the first 3 letters of BIOS_VERSION, so I am going to submit a new SRU with this solution soon. With that solution landed in the alsa-lib, all x1c7 could use one ucm.

So could you please upload the output of cat /sys/devices/virtual/dmi/id/bios_version, let us see if the first 3 letters of bios_version are same or not among all x1c7 machines.

@sil2100,

Since the current SRU already covered all machines we enabled in the OEM project and they all worked well, please release it. Then I will cover the left machines in a new SRU.

thx.

Martin Seener (martinseener) wrote :

Hi @hui.wang,
i can also help with that. I'm currently using Mint 19.3 with the 5.3.0-40-generic kernel and used this script to activate my soundcard and mic. This works great until the -40- kernel but with -42- also the shutdown doesnt work anymore.
Nevertheless here is my bios_version grabbed with cat /sys/devices/virtual/dmi/id/bios_version
N2HET44W (1.27 ) - So "N2H".

Let me know if i can also help otherwise.
Is the procedure the same for me on Mint if i want your proposed version to run? I can use timeshift if something goes wrong and restore the last working version, so i can test almost everything.
Btw. the 5.0.0-1043-oem-osp1 kernel didnt boot correctly. it stopped with blank screen and only mouse was active.

Martin Seener (martinseener) wrote :

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

Michael Reiger (mighyflea) wrote :

@hui.wang Looks good here:

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

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.

Paolo Mainardi (paolomainardi) wrote :

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

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.

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.

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.

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.

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.

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...

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.

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.

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.

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.

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.

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

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.

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
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

Jean- (jean-helou) wrote :
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.

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?

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...

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.

Jean- (jean-helou) wrote :

the dmesg with only the chrome attempt

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!

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.

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.

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.

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!

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?

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.

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?

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.

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)

To post a comment you must log in.