linux/include/uapi/sound
Maciej Strozek 86cac980c9 ALSA: control: add ioctl to retrieve full card components
The fixed-size components field in SNDRV_CTL_IOCTL_CARD_INFO can be too
small on systems with many audio devices.

Keep the existing struct snd_ctl_card_info ABI intact and add a new
ioctl SNDRV_CTL_IOCTL_CARD_BYTES that carries a variable-length payload
selected by a type discriminator. The first defined type
SND_CTL_CARD_BTYPE_COMPONENTS returns the full components string. The
ioctl is designed to be reused for other variable-length card payloads
in the future.

The user-space caller may set data_allocated == 0 (or data == NULL) to
query the required length; otherwise the kernel copies the payload into
the user buffer and writes back the actual length in data_len.

When the legacy components field in struct snd_ctl_card_info is
truncated, '>' is written just before the NUL terminator to signal to
user-space that the full string is available via the new ioctl.

card->components is now dynamically allocated and grown in 32 byte
increments via krealloc(), capped at 512 bytes.

Link: https://github.com/alsa-project/alsa-lib/pull/494
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Takashi Iwai <tiwai@suse.com>
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260720103505.1860399-2-mstrozek@opensource.cirrus.com
2026-08-05 09:28:59 +02:00
..
intel/avs ASoC: Intel: avs: Honor NHLT override when setting up a path 2025-11-16 23:59:05 +00:00
sof ASoC: SOF: ipc4-topology: Add new tokens for pipeline direction 2026-02-04 13:26:05 +00:00
asequencer.h ALSA: seq: Notify UMP EP and FB changes 2025-01-12 13:12:21 +01:00
asoc.h ASoC: topology: Bump minimal topology ABI version 2024-10-10 12:15:03 +01:00
asound_fm.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
asound.h ALSA: control: add ioctl to retrieve full card components 2026-08-05 09:28:59 +02:00
compress_offload.h ALSA: compress_offload: increase SNDRV_COMPRESS_VERSION minor version by 1 2025-09-19 14:58:09 +02:00
compress_params.h ALSA: compress: document 'chan_map' member in snd_dec_opus 2025-09-28 08:29:03 +02:00
emu10k1.h ALSA: emu10k1: enable bit-exact playback, part 1: DSP attenuation 2023-05-15 22:06:21 +02:00
fcp.h ALSA: FCP: Add Focusrite Control Protocol driver 2025-01-18 12:00:38 +01:00
firewire.h ALSA: firewire: fix all kernel-doc warnings 2026-07-14 08:00:44 +02:00
hdsp.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
hdspm.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
sb16_csp.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
scarlett2.h ALSA: scarlett2: Add support for Solo, 2i2, and 4i4 Gen 4 2023-12-29 15:52:14 +01:00
sfnt_info.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
skl-tplg-interface.h ASoC: Intel: Skylake: Remove soc-topology ABI v4 support 2024-04-04 15:50:03 +01:00
snd_ar_tokens.h ASoC: qcom: audioreach: add support for static calibration 2025-08-19 13:04:44 +01:00
snd_sst_tokens.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
tlv.h ALSA: FCP: Add Focusrite Control Protocol driver 2025-01-18 12:00:38 +01:00
usb_stream.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00