Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pulseaudio pulseaudio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 897
    • Issues 897
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 57
    • Merge requests 57
  • 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
  • PulseAudioPulseAudio
  • pulseaudiopulseaudio
  • Merge requests
  • !532

bluetooth: Use software volume for >100%, balance and finer control

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Marijn Suijten requested to merge MarijnS95/pulseaudio:bluetooth-sw-volume-compensation into master Mar 28, 2021
  • Overview 6
  • Commits 2
  • Pipelines 7
  • Changes 1

Excerpt from !239 (merged), submitted separately to relieve some review burden. Some comments might not make a lot of sense unless !239 (merged) is merged first though, but it is well applicable to HSP/HFP too.

Use software volume to compensate for lack in hardware granularity, provide stereo balance, and >100% amplification.


This compensates discrepancies between requested volume and actual volume represented by the 127-step A2DP range or 15-step HSP/HFP range, including setting volume above 100% without any additional logic; the delta simply becomes larger. The delta is calculated per channel against "mono" hardware volume on the remote to also take care of differences in balance. The remote uses the maximum volume of all channels and software is used to attenuate below that (or above, if one or more channels are set above 100%).

Note that this does NOT take the actual volume on the remote into account yet! Most headphones don't use the full range, and instead round to the nearest multiple of some arbitrarily chosen step size. They do reply with this value, which we should consequently retrieve and deal with.

Fixes #1245 (closed)

Edited Aug 03, 2021 by Marijn Suijten
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: bluetooth-sw-volume-compensation