[SRU] there is always a "Rear Microphone - Built-in Audio" option on the input device list even if the microphone is unplugged

Bug #1929371 reported by jeremyszu
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
High
jeremyszu
alsa-ucm-conf (Ubuntu)
Fix Released
Low
Unassigned
Focal
Fix Released
Low
Unassigned
Hirsute
Fix Released
Low
Unassigned
pulseaudio (Ubuntu)
Fix Released
Low
Unassigned
Focal
Fix Released
Low
Unassigned
Hirsute
Fix Released
Low
Unassigned

Bug Description

[Impact]
In Lenovo P520, which using a codec for front panel, the other codec for rear panel and both are on a same card.

In this case, the rear Mic will present on input devices of "Sound Settings" even if attaching nothing to rear mic jack.

[Fix]
For alsa-ucm-conf part, the Mic 2 should use "Rear Mic Jack" as JackControl because of
```
 control.18 {
  iface CARD
  name 'Rear Mic Jack'
  value true
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
```
After applying "Rear Mic Jack", the rear Mic will not always there anymore but it's not there as well if hot-plugging audio device on rear mic. Thus, it needs to change pulseaudio to handle if all devices are off cases.

For pulseaudio, if there is no any audio devices attached, then attaching an input device on rear mic jack. The port will not be selected automatically because the profiles is off. It needs patch pulseaudio to check off profiles (for dual codec case).

[Test]
After applying these patches, the rear mic jack works good in all cases (boot without mic and then attach mic, boot with mic and then hotplug it) and other functions (line-in / line-out) work pretty well.

[Where problems could occur]
This change only apply the bonus on below cases:
```
if ((has_input_port && found_available_input_port && !has_output_port) ||
    (has_output_port && found_available_output_port && !has_input_port) ||
    (has_input_port && found_available_input_port && has_output_port && found_available_output_port))
```
and these cases have been tested.
If there are some complex codec design then it might cause problem but so far we didn't see that.

jeremyszu (os369510)
summary: - there is always a "Rear Microphone - Built-in Audio" option on the input
- device list even if the microphone is unplugged
+ [SRU] there is always a "Rear Microphone - Built-in Audio" option on the
+ input device list even if the microphone is unplugged
tags: added: oem-priority originate-from-1884497 sutton
Changed in oem-priority:
assignee: nobody → jeremyszu (os369510)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Incomplete due to blank Bug Description.

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
jeremyszu (os369510) wrote :

For focal

Revision history for this message
jeremyszu (os369510) wrote :

For groovy

Revision history for this message
jeremyszu (os369510) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "alsa-ucm-conf_1.2.2-1ubuntu0.8.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
jeremyszu (os369510) wrote :

For impish

Revision history for this message
jeremyszu (os369510) wrote :

For hirsute

Revision history for this message
jeremyszu (os369510) wrote :

For groovy

Revision history for this message
jeremyszu (os369510) wrote :

For focal

Mathew Hodson (mhodson)
Changed in alsa-ucm-conf (Ubuntu):
importance: Undecided → Low
Changed in pulseaudio (Ubuntu):
importance: Undecided → Low
Changed in alsa-ucm-conf (Ubuntu Focal):
importance: Undecided → Low
Changed in alsa-ucm-conf (Ubuntu Groovy):
importance: Undecided → Low
Changed in alsa-ucm-conf (Ubuntu Hirsute):
importance: Undecided → Low
Changed in pulseaudio (Ubuntu Focal):
importance: Undecided → Low
Changed in pulseaudio (Ubuntu Groovy):
importance: Undecided → Low
Changed in pulseaudio (Ubuntu Hirsute):
importance: Undecided → Low
Changed in alsa-ucm-conf (Ubuntu Hirsute):
status: New → Fix Released
Changed in alsa-ucm-conf (Ubuntu):
status: New → Fix Released
Revision history for this message
jeremyszu (os369510) wrote :

Hi Daniel,

SRU template filled, thanks!

description: updated
Changed in oem-priority:
status: In Progress → Triaged
Revision history for this message
Sebastien Bacher (seb128) wrote :

Upload to Impish and Hirsute now, Focal is coming

