sst-linux/include
Charles Keepax 694110bc24 ASoC: ops: Consistently treat platform_max as control value
[ Upstream commit 0eba2a7e858907a746ba69cd002eb9eb4dbd7bf3 ]

This reverts commit 9bdd10d57a ("ASoC: ops: Shift tested values in
snd_soc_put_volsw() by +min"), and makes some additional related
updates.

There are two ways the platform_max could be interpreted; the maximum
register value, or the maximum value the control can be set to. The
patch moved from treating the value as a control value to a register
one. When the patch was applied it was technically correct as
snd_soc_limit_volume() also used the register interpretation. However,
even then most of the other usages treated platform_max as a
control value, and snd_soc_limit_volume() has since been updated to
also do so in commit fb9ad24485087 ("ASoC: ops: add correct range
check for limiting volume"). That patch however, missed updating
snd_soc_put_volsw() back to the control interpretation, and fixing
snd_soc_info_volsw_range(). The control interpretation makes more
sense as limiting is typically done from the machine driver, so it is
appropriate to use the customer facing representation rather than the
internal codec representation. Update all the code to consistently use
this interpretation of platform_max.

Finally, also add some comments to the soc_mixer_control struct to
hopefully avoid further patches switching between the two approaches.

Fixes: fb9ad24485087 ("ASoC: ops: add correct range check for limiting volume")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250228151456.3703342-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-03-28 21:58:57 +01:00
..
acpi
asm-generic vmlinux.lds: Ensure that const vars with relocations are mapped R/O 2025-03-07 16:56:50 +01:00
clocksource x86/hyperv: Fix hv tsc page based sched_clock for hibernation 2025-01-09 13:29:56 +01:00
crypto
drm drm/ttm: Make sure the mapped tt pages are decrypted when needed 2024-12-14 19:54:54 +01:00
dt-bindings
keys
kunit
kvm
linux io_uring: get rid of remap_pfn_range() for mapping rings/sqes 2025-03-28 21:58:53 +01:00
math-emu
media
memory
misc
net Revert "Bluetooth: hci_core: Fix sleeping function called from invalid context" 2025-03-28 21:58:49 +01:00
pcmcia
ras
rdma
rv rv: Reset per-task monitors also for idle tasks 2025-02-21 13:49:47 +01:00
scsi
soc net: mscc: ocelot: be resilient to loss of PTP packets during transmission 2024-12-19 18:08:54 +01:00
sound ASoC: ops: Consistently treat platform_max as control value 2025-03-28 21:58:57 +01:00
target
trace net/ipv4: add tracepoint for icmp_send 2025-03-07 16:56:44 +01:00
uapi io_uring: get rid of remap_pfn_range() for mapping rings/sqes 2025-03-28 21:58:53 +01:00
ufs scsi: ufs: core: Fix the HIGH/LOW_TEMP Bit Definitions 2025-02-21 13:49:42 +01:00
vdso
video
xen