[SRU] Load ucm on Lenovo notebooks based on bios version

Bug #1868210 reported by Anthony Wong
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HWE Next
Fix Released
Undecided
Unassigned
alsa-lib (Ubuntu)
Invalid
Undecided
Unassigned
Bionic
Fix Released
High
Hui Wang
Eoan
Fix Released
High
Unassigned
Focal
Invalid
Undecided
Unassigned

Bug Description

This SRU is not backported from upstream of alsa-lib and this SRU is not going to be submitted to upstream. That is because the latest alsa-lib already supports ucm2, and with ucm2 all machines could share one ucm, so latest alsa-lib does not have this problem. This problem is only specific to the alsa-lib in Bionic and Eoan.

[Impact]
On some Lenovo notebooks, UCM files are not loaded and mic can't be used.

[Fix]
UCM was loaded based on cardlongname, but that can't cover all configs of the same model. Lenovo suggested to load ucm by the first 3 letters of /sys/devices/virtual/dmi/id/bios_version, so that all configs could use just one ucm.

[Test Case]
After applying this patch, install the testing alsa-lib on Lenovo X1C7 and Dell vostro 5390, which are all machines with the DMIC connected to PCH. After system bootup, check the /usr/share/alsa/ucm/ for the presence of LENOVO-BIOSID-xxx directories.

