Properly let PCM leave suspended state when hardware doesn't support PCM resume

Bug #1855893 reported by Kai-Heng Feng
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HWE Next
Fix Released
Undecided
Unassigned
pulseaudio (Ubuntu)
Fix Released
Medium
Kai-Heng Feng
Bionic
Won't Fix
High
Unassigned

Bug Description

[Impact]
Headset Mic plugged into Dell WD19TB dock stops working after suspend/resume.

[Fix]
According to alia-lib's document, to make PCM properly leave suspended state, we only use snd_pcm_resume() if hardware support PCM resume.
For hardware that doesn't support PCM resume, like snd-usb-audio on WD19TB dock, we should use snd_pcm_prepare(), snd_pcm_drop() or snd_pcm_drain() to make device leave suspended state. This patch defaults to use snd_pcm_drop() to achieve the goal.

[Test]
1. See if microphone on snd-usb-audio works in gnome-control-center/cheese.
2. Suspend/resume.
3. See if microphone still works in those apps.
I can the issue is fixed after each suspend/resume cycle.

[Regression Potential]
Low. This fix makes PCM suspend/resume more reliable. No functional change intended. I also don't find any regression during some smoke test.

description: updated
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
tags: added: oem-priority originate-from-1849812 somerville
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "pulseaudio_11.1-1ubuntu7.6.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
Mathew Hodson (mhodson)
Changed in pulseaudio (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I just noticed the above patch. Now added to git:

https://git.launchpad.net/~ubuntu-audio-dev/pulseaudio/log/?h=ubuntu-bionic

Please remember to put proposed changes in git so everyone is working with the same source.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also please provide links to upstream changes/bugs in the patch, and/or here.

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

Doesn't seem to be have an upstream bug.

Here's the upstream commit:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/f7b3537bbf9a6916ee3fd72a82025519b4c346f5

tags: added: rls-bb-incoming
Changed in pulseaudio (Ubuntu):
status: New → In Progress
assignee: nobody → Kai-Heng Feng (kaihengfeng)
Revision history for this message
Sebastien Bacher (seb128) wrote :

The fix is in the current pulseaudio version/Ubuntu serie

tags: removed: rls-bb-incoming
Changed in pulseaudio (Ubuntu Bionic):
assignee: nobody → Kai-Heng Feng (kaihengfeng)
importance: Undecided → High
status: New → In Progress
Changed in pulseaudio (Ubuntu):
status: In Progress → Fix Released
Changed in pulseaudio (Ubuntu Bionic):
assignee: Kai-Heng Feng (kaihengfeng) → nobody
Revision history for this message
Sebastien Bacher (seb128) wrote :

@Kai-Heng, you unassigned yourself, does it mean it's not important anymore for bionic and the target should be dropped?

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

I think it's okay to drop it since Focal is imminent.

Changed in pulseaudio (Ubuntu Bionic):
status: In Progress → Won't Fix
Timo Aaltonen (tjaalton)
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.