module-switch-on-port-avaiable: switch the port on ucm devices based on the priority

Bug #1882161 reported by Hui Wang
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HWE Next
Fix Released
Undecided
Unassigned
OEM Priority Project
Fix Released
Critical
Kai-Chuan Hsieh
pulseaudio (Ubuntu)
Fix Released
High
Hui Wang
Focal
Fix Released
High
Hui Wang
Groovy
Fix Released
High
Hui Wang

Bug Description

[Impact]

 * On the Dell machines with multi function audio jack, the
   headphone/headset can't output sound automatically, which is different
   from ubuntu 18.04. The headphone/headset should be able to output
   sound automatically after plugging in the audio jack.

[Test Case]

 * On Tiger Lake platform
   Reproduce step:
   1. plug headphone/headset
   2. open g-c-c sound to check

   Expect result: The output device should switch to headphone or headset,
                  since headphone's priority is higher in ucm2 config.
   Actual result: The output device is still internal speaker.

[Regression Potential]

 * The change insert the ucm device by its priority, the potential
   regression is low, since if the change is not working properly, the
   side effect is that the order of ucm devices are wrong, and it won't
   switch to the correct output device as expect, but user can still
   config it manually.

[Other]

 * This bug originates from an OEM private bug #1875597, then ubuntu users
   reported 2 public bugs #1871329 and #1881659. The 2nd issue of #1871329
   and the 1st issue of #1881659 have the same root cause as #1875597

 * The root cause is the ucm2 conf defines 2 input devices: the Mic2 and
   Headset MIC, and the pulseaudio parse the input device Headset MIC
   first then Mic2, finally the audio jack is set to Mic2 mode, this make
   the audio jack can't output sound anymore. To fix it, let the audio
   jack set to Headset MIC mode by default (Headset MIC has higher
   priority than Mic2 in the ucm2 conf), to do so, let pulseaudio send the
   device event to module-switch-on-port-available by the order of
   priority in the umc2.

Hui Wang (hui.wang)
summary: - module-switch-on-port-avaiable: switch the port based on the priority
+ module-switch-on-port-avaiable: switch the port on ucm devices based on
+ the priority
tags: added: originate-from-1875597 somerville
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and help make Ubuntu better. Unfortunately, we cannot work on this bug because your description didn't include enough information. You may find it helpful to read 'How to report bugs effectively' http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem.

We have instructions on debugging some types of problems at http://wiki.ubuntu.com/DebuggingProcedures.

At a minimum, we need:
1. The specific steps or actions you took that caused you to encounter the problem.
2. The behavior you expected.
3. The behavior you actually encountered (in as much detail as possible).

Thanks!

Changed in pulseaudio (Ubuntu Focal):
assignee: nobody → Hui Wang (hui.wang)
assignee: Hui Wang (hui.wang) → nobody
status: New → Incomplete
Changed in pulseaudio (Ubuntu Groovy):
status: New → Incomplete
Revision history for this message
Sebastien Bacher (seb128) wrote :

The upstream submitted merge request seems to still been under discussion, I don't think it's appropriate to merge that in the packaging Vcs yet

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

The oem project is waiting for the fix while upstream has no final solution. How about we merge this fix as ubuntu specific part first, once upstream has a solution, let's revert this fix and apply the upstream's one?

thx,
Hui.

Revision history for this message
Sebastien Bacher (seb128) wrote :

It would be best to work with upstream to get it merged, what is blocking? Is upstream not responding?

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

Upstream just merged the patch, and I changed the description on the commits for ubuntu-focal and ubuntu branch, pushed them to ubuntu pulseaudio repo.

description: updated
Changed in pulseaudio (Ubuntu Groovy):
status: Incomplete → In Progress
Changed in pulseaudio (Ubuntu Focal):
status: Incomplete → In Progress
assignee: nobody → Hui Wang (hui.wang)
Revision history for this message
Sebastien Bacher (seb128) wrote :

Upstream reference
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/294

@Hui, do you have any other pending changes for G-serie before we do an upload?