Changed in pulseaudio (Ubuntu):
status: Incomplete → Fix Committed
Changed in pulseaudio (Ubuntu Hirsute):
status: New → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Uploaded to focal, 20.10 is probably not worth doing at this point

no longer affects: alsa-ucm-conf (Ubuntu Groovy)
no longer affects: pulseaudio (Ubuntu Groovy)
Changed in alsa-ucm-conf (Ubuntu Focal):
status: New → Fix Committed
Changed in pulseaudio (Ubuntu Focal):
status: New → Fix Committed
Revision history for this message
Hui Wang (hui.wang) wrote :

@seb128,

There is one more pulseaudio SRU for focal, if possible, could you please merge them to be a single upload.

https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1929817

Thanks.

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

This bug was fixed in the package pulseaudio - 1:14.2-2ubuntu2

---------------
pulseaudio (1:14.2-2ubuntu2) impish; urgency=medium

  * d/p/0016-check_off_profile_when_switching_profile.patch
  * d/p/0017-add_dynamic_priority_bonus_base_for_alsa_profiles.patch
    Fix a "Rear Mic" always showing on input list when using dual codec.
    (LP: #1929371)

 -- Jeremy Szu <email address hidden> Tue, 25 May 2021 12:41:39 +0000

Changed in pulseaudio (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello jeremyszu, or anyone else affected,

Accepted pulseaudio into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pulseaudio/1:14.2-1ubuntu1.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, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. 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-hirsute
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello jeremyszu, 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.11 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-focal
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello jeremyszu, or anyone else affected,

Accepted alsa-ucm-conf into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/alsa-ucm-conf/1.2.2-1ubuntu0.8 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.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Enable -proposed pocket and update. The "Rear Microphone - Built-in Audio" is not present anymore.

The jack detection still works correctly for all 4 audio ports.

tags: added: verification-done-focal verification-done-hirsute
removed: verification-needed-focal verification-needed-hirsute
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:14.2-1ubuntu1.1

---------------
pulseaudio (1:14.2-1ubuntu1.1) hirsute; urgency=medium

  * d/p/0015-checking_the_off_profile_when_switching_profile.patch
  * d/p/0016-add_dynamic_priority_bonus_base_for_alsa_profiles.patch
    Fix a "Rear Mic" always showing on input list when using dual codec.
    (LP: #1929371)

 -- Jeremy Szu <email address hidden> Tue, 25 May 2021 12:54:15 +0000

Changed in pulseaudio (Ubuntu Hirsute):
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.

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

This bug was fixed in the package alsa-ucm-conf - 1.2.2-1ubuntu0.8

---------------
alsa-ucm-conf (1.2.2-1ubuntu0.8) focal; urgency=medium

  * d/p/0001-HDA-Intel-add-RearMic-JackControl.patch
    Add "Rear Mic Jack" to make P520 rear mic works correctly. (LP: #1929371)

 -- Jeremy Szu <email address hidden> Tue, 25 May 2021 11:42:01 +0000

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

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

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

  * d/p/0016-check_off_profile_when_switching_profile.patch
  * d/p/0017-add_dynamic_priority_bonus_base_for_alsa_profiles.patch
    Fix a "Rear Mic" always showing on input list when using dual codec.
    (LP: #1929371)

   [ Hui Wang ]
  * d/p/0704-alsa-mixer-use-safe-dB-range-values-when-the-overrid.patch
  * d/p/0705-alsa-mixer-add-support-up-8-mixer-channels.patch
    - The linux kernel 5.11 starts supporting more than 2 channels for
      the digital mic, we need to add the support of 8 channels for a
      single alsa mixer, otherwise the PA can't change the hardware input
      volume of the digital mic.
      (LP: #1929817)

 -- Jeremy Szu <email address hidden> Tue, 25 May 2021 16:04:07 +0000

Changed in pulseaudio (Ubuntu Focal):
status: Fix Committed → Fix Released
Mathew Hodson (mhodson)
Changed in oem-priority:
status: Triaged → Fix Released
Mathew Hodson (mhodson)
tags: removed: verification-needed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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