Lenovo X1C7 should load the N2H/*.conf and verify the audio functionalities. The Dell machine should still load the ucm by cardname, and it should work as good as before.

[Regression Potential]
low, just add some new UCMs and let Lenovo machine find the UCM by bios_version if it fails by cardlongname. I've already tested the change on Lenovo and Dell machines.

Hui Wang (hui.wang)
Changed in alsa-lib (Ubuntu):
assignee: nobody → Hui Wang (hui.wang)
importance: Undecided → Critical
Changed in alsa-lib (Ubuntu Focal):
status: New → Invalid
Changed in alsa-lib (Ubuntu Bionic):
status: New → Confirmed
importance: Undecided → High
Changed in alsa-lib (Ubuntu Focal):
importance: Critical → Undecided
Changed in alsa-lib (Ubuntu Bionic):
assignee: nobody → Hui Wang (hui.wang)
Changed in alsa-lib (Ubuntu Focal):
assignee: Hui Wang (hui.wang) → nobody
Hui Wang (hui.wang)
Changed in alsa-lib (Ubuntu Eoan):
status: New → Confirmed
importance: Undecided → High
description: updated
Revision history for this message
Hui Wang (hui.wang) wrote :

BTW, this SRU is not backported from upstream of alsa-lib and this SRU is not going to be submitted to upstream. That is because the latest alsa-lib already supported the ucm2 and with ucm2 all machines could share one ucm, so there is no this problem for latest alsa-lib. This problem is only specific to the alsa-lib of Eoan and Bionic.

description: updated
tags: added: originate-from-1862577 sutton
description: updated
Revision history for this message
Hui Wang (hui.wang) wrote :

Please ignore #1 and #2. Some users found some problem on them (find the ucm by bios version). I will upload new debdiffs.

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

This is the debdiff for eoan (19.10), please help put it into the queue.

thx.

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

This is the debdiff for bionic (18.04), please help put it into the queue.

thx.

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

One of users verified the debdiff on eoan, it worked as expected.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1845678/comments/26

thx.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Anthony, 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.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, 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.

Changed in alsa-lib (Ubuntu Eoan):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-eoan
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Anthony, 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.5 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.

Changed in alsa-lib (Ubuntu Bionic):
status: Confirmed → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (alsa-lib/1.1.9-0ubuntu1.3)

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

fluidsynth/unknown (armhf)

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
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (alsa-lib/1.1.3-5ubuntu0.5)

All autopkgtests for the newly accepted alsa-lib (1.1.3-5ubuntu0.5) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

chromium-browser/80.0.3987.149-0ubuntu0.18.04.1 (i386, amd64, armhf, arm64)
fluidsynth/unknown (armhf)

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/bionic/update_excuses.html#alsa-lib

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

Thank you!

Revision history for this message
Bin Li (binli) wrote :

Tried libasound2 packages with the 5.0.0-10477-oem-osp1 kernel in proposed, the dmic works fine on bionic.

libasound2:1.1.3-5ubuntu0.5
libasound2-data:1.1.3-5ubuntu0.5

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

Thanks BinLi.

I just verified the libasoud2-1.1.9-0ubuntu1.3 for Eoan on a Lenovo X1C7 machine.

enable the pre-released updates (eoan-proposed) from software & updates
sudo apt-get update
sudo apt install linux-image-5.3.0-46-generic linux-modules-extra-5.3.0-46-generic
sudo apt install libasound2
reboot
run dpkg --list to check libasound2, they are all 1.1.9-0ubuntu1.3
and dmic works well on this machine, speaker also works.

Verified done on Eoan.

tags: added: verification-done verification-done-eoan
removed: verification-needed verification-needed-eoan
Revision history for this message
Jean- (jean-helou) wrote :

As a follow up on https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1845678/comments/28 where I reported that updating the bios on my X1C7 broke the sound with sof/skl :
I checked the bios information as explained in the original description here.

> cat /sys/devices/virtual/dmi/id/bios_version
N2HET47W (1.30 )

> ll /usr/share/alsa/ucm/LENOVO-BIOSID-N2H
total 4
-rw-r--r-- 1 root root 1042 mars 27 04:40 LENOVO-BIOSID-N2H.conf

Revision history for this message
roland (roland-micite) wrote :

I'm running the proposed version on eoan, lenovo X1C7.

Can confirm the microphone works.
Two questions:
1) What is the new 'configuration' dropdown in the settings->Sound
    It has the options 'Play HiFi Music', Play to Hdmi1...3'

2)
My Output device was selected as the speakers on the laptop. However sound
was played over my external monitor.
After switching to the external monitors and switching back the sound was
on the laptop speakers. And then the microphone started working.
What is going on?

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

1) it is pulseaudio profile, don't select it manually.

2) please refer to https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/1859754/comments/85

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 :

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

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

  * d/p/0010-add-bios-version-for-looking-for-ucm.patch
    Add a new way to looking for the ucm by DMI bios_version.
    Without this patch, the alsa-lib looks for the ucm by cardlongname
    first, if it fails, then by the cardname. This has a problem at least
    on LENOVO machines, since a LENOVO model has the same audio design but
    it has hundreds of cardlongname, we need to create hundreds of folders
    for one model, that is unacceptable. LENOVO told us a LENOVO model has
    the unique biso_version, we could use it to find the ucm. After applying
    this patch, the alsa-lib looks for the ucm by cardlongname first, if it
    fails, it will use bios_version, if it also fails, it will fallback to
    cardname.
    (LP: #1868210)

 -- Hui Wang <email address hidden> Fri, 27 Mar 2020 11:40:37 +0800

Changed in alsa-lib (Ubuntu Eoan):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * d/p/0020-add-bios-version-for-looking-for-ucm.patch
    Add a new way to looking for the ucm by DMI bios_version.
    Without this patch, the alsa-lib looks for the ucm by cardlongname
    first, if it fails, then by the cardname. This has a problem at least
    on LENOVO machines, since a LENOVO model has the same audio design but
    it has hundreds of cardlongname, we need to create hundreds of folders
    for one model, that is unacceptable. LENOVO told us a LENOVO model has
    the unique biso_version, we could use it to find the ucm. After applying
    this patch, the alsa-lib looks for the ucm by cardlongname first, if it
    fails, it will use bios_version, if it also fails, it will fallback to
    cardname.
    (LP: #1868210)

 -- Hui Wang <email address hidden> Fri, 27 Mar 2020 10:26:30 +0800

Changed in alsa-lib (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in hwe-next:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.