pipewire/spa/plugins/alsa/acp
Pauli Virtanen da2cecf074 alsa: acp: don't disable dB if negative max unless range is small
Disabling dB volumes for max_dB < 0 was added in Pulseaudio in 2021,
based on a device which had -128..-127.07 range. However, negative
max_dB is valid value for USB devices, and there are devices that have
it.

Eg. Microsoft LifeChat LX-3000 has

numid=6,iface=MIXER,name='Speaker Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=151,step=0
  : values=150,150
  | dBminmax-min=-28.37dB,max=-0.06dB

and the dB range seems to be OK. Web search for "The decibel volume
range for element" also gives other hits with seemingly OK looking
ranges.

Don't disable dB volume unless both the max is negative and the range is
suspiciously small. This should still disable it for the device this
check was originally added for.

Link: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/447
Link: 10ac01a206
2025-10-15 21:37:06 +03:00
..
acp.c spa: alsa: Add option to use ELD-detected channels 2025-10-10 09:34:43 +00:00
acp.h spa: alsa: Read and expose channel count and position from ELD 2025-10-10 09:34:43 +00:00
alsa-mixer.c alsa: acp: don't disable dB if negative max unless range is small 2025-10-15 21:37:06 +03:00
alsa-mixer.h spa: acp: Allow Volume control which supports mute to be used as a hardware mute 2025-05-05 07:40:29 +00:00
alsa-ucm.c spa: alsa: fix some coverity warnings 2025-06-14 14:38:26 +03:00
alsa-ucm.h spa: acp: indicate ALSA UCM profile errors in UIs 2025-03-13 21:25:55 +00:00
alsa-util.c spa: alsa: Read and expose channel count and position from ELD 2025-10-10 09:34:43 +00:00
alsa-util.h spa: alsa: Read and expose channel count and position from ELD 2025-10-10 09:34:43 +00:00
array.h *: don't include standard C headers inside of extern "C" 2025-05-30 09:48:28 +01:00
card.h spa: alsa: Add option to use ELD-detected channels 2025-10-10 09:34:43 +00:00
channelmap.h *: don't include standard C headers inside of extern "C" 2025-05-30 09:48:28 +01:00
compat.c *: unify config.h handling 2025-05-30 10:24:13 +00:00
compat.h spa: alsa: fix some coverity warnings 2025-06-14 14:38:26 +03:00
conf-parser.c config.h is a local header, not a system one 2021-06-10 09:04:16 +10:00
conf-parser.h alsa-acp: Add libacp based card device 2020-07-06 12:20:09 +02:00
device-port.h *: don't include standard C headers inside of extern "C" 2025-05-30 09:48:28 +01:00
dynarray.h *: don't include standard C headers inside of extern "C" 2025-05-30 09:48:28 +01:00
hashmap.h *: don't include standard C headers inside of extern "C" 2025-05-30 09:48:28 +01:00
idxset.h *: don't include standard C headers inside of extern "C" 2025-05-30 09:48:28 +01:00
llist.h alsa-acp: Add libacp based card device 2020-07-06 12:20:09 +02:00
meson.build treewide: meson.build: use dependency variable for SPA 2021-12-28 18:34:06 +01:00
proplist.h *: don't include standard C headers inside of extern "C" 2025-05-30 09:48:28 +01:00
volume.h *: don't include standard C headers inside of extern "C" 2025-05-30 09:48:28 +01:00