Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pulseaudio pulseaudio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 895
    • Issues 895
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 49
    • Merge requests 49
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • PulseAudioPulseAudio
  • pulseaudiopulseaudio
  • Merge requests
  • !772

Draft: alsa-ucm: Disable UCM devices when suspending

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Alper Nebi Yasak requested to merge alpernebbi/pulseaudio:alsa-ucm-disable-devices-on-suspend into master Jan 27, 2023
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 4

This is a rebase of !307, minus the refactoring patches. Works mostly fine on my chromebook (tested with other fixes), except the devices are also "muted" when suspended. If I shutdown PulseAudio when devices are muted like this, the muted state is restored at startup and I have to manually unmute them to use them.

As far as I can tell the root cause is EnableSequence/DisableSequence commands using the controls also listed in PlaybackMixerElem etc. I think it fits the mute issue reported on the original MR. I'm especially suspicious of this UCM fragment with mismatched enable-disable sequences, or something like that. Here's how it might be happening:

  • PA reads PlaybackMixerElem, uses Speaker Playback Switch as hardware mute
  • PA decides to suspend device, calls alsa-lib to disable it
  • alsa-lib runs DisableSequence, turns off Speaker Playback Switch
  • PA notices Speaker Playback Switch is now off, marks device as muted (shows up in UIs)
  • User starts audio playback
  • PA decides to wake device, calls alsa-lib to enable it
  • alsa-lib runs EnableSequence, does nothing because it's empty
  • PA didn't mute the device, so has no reason to un-mute it itself
  • User notices device is still muted, has to manually un-mute to get audio

In my chromebook's config, EnableSequence does turn on whatever DisableSequence turns off, so it works fine. Still, stopping PulseAudio in the middle results in device volume being saved as "muted". I'd even say it shouldn't show up as muted in any point of this.

Although I definitely think UCM configs are at fault here, I don't think we can just say "Go fix your UCM config" to everyone, and don't know how else we can solve it. So marking this MR as a draft. Anyone wanting to test this should make sure to also have the hardware volume fixes, otherwise things will merely appear to work because your devices are silently downgraded to software volume control.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: alsa-ucm-disable-devices-on-suspend