There are also several fixes in the review queue for focal, do you think we have enough to do another SRU round or do you have more fixes you are working on? (also bionic is going to need an upload once bug #1881094 is sorted out)

Changed in pulseaudio (Ubuntu Focal):
importance: Undecided → High
Changed in pulseaudio (Ubuntu Groovy):
importance: Undecided → High
status: In Progress → Fix Committed
Revision history for this message
Hui Wang (hui.wang) wrote :

@Seb,

No need to upload for groovy and focal now since the input auto-selection issue is not resolved yet, it is not worth doing a upload only for this fix. we could accumulate more fixes then do a upload.

For bionic, once the #1881094 is sorted out, please help do a upload together with this fix #1882042.

thx.

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Hui, sorry I did upload what in the vcs to groovy before reading your comment here, I will not upload to focal yet though

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

This bug was fixed in the package pulseaudio - 1:13.99.1-1ubuntu7

---------------
pulseaudio (1:13.99.1-1ubuntu7) groovy; urgency=medium

  * d/p/0032-alsa-mixer-store-the-ucm_device-with-the-order-of-th.patch
    - switch the port on ucm device based on priority (LP: #1882161)

 -- Hui Wang <email address hidden> Fri, 05 Jun 2020 10:10:09 +0800

Changed in pulseaudio (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Hui Wang (hui.wang) wrote :

@Seb,

Looks like the input switch issue will not be fixed in a short period of time (https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/295), and our OEM project wants the fix to be applied to output device first, so could you please upload a build of this fix to focal.

Thx.

Alex Tu (alextu)
tags: added: oem-priority originate-from-1880192
Rex Tsai (chihchun)
Changed in oem-priority:
importance: Undecided → Critical
Changed in pulseaudio (Ubuntu Focal):
status: In Progress → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

The test case seems very vague sadly, could we get it a bit better clarified. What I mean is: what are the preliminary requirements for the test case to be valid? Does it have to be performed on specific hardware? What kind of hardware should it be? The regression potential field also doesn't say much about the regression potential, e.g. where possible regressions could be seen. I would appreciate if someone could update it with some regression analysis: what else can this break? Can different devices stop working by this? Which code paths are being touched by this change?

Thanks!

description: updated
description: updated
Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote :

@sil2100

hello Lukasz,

I just update the bug's description, would you please check if it is ok for you to proceed SRU.

Thanks!

description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Hui, or anyone else affected,

Accepted pulseaudio into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pulseaudio/1:13.99.1-1ubuntu3.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-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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-focal
Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote :

Test on Intel Tiger Lake platform CID:202004-27837

BIOS: 0.5.1
kernel: 5.6.0-1018-oem
gnome-control-center: 1:3.36.4-0ubuntu1
pulseaudio: 1:13.99.1-1ubuntu3.4
linux-firmware: 1.187.1.0.2 hui's ppa https://launchpad.net/~hui.wang/+archive/ubuntu/linux-firmware

1. add proposed update
2. $ sudo add-apt-repository ppa:hui.wang/linux-firmware
3. $ sudo apt install pulseaudio
4. $ sudo apt install gnome-control-center
5. $ sudo reboot

Test item:

internal speaker: okay
DMIC: okay
audio jack input: okay
audio jack output: okay
HDMI output: okay

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Rex Tsai (chihchun) wrote :

Hi, Lukas and SRU taem

This one is blocking another SRU[1] for a certification platform.

If we would like land the #1887610 soon to meet the project schedule, what would be the best approach to do this?

- Can we reduce the review time for this SRU, since it's verified?
- Or should we merge two SRU into one?

[1] https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1887610

Changed in oem-priority:
assignee: nobody → Kai-Chuan Hsieh (kchsieh)
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello! Seeing that this is priority for the OEM team, I'll conditionally release this early - and on a Friday (oh no!). The problem with this is that we'd have to make sure that if this does regress anything, there is someone to react quickly during the weekend. I'll be available, but I'd appreciate if someone from the OEM team could also keep eyes out for any news of regression. Please give me a poke if anything like that happens.

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

This bug was fixed in the package pulseaudio - 1:13.99.1-1ubuntu3.4

---------------
pulseaudio (1:13.99.1-1ubuntu3.4) focal; urgency=medium

  * d/p/0032-alsa-mixer-store-the-ucm_device-with-the-order-of-th.patch
    - switch the port on ucm devices based on the priority (LP: #1882161)

 -- Hui Wang <email address hidden> Fri, 05 Jun 2020 09:52:22 +0800

Changed in pulseaudio (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for pulseaudio 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.

Changed in oem-priority:
status: New → 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.