linux/sound/core
Jaroslav Kysela 85df6b5a66 ALSA: pcm: clarify and fix default msbits value for all formats
Return used most significant bits from sample bit-width rather than the whole
physical sample word size. The starting bit offset is defined in the format
itself.

The behaviour is not changed for 32-bit formats like S32_LE. But with this
change - msbits value 24 instead 32 is returned for 24-bit formats like S24_LE
etc.

Also, commit 2112aa0349 ("ALSA: pcm: Introduce MSBITS subformat interface")
compares sample bit-width not physical sample bit-width to reset MSBITS_MAX bit
from the subformat bitmask.

Probably no applications are using msbits value for other than S32_LE/U32_LE
formats, because no drivers are reducing msbits value for other formats (with
the msb offset) at the moment.

For sanity, increase PCM protocol version, letting the user space to detect
the changed behaviour.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20240222173649.1447549-1-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-02-23 09:44:46 +01:00
..
oss
seq
compress_offload.c
control.c
control_compat.c
control_led.c
ctljack.c
device.c
hrtimer.c
hwdep.c
hwdep_compat.c
info.c
info_oss.c
init.c
isadma.c
jack.c
Kconfig
Makefile ALSA: Drop leftover snd-rtctimer stuff from Makefile 2024-02-21 10:23:02 +01:00
memalloc.c
memalloc_local.h
memory.c
misc.c
pcm.c
pcm_compat.c
pcm_dmaengine.c
pcm_drm_eld.c
pcm_iec958.c
pcm_lib.c
pcm_local.h
pcm_memory.c
pcm_misc.c
pcm_native.c ALSA: pcm: clarify and fix default msbits value for all formats 2024-02-23 09:44:46 +01:00
pcm_param_trace.h
pcm_timer.c
pcm_trace.h
rawmidi.c
rawmidi_compat.c
seq_device.c
sound.c
sound_oss.c
timer.c
timer_compat.c
ump.c ALSA: ump: Fix the discard error code from snd_ump_legacy_open() 2024-02-20 17:06:12 +01:00
ump_convert.c
vmaster.c