No description
Find a file
Marijn Suijten 3953d44569 bluetooth: Handle muting over A2DP Absolute Volume
Muting is a special case that is explicit and separated from volume
within PulseAudio, but merged together into a single variable over the
A2DP AVRCP connection.
Most devices report either 0 or 1 as their lowest volume.

Note that capital Volume in the following paragraphs refer to the Volume
property on org.bluez.MediaTransport1.

This commit deals with the following cases:

1. When the PA stream is muted, notify the peer by setting Volume to 0.
   While the stream is muted real_volume should _not_ be updated in the
   callback when Volume changes to <= 1, or unmuting will _not_ return
   to the original volume.

2. When locally changing stream volume, and muting is enabled, do _not_
   send updates to the peer.  The peer should stick with Volume = 0.

3. When locally changing stream volume (and sending that to the peer)
   any resulting updates on the Volume property should _not_ turn on
   muting.

4. When the peer changes Volume, turn off muting (if enabled) when
   Volume > 1.

5. When the peer changes Volume, turn on muting when Volume <= 1.

Such an implementation matches what happens on an Android device.
Muting sets the shared volume to 0, and upping the volume on the peer
(in case of headphones which usually only have up/down buttons) will set
it a single increment above that.  Unmuting the stream from PA however
will return the stream back to the original volume, and notify the peer
of the same.

The discrepancy between merged and separate muting+volume results in a
conflict between point 3. and 5.: The peer (and/or dbus API) always
responds with the Volume property changing after PA writes it.  If PA's
stream volume is decreased to a point where the callback triggers with
Volume <= 1 the stream is consequently muted, in accordance to point 5.
This is especially problematic when decreasing the local volume too far
(whether intentionally or not), as muting is not turned off by default
when the stream volume is increased afterwards.

This case is dealt with by preventing any Volume lower than 2 to be sent
to the device at any given point.  Only the device itself can return a
Volume lower than that to enable implicit muting.
However, when point 5. happens, it is important to note that it can only
be unmuted by explicitly unmuting the stream from PA, _or_ increasing
the volume on the peer.
2022-02-21 19:18:39 +01:00
.gitlab doc: Add some contributor guidelines 2021-01-04 15:30:38 +00:00
coverity build: Add Coverity scan model 2017-03-06 08:22:33 +01:00
doc card: handle sticky profile flag 2021-06-10 10:30:58 +00:00
doxygen build-sys: Fix a couple of meson warnings 2021-05-17 16:07:33 -04:00
man pacat: Include the special default device names in documentation 2022-01-26 17:13:53 +00:00
po Translated using Weblate (Korean) 2022-01-11 07:16:32 +01:00
scripts build-sys: meson: fix meson dist version 2021-03-15 18:25:06 +00:00
shell-completion build-sys: meson: Rearrange shell completion between daemon and client 2021-11-17 16:06:23 +00:00
src bluetooth: Handle muting over A2DP Absolute Volume 2022-02-21 19:18:39 +01:00
vala vala: Couple of libpulse binding fixes 2021-09-22 15:56:27 +00:00
.gitignore gitignore: Add install/ for local prefixed installs 2021-01-19 10:57:17 -05:00
.gitlab-ci.yml gitlab-ci: Turn on Werror for meson builds 2021-11-05 07:50:56 +00:00
.mailmap add a .mailmap file for git shortlog 2009-02-04 22:41:45 +01:00
CODE_OF_CONDUCT.md Adopt a Code of Conduct 2018-09-26 02:39:00 +00:00
CONTRIBUTING.md CONTRIBUTING.md: fix another typo 2021-07-30 13:13:46 +00:00
git-version-gen git-version-gen: Avoid further processing when tarball-version is present 2015-10-20 16:55:23 +02:00
GPL * rename "LICENSE" to "LGPL" 2006-04-20 12:33:00 +00:00
LGPL * rename "LICENSE" to "LGPL" 2006-04-20 12:33:00 +00:00
libpulse-mainloop-glib.pc.in build: Fix static linking 2012-07-17 11:05:34 +05:30
libpulse-simple.pc.in build: Fix static linking 2012-07-17 11:05:34 +05:30
libpulse.pc.in build: Fix static linking 2012-07-17 11:05:34 +05:30
LICENSE qpaeq: change license from AGPL to LGPL v2.1 2017-09-19 21:29:44 +03:00
meson.build build-sys: Bump libpulse soversion for 16.0 2022-02-21 17:20:51 +00:00
meson_options.txt meson: Enable GStreamer-based RTP by default (when available) 2022-01-05 17:36:14 +02:00
NEWS Update NEWS for 15.0 2021-07-27 12:42:33 -04:00
PROTOCOL protocol-native: add message sending capability 2020-12-03 14:41:39 +00:00
pulseaudio-text.svg merge 'lennart' branch back into trunk. 2007-10-28 19:13:50 +00:00
pulseaudio.supp Add a Valgrind suppression file 2014-09-21 11:00:51 +03:00
pulseaudio.svg Add PulseAudio logo to tree. 2006-08-28 06:25:41 +00:00
PulseAudioConfig.cmake.in build-sys: Provide a simple CMake Config setup (similar to pkgconfig) 2011-10-19 23:49:23 +01:00
PulseAudioConfigVersion.cmake.in build-sys: Provide a simple CMake Config setup (similar to pkgconfig) 2011-10-19 23:49:23 +01:00
README doc: link to site documentation for IRC channels 2021-06-14 18:55:33 +03:00
todo build-sys: Stop using symdef headers for modules 2017-12-12 12:58:52 +05:30

PULSEAUDIO SOUND SERVER

WEB SITE:
	http://pulseaudio.org/

GIT:
	https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git

GitLab:
	https://gitlab.freedesktop.org/pulseaudio/pulseaudio

MAILING LIST:
	http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

GIT COMMITS MAILING LIST:
	http://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits

TRAC/BUGZILLA TICKET CHANGES MAILING LIST:
	http://lists.freedesktop.org/mailman/listinfo/pulseaudio-bugs

IRC:
	https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Community/#ircandmatrix

FRESHMEAT:
	http://freshmeat.net/projects/pulseaudio/

OHLOH:
	http://www.ohloh.net/projects/4038

AUTHORS:
	Several

HACKING:
	In order to run pulseaudio from the build dir:
	  meson build
	  meson compile -C build
	  build/src/daemon/pulseaudio -n -F build/src/daemon/default.pa -p $(pwd)/build/src/modules/

SPELLING:
        PulseAudio