Add proper USB audio support for Lenovo ThinkStation P620
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HWE Next |
Undecided
|
Unassigned | |||
alsa-lib (Ubuntu) |
High
|
Kai-Heng Feng | |||
Focal |
Undecided
|
Kai-Heng Feng | |||
Groovy |
High
|
Kai-Heng Feng | |||
alsa-ucm-conf (Ubuntu) |
High
|
Kai-Heng Feng | |||
Focal |
Undecided
|
Kai-Heng Feng | |||
Groovy |
High
|
Kai-Heng Feng | |||
pulseaudio (Ubuntu) |
Medium
|
Kai-Heng Feng | |||
Focal |
Medium
|
Kai-Heng Feng | |||
Groovy |
Medium
|
Kai-Heng Feng |
Bug Description
[Impact]
Lenovo ThinkStation P620 uses TRX4 board, which doesn't have PCI audio in its chipset. Instead, it's equipped with two USB audio devices, "Main", which is for internal speaker and front headset, and "Rear", which is for rear panel I/Os.
However, both USB audio don't really work out of the box. Issues and fixes will be described together below.
[Fix for alsa-lib]
1) Both USB audio devices don't have S/PDIF port, so we need to disable them:
https:/
[Fix for alsa-ucm-conf]
2) PulseAudio doesn't assign the correct stream for "Main" device, audio output stays at "Speaker" after "Headset" is selected. So we need UCM to let PulseAudio understand correct stream assignment.
In addition to that, in order to not let headset port availability invalidate speaker profile, we need two UCM profiles to separate "Speaker" and "Headset" logically:
https:/
[Fix for PulseAudio]
3) USB audio devices, UAC v2 and v3, support jack detection (insertion control). However, PulseAudio doesn't monitor USB jack mixer controls, so jack detection doesn't work at userspace level. We need to let PulseAudio be aware those jacks:
https:/
4) When a headset gets plugged, PulseAudio switches the profile from "Speaker" to "Headset" automatically. However, when headset gets unplugged, PulseAudio switch the profile from "Headset" to "HDMI", skipping the "Speaker" profile. We need to fix priorities for profiles that are created from UCM to avoid the problem:
https:/
[Test]
Under g-c-c's Sound tab, "Speaker", "Headphone", "S/PDIF", etc. profiles are all selectable. Sound comes out from speaker even if "Headphone" is chosen. Microphone is already selected though there's no microphone plugged.
With the above fix all applied, open Gnome Control Center -> Sound tab.
Sink "Speaker" is selected. Only "Speaker" and "HDMI" are in the drop down menu.
Plug a headset to front port, "Headphone" and "Microphone" appears and automatically becomes default. Unplug the headset, sink switches back to "Speaker", and source switches to none.
Plug line-in, line-out and microphone to the rear panel, jack detection works for all three ports, and they all work correctly. Unplug rear line-in, line-out or microphone makes the option in dropdown menu disappears.
On other systems, nothing changed.
[Regression Potential]
For fix 1) and 2), The UCM in alsa-lib and alsa-ucm-conf strictly match kernel provided profile name, so no other device will be affected.
For fix 3), if there are UAC v2/v3 devices claim to support jack detection but don't really support it, this will make the PulseAudio consider its availability to "no".
AFAIK, the USB audios that have jack ports are mostly docking stations, which already have their own UCM profiles or PulseAudio profile-sets, so they are unaffected by this change.
If we ever see this kind of regression, the proper fix is to disable jack detection from kernel side.
For fix 4), if user depends on the old behavior (i.e. switch to another card while other profiles are still available), this will bring a behavioral change. However, all available profiles will still be available after the fix, so users can still be chose the preferred profile from the g-c-c dropdown menu.
Daniel van Vugt (vanvugt) wrote : | #1 |
Changed in alsa-lib (Ubuntu): | |
status: | New → Incomplete |
Changed in alsa-ucm-conf (Ubuntu): | |
status: | New → Incomplete |
Changed in pulseaudio (Ubuntu): | |
status: | New → Incomplete |
Daniel van Vugt (vanvugt) wrote : | #2 |
... because USB audio should work already. If something doesn't work then please describe that.
Kai-Heng Feng (kaihengfeng) wrote : | #4 |
PulseAudio debdiff for focal
Kai-Heng Feng (kaihengfeng) wrote : | #5 |
Hit LP: #1891518 so I can't upload more debdiff...
The attachment "pulseaudio_
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]
tags: | added: patch |
Changed in pulseaudio (Ubuntu Focal): | |
status: | New → In Progress |
Changed in pulseaudio (Ubuntu Groovy): | |
status: | Incomplete → In Progress |
Changed in pulseaudio (Ubuntu Focal): | |
assignee: | nobody → Kai-Heng Feng (kaihengfeng) |
Changed in pulseaudio (Ubuntu Groovy): | |
assignee: | nobody → Kai-Heng Feng (kaihengfeng) |
Daniel van Vugt (vanvugt) wrote : | #7 |
Please remove pulseaudio_
https:/
https:/
Daniel van Vugt (vanvugt) wrote : | #8 |
Please also remember to commit to git early. You should have full access...
https:/
tags: | added: focal groovy |
Changed in pulseaudio (Ubuntu Focal): | |
importance: | Undecided → Medium |
Changed in pulseaudio (Ubuntu Groovy): | |
importance: | Undecided → Medium |
Changed in alsa-lib (Ubuntu Groovy): | |
status: | Incomplete → New |
Changed in alsa-ucm-conf (Ubuntu Groovy): | |
status: | Incomplete → New |
Daniel van Vugt (vanvugt) wrote : | #9 |
Repository can be accessed via:
git://git.
git+ssh:
https:/
Kai-Heng Feng (kaihengfeng) wrote : | #10 |
Thanks. Rebased and pushed.
However, I can't attach the debdiff here because I am still hitting Launchpad Oops - LP: #1891518.
Daniel van Vugt (vanvugt) wrote : | #11 |
No problem, you can get the patch here:
Kai-Heng Feng (kaihengfeng) wrote : | #12 |
How do we proceed with alsa-lib and alsa-ucm-conf? Since I can't attach debdiff now...
Daniel van Vugt (vanvugt) wrote : | #13 |
If the problem doesn't fix itself by next week I say report a bug against Launchpad:
https:/
Kai-Heng Feng (kaihengfeng) wrote : | #14 |
I did... LP: #1891518.
Kai-Heng Feng (kaihengfeng) wrote : | #15 |
alsa-lib debdiff for groovy
Kai-Heng Feng (kaihengfeng) wrote : | #16 |
alsa-lib debdiff for focal
Kai-Heng Feng (kaihengfeng) wrote : | #17 |
alsa-ucm-conf debdiff for groovy
Kai-Heng Feng (kaihengfeng) wrote : | #18 |
alsa-ucm-conf debdiff for focal
tags: | added: originate-from-1887127 originate-from-1887878 sutton |
Changed in alsa-ucm-conf (Ubuntu Groovy): | |
importance: | Undecided → High |
status: | New → Fix Committed |
assignee: | nobody → Kai-Heng Feng (kaihengfeng) |
Changed in alsa-lib (Ubuntu Groovy): | |
assignee: | nobody → Kai-Heng Feng (kaihengfeng) |
importance: | Undecided → High |
status: | New → Fix Committed |
Changed in pulseaudio (Ubuntu Groovy): | |
status: | In Progress → Fix Committed |
Changed in alsa-lib (Ubuntu Focal): | |
assignee: | nobody → Kai-Heng Feng (kaihengfeng) |
Changed in alsa-ucm-conf (Ubuntu Focal): | |
assignee: | nobody → Kai-Heng Feng (kaihengfeng) |
Launchpad Janitor (janitor) wrote : | #19 |
This bug was fixed in the package alsa-ucm-conf - 1.2.2-1ubuntu3
---------------
alsa-ucm-conf (1.2.2-1ubuntu3) groovy; urgency=medium
* d/p/0001-
Add proper stream and jack assignment to Lenovo ThinkStation P620
(LP: #1891461)
-- Kai-Heng Feng <email address hidden> Tue, 18 Aug 2020 17:39:15 +0800
Changed in alsa-ucm-conf (Ubuntu Groovy): | |
status: | Fix Committed → Fix Released |
Changed in alsa-lib (Ubuntu Focal): | |
status: | New → Fix Committed |
Changed in alsa-ucm-conf (Ubuntu Focal): | |
status: | New → Fix Committed |
Changed in pulseaudio (Ubuntu Focal): | |
status: | In Progress → Fix Committed |
Launchpad Janitor (janitor) wrote : | #20 |
This bug was fixed in the package pulseaudio - 1:13.99.1-1ubuntu10
---------------
pulseaudio (1:13.99.
* d/p/0001-
- recognize USB jack mixer to support jack detection (LP: #1891461)
* d/p/0002-
- resolve an issue when headset gets unplugged, HDMI audio is chosen
instead of internal speaker (LP: #1891461)
-- Kai-Heng Feng <email address hidden> Thu, 13 Aug 2020 16:58:42 +0800
Changed in pulseaudio (Ubuntu Groovy): | |
status: | Fix Committed → Fix Released |
Launchpad Janitor (janitor) wrote : | #21 |
This bug was fixed in the package alsa-lib - 1.2.2-2.3ubuntu3
---------------
alsa-lib (1.2.2-2.3ubuntu3) groovy; urgency=medium
* d/p/0001-
- Disable IEC958 on Lenovo ThinkStation P620 (LP: #1891461)
-- Kai-Heng Feng <email address hidden> Thu, 13 Aug 2020 22:54:44 +0800
Changed in alsa-lib (Ubuntu Groovy): | |
status: | Fix Committed → Fix Released |
Hello Kai-Heng, or anyone else affected,
Accepted alsa-lib into focal-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
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-focal |
Łukasz Zemczak (sil2100) wrote : | #23 |
Hello Kai-Heng, or anyone else affected,
Accepted alsa-ucm-conf into focal-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
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.
Łukasz Zemczak (sil2100) wrote : | #24 |
Hello Kai-Heng, or anyone else affected,
Accepted pulseaudio into focal-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
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.
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (alsa-lib/1.2.2-2.1ubuntu2) | #25 |
All autopkgtests for the newly accepted alsa-lib (1.2.2-2.1ubuntu2) for focal have finished running.
The following regressions have been reported in tests triggered by the package:
asterisk/
gsequencer/3.1.3-1 (s390x)
Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUp
https:/
[1] https:/
Thank you!
Kai-Heng Feng (kaihengfeng) wrote : | #26 |
Open GNOME Control Center's sound tab:
- USB Speaker is picked by default.
- USB Headphone and USB Mic was automatically picked as soon as headset is plugged.
- Automatically switch back to USB Speaker when headset is unplugged.
- No useless S/PDIF profile listed.
- Jack detection works on both front panel and rear panel.
tags: |
added: verification-done verification-done-focal removed: verification-needed verification-needed-focal |
Kai-Heng Feng (kaihengfeng) wrote : | #27 |
autopkgtests regression isn't triggered by this SRU, alsa-lib only put the device in to S/PDIF blacklist, not behavioral change.
Launchpad Janitor (janitor) wrote : | #28 |
This bug was fixed in the package alsa-lib - 1.2.2-2.1ubuntu2
---------------
alsa-lib (1.2.2-2.1ubuntu2) focal; urgency=medium
* d/p/0001-
* d/p/0001-
* d/p/0002-
* d/p/0003-
* d/p/0004-
* d/p/0005-
* d/p/0006-
* d/p/0007-
* d/p/0008-
* d/p/0009-
* d/p/0010-
* d/p/0011-
* d/p/0012-
* d/p/0013-
* d/p/0014-
* d/p/0015-
* d/p/0016-
* d/p/0017-
* d/p/0018-
* d/p/0019-
* d/p/0020-
* d/p/0021-
* d/p/0022-
* d/p/0023-
* d/p/0024-
* d/p/0025-
* d/p/0026-
* d/p/0027-
* d/p/0028-
* d/p/0029-
* d/p/0030-
* d/p/0031-
* d/p/0032-
* d/p/0033-
* d/p/0034-
* d/p/0035-
* d/p/0036-
* d/p/0037-
* d/p/0038-
* d/p/0039-
* d/p/0040-
* d/p/0041-
* d/p/0042-
* d/p/0043-
* d/p/0044-
* d/p/0045-
* d/p/0046-
* d/p/0047-
* add Breaks alsa-ucm-conf (<= 1.2.2-1ubuntu0.1) in the d/control
* add snd...
Changed in alsa-lib (Ubuntu Focal): | |
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.
Launchpad Janitor (janitor) wrote : | #30 |
This bug was fixed in the package alsa-ucm-conf - 1.2.2-1ubuntu0.2
---------------
alsa-ucm-conf (1.2.2-1ubuntu0.2) focal; urgency=medium
* d/p/0003-
* d/p/0004-
* d/p/0005-
* d/p/0006-
* d/p/0007-
* d/p/0008-
* d/p/0009-
* d/p/0010-
* d/p/0011-
* d/p/0012-
* d/p/0013-
* d/p/0014-
* d/p/0015-
* d/p/0016-
enable sound on AMD Renoir machines (LP: #1889217)
[ Kai-Heng Feng ]
* d/p/0017-
Add proper stream and jack assignment to Lenovo ThinkStation P620
(LP: #1891461)
-- Hui Wang <email address hidden> Mon, 10 Aug 2020 15:05:02 +0800
Changed in alsa-ucm-conf (Ubuntu Focal): | |
status: | Fix Committed → Fix Released |
Launchpad Janitor (janitor) wrote : | #31 |
This bug was fixed in the package pulseaudio - 1:13.99.
---------------
pulseaudio (1:13.99.
[ Kai-Heng Feng ]
* d/p/0001-
- recognize USB jack mixer to support jack detection (LP: #1891461)
* d/p/0002-
- resolve an issue when headset gets unplugged, HDMI audio is choosen
instead of internal speaker (LP: #1891461)
[ Hui Wang ]
* d/p/0034-
* d/p/0035-
* d/p/0036-
- Make the AMD acp sound card skipped in the PA, then the ucm could
link it to other sound cards, it is easy for gnome to support AMD
Renoir sound driver after this change. (LP: #1889217)
-- Kai-Heng Feng <email address hidden> Thu, 13 Aug 2020 18:53:08 +0800
Changed in pulseaudio (Ubuntu Focal): | |
status: | Fix Committed → Fix Released |
Changed in hwe-next: | |
status: | New → Fix Released |
Obviously more information is required :)