linux/sound
Cássio Gabriel 2c4fdd055f
ASoC: SOF: compress: return the configured codec from get_params
The SOF compressed offload path accepts codec parameters in
sof_compr_set_params() and forwards them to firmware as
extended data in the SOF IPC stream params message.

However, sof_compr_get_params() still returns success without
filling the snd_codec structure. Since the compress core allocates
that structure zeroed and copies it back to userspace on success,
SNDRV_COMPRESS_GET_PARAMS returns an all-zero codec description
even after the stream has been configured successfully.

The stale TODO in this callback conflates get_params() with capability
discovery. Supported codec enumeration belongs in get_caps() and
get_codec_caps(). get_params() should report the current codec settings.

Cache the codec accepted by sof_compr_set_params() in the per-stream SOF
compress state and return it from sof_compr_get_params().

Fixes: 6324cf901e ("ASoC: SOF: compr: Add compress ops implementation")
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260325-sof-compr-get-params-v1-1-0758815f13c7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-06 13:11:57 +01:00
..
ac97 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
aoa Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
arm ASoC: ac97: Convert to GPIO descriptors 2026-01-27 12:45:57 +00:00
atmel ALSA: atmel: Use guard() for mutex locks 2025-09-01 13:54:28 +02:00
core ALSA: pcm: fix use-after-free on linked stream runtime in snd_pcm_drain() 2026-03-09 09:56:09 +01:00
drivers Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
firewire ALSA: firewire-lib: fix uninitialized local variable 2026-03-17 09:54:48 +01:00
hda ASoC: Merge up fixes 2026-03-30 17:59:52 +01:00
i2c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
isa Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mips Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
oss ALSA: echoaudio: Add SPDX ids to some files 2026-02-18 08:57:38 +01:00
parisc Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pci ALSA: asihpi: avoid write overflow check warning 2026-03-18 17:01:17 +01:00
pcmcia Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ppc Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sh Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
soc ASoC: SOF: compress: return the configured codec from get_params 2026-04-06 13:11:57 +01:00
sparc ALSA: sparc/dbri: Use guard() for spin locks 2025-09-10 13:20:01 +02:00
spi ALSA: spi/at73c213: Use guard() for spin locks 2025-09-17 14:07:02 +02:00
synth Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
usb ASoC: Merge up fixes 2026-03-30 17:59:52 +01:00
virtio Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
x86 ASoC: Add SPDX ids to many soc files 2026-02-22 23:52:20 +00:00
xen Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
ac97_bus.c ALSA: ac97: Fix kernel-doc warning for snd_ac97_reset 2025-11-06 10:52:43 +01:00
Kconfig
last.c
Makefile
sound_core.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00