]> git.alsa-project.org Git - alsa-lib.git/log
alsa-lib.git
3 days agopcm: mmap_emul: report own appl_ptr in status
Andy Saul [Thu, 5 Nov 2026 14:17:10 +0000 (14:17 +0000)]
pcm: mmap_emul: report own appl_ptr in status

In mmap_emul mode the mmap_emul PCM keeps its own appl_ptr apart from
the slave. A playback commit forwards it and then writes the new frames
to the slave with sync_slave_write(). The commit returns the full size
even when that write fails or comes up short, for example after an xrun.

The status op was snd_pcm_generic_status(), which returns the slave
appl_ptr. When a plugin such as softvol sits above mmap_emul, its
appl_ptr follows the mmap_emul one. After a short write the two differ
and snd_pcm_plugin_status() aborts on

  pcm_plugin.c: snd_pcm_plugin_status: Assertion
  `status->appl_ptr == *pcm->appl.ptr' failed.

This happens with any hw PCM whose driver lacks mmap support when it is
used through plug with softvol above it, on the first xrun followed by
snd_pcm_status(). We hit it on an LG SoC whose ALSA driver only offers
RW access, where mpv aborts on the first xrun.

It also reproduces without hardware, with a linear PCM over mmap_emul
over an ioplug slave that offers only RW_INTERLEAVED access and fails
one transfer. Whether that transfer returns -EPIPE (state XRUN) or
-EIO, the next snd_pcm_status() on the linear PCM aborts.

Add a status op that reports the mmap_emul appl_ptr in emulation mode
for playback. It takes the frames not yet written to the slave out of
avail, and adds them to delay only while the stream is running or
draining, because the kernel status reports no delay in other states.
A count above the buffer size means the two appl_ptrs are out of sync,
as after snd_pcm_reset() on a running stream, and is ignored.
Non-emulated and capture streams are unchanged.

Closes: https://github.com/alsa-project/alsa-lib/pull/541
Signed-off-by: Andy Saul <asaul@brightsign.biz>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 days agopcm_file: treat write(2) returning 0 as an error in safe_write()
Jaroslav Kysela [Mon, 30 Nov 2026 20:01:28 +0000 (21:01 +0100)]
pcm_file: treat write(2) returning 0 as an error in safe_write()

A write(2) of a non-zero length returning 0 means no progress was
made and is not expected for a regular file or a blocking pipe. The
previous code broke out of the loop and returned a short positive
count, which snd_pcm_file_write_bytes() treats as non-fatal, silently
dropping the remaining bytes without reporting an error. Return -EIO
instead so the "write all or report error" contract is total.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 days agopcm_file: retry write(2) on short writes in safe_write()
Krishnanand G [Fri, 21 Aug 2026 09:47:12 +0000 (15:17 +0530)]
pcm_file: retry write(2) on short writes in safe_write()

write(2) on a pipe or FIFO can return fewer bytes than requested.
This happens when a blocking write gets interrupted by a signal
after part of the buffer already went through: the kernel hands
back the partial count instead of -EINTR. safe_write() treated any
non-negative return as complete and passed that short count
straight back to the caller.

snd_pcm_file_write_bytes() then saw err != n, broke out of its
write loop, and returned success anyway, so the unwritten tail of
the period never reached the target file.

Writes to a FIFO block waiting for a reader far more often than
writes to a regular file do, which is exactly why the file plugin
only drops samples on pipes and works fine on plain files.

Make safe_write() loop until every byte is written or a real error
turns up.

Closes: https://github.com/alsa-project/alsa-lib/pull/521
Fixes: https://github.com/alsa-project/alsa-lib/issues/63
Signed-off-by: Krishnanand G <krishnanandgeetheswaran@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 days agocontrol: ucm: add ioctl to retrieve full card components
Maciej Strozek [Thu, 19 Feb 2026 13:46:20 +0000 (13:46 +0000)]
control: ucm: 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. The kernel [1] will provide a
new ioctl to read the full string while truncating the original in
card_info if it grows too big. Make sure alsa-lib can read the full
string if the original is truncated.

[1] https://patch.msgid.link/20260720103505.1860399-2-mstrozek@opensource.cirrus.com

Closes: https://github.com/alsa-project/alsa-lib/pull/494
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 days agoucm: fix fd-closing fallback and waitpid signal handling in uc_mgr_exec
Jaroslav Kysela [Mon, 30 Nov 2026 14:31:00 +0000 (15:31 +0100)]
ucm: fix fd-closing fallback and waitpid signal handling in uc_mgr_exec

Use fallback value 1024 when sysconf(_SC_OPEN_MAX) fails.
The blocking waitpid() may return also EINTR.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 days agoucm: clean up data types
Mike Gilbert [Tue, 9 Dec 2025 18:26:40 +0000 (13:26 -0500)]
ucm: clean up data types

int should be used for file descriptors.
sysconf returns long.
waitpid returns pid_t.

Closes: https://github.com/alsa-project/alsa-lib/pull/487
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 days agoconfigure: update to modern LT_INIT options
Alex Xu (Hello71) [Mon, 12 Oct 2026 14:29:39 +0000 (10:29 -0400)]
configure: update to modern LT_INIT options

the migration of f7779c2a62 ("configure: update to autoconf v2.72") was
incomplete, _LT_SET_OPTION is legacy method and doesn't work on slibtool
(alternative libtool implementation). the supported libtool versions are
same, _LT_SET_OPTION is due to autoupdate limitations

Closes: https://github.com/alsa-project/alsa-lib/pull/531
Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 days agoasync: fix snd_async_del_handler for TIMER type
Jin Li [Tue, 15 Sep 2026 11:42:05 +0000 (11:42 +0000)]
async: fix snd_async_del_handler for TIMER type

snd_async_del_handler() has two switch statements that handle
PCM and CTL handler types, but not TIMER. When a TIMER type
handler is deleted, both switches fall through to default and
trigger assert(0), crashing any program that uses
snd_async_add_timer_handler().

Add the missing SND_ASYNC_HANDLER_TIMER cases to both switches,
and include timer_local.h to access struct _snd_timer.

Closes: https://github.com/alsa-project/alsa-lib/pull/525
Signed-off-by: Jin Li <jinli@lanxincomputing.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 days agoucm: avoid relinking cached controls when adding an alias
Reuben Grinberg [Sun, 1 Nov 2026 18:49:36 +0000 (12:49 -0600)]
ucm: avoid relinking cached controls when adding an alias

uc_mgr_open_ctl() calls uc_mgr_ctl_add() with an existing entry when
another device name resolves to the same control card. Adding that
entry to ctl_list again corrupts the list and can double-free the
control handle during failed UCM import cleanup.

Only link entries allocated by this invocation. Existing entries keep
their original list membership while their device aliases are added.

Closes: https://github.com/alsa-project/alsa-lib/pull/539
Signed-off-by: Reuben Grinberg <reuben.grinberg@aya.yale.edu>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 days agopcm: dmix: i386: keep the size operand in memory
Yegor Yefremov [Fri, 23 Oct 2026 23:18:15 +0000 (01:18 +0200)]
pcm: dmix: i386: keep the size operand in memory

The i386 mix_areas_*() assembly clobbers esi, edi, edx, ecx, eax and
(since gcc 5, even in PIC mode) ebx. When gcc also needs ebp as frame
pointer, which it does at -Os, no general purpose register is left.

Commit abc9f32cf45c ("pcm: dmix: assembly: give more freedom over the
constraints") relaxed the size operand from "+m" to "+&rm". With
AVX512BW enabled (e.g. -march=skylake-avx512, cannonlake, icelake or
x86-64-v4) and -Os or -Oz, gcc 15 and gcc 16 then fail to pick the
memory alternative and abort:

  pcm_dmix_i386.h:52:9: error: 'asm' operand has impossible constraints or there are not enough registers

As the asm already uses all registers, restore the "+m" constraint for
size, as used before that commit. The loop decrementing it in memory
also does read-modify-write operations on dst and sum, so the extra
memory access has a negligible cost.

Closes: https://github.com/alsa-project/alsa-lib/pull/537
Fixes: abc9f32cf45c ("pcm: dmix: assembly: give more freedom over the constraints")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 days agoucm: fix TOCTOU race in sysfs value substitution
Jaroslav Kysela [Mon, 30 Nov 2026 13:53:15 +0000 (14:53 +0100)]
ucm: fix TOCTOU race in sysfs value substitution

Separately checking a file's state (lstat64) before opening it lets the
final path component be replaced in between, so the subsequent open() may
operate on a different object than was checked.

Probe and operate on the same object instead: read the link first and, if
the path is not a symlink, open it with O_NOFOLLOW and run the type and
permission checks on the opened descriptor via fstat64(). O_NOFOLLOW only
constrains the final component, so the symbolic links that sysfs uses for
the intermediate components are still resolved as before. Also tighten the
accepted value source to regular files only.

Based on a patch by Mingjie Shen.

Closes: https://github.com/alsa-project/alsa-lib/pull/367
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 days agotopology: ctl: fix potential endless loop in tplg_decode_control_enum
Jaroslav Kysela [Mon, 30 Nov 2026 13:40:24 +0000 (14:40 +0100)]
topology: ctl: fix potential endless loop in tplg_decode_control_enum

The enum decode loop computed size2 = ec->size + ec->priv.size and only
rejected it for being too large (size2 > size). When both ec->size and
ec->priv.size are zero, size2 is zero, which passes that check, and the
loop advances bin/size/pos by zero and loops forever.

Unlike tplg_decode_control_mixer1() and tplg_decode_control_bytes1(),
tplg_decode_control_enum1() never received the computed size and had no
lower-bound size validation. Make it consistent with the mixer/bytes
helpers: pass (bin, size) and reject size < sizeof(*ec). Since the
structure size is non-zero, any accepted element guarantees forward
progress, which eliminates the endless loop.

Closes: https://github.com/alsa-project/alsa-lib/issues/535
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 days agopcm: multi: guard chmap handlers against unmapped channels
Jaroslav Kysela [Mon, 30 Nov 2026 13:34:52 +0000 (14:34 +0100)]
pcm: multi: guard chmap handlers against unmapped channels

snd_pcm_multi_query_chmaps(), snd_pcm_multi_get_chmap() and
snd_pcm_multi_set_chmap() index multi->slaves[] / slave_maps[] with
bind->slave_idx without checking for the slave_idx < 0 sentinel used for
unmapped channels in sparse binding maps. For such channels this reads or
writes array index -1 (out of bounds).

Skip unmapped channels: report SND_CHMAP_UNKNOWN for the query/get paths
and leave them untouched on set. This matches the existing slave_idx < 0
handling elsewhere in the plugin (channel info, mmap commit, dump).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 days agopcm: multi: allow sparse binding maps and fix error-path leak
Jaroslav Kysela [Mon, 30 Nov 2026 13:29:36 +0000 (14:29 +0100)]
pcm: multi: allow sparse binding maps and fix error-path leak

Commit 81c4a89eb445 replaced the binding asserts in snd_pcm_multi_open()
with -EINVAL checks, but it rejected sidxs[i] < 0. Sparse binding maps
legitimately leave sidxs[i] == -1 for gap (unmapped) channels:
_snd_pcm_multi_open() initializes channels_sidx[] to -1 and fills in only
the channels that have a bindings entry. Rejecting negative indices broke
valid configurations, and the trailing "if (sidxs[i] < 0) continue;"
became unreachable dead code.

Handle the unmapped case first by storing the slave_idx < 0 sentinel
(which the rest of the plugin already treats as "not bound") and skipping
the channel. The bounds checks then run only for sidxs[i] >= 0, so the
out-of-range read schannels_count[-1] can no longer happen.

The early "return -EINVAL" also leaked multi, multi->slaves and
multi->channels. Route the binding errors through the existing cleanup
block via goto so all allocations are freed.

Fixes: 81c4a89eb445 ("pcm: replace multi plugin binding asserts with -EINVAL checks")
Closes: https://github.com/alsa-project/alsa-lib/issues/536
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 days agocontrol: remap: forward non-remapped controls (-ENOENT) to child
Jaroslav Kysela [Tue, 24 Nov 2026 17:47:54 +0000 (18:47 +0100)]
control: remap: forward non-remapped controls (-ENOENT) to child

Initialize *_rid in remap_id_to_child() and tolerate -ENOENT from it in
the elem info/read/write/lock/unlock paths, so controls that are not in
the remap table are forwarded to the child ctl instead of failing.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 days agocontrol: remap: add more debug prints to remap_id_to_child()
Jaroslav Kysela [Tue, 24 Nov 2026 16:49:20 +0000 (17:49 +0100)]
control: remap: add more debug prints to remap_id_to_child()

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 days agocontrol: remap: fix numid table shrink in remap_forget_numid_child
Jaroslav Kysela [Tue, 24 Nov 2026 16:02:49 +0000 (17:02 +0100)]
control: remap: fix numid table shrink in remap_forget_numid_child

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 days agoucm: do not share the ctl cache handle for different device names
Jaroslav Kysela [Tue, 24 Nov 2026 15:35:33 +0000 (16:35 +0100)]
ucm: do not share the ctl cache handle for different device names

uc_mgr_open_ctl() merged any two devices resolving to the same card id
into a single cached ctl_list sharing one snd_ctl_t handle. This is wrong
when the device names differ: hw:1 and default:1 reference the same card
but are distinct control interfaces and must not share a handle.

Match the device name (the part before ':', ignoring the arguments) in
addition to the card id when reusing a cached handle.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 days agoucm: do not register hw: aliases for non-hw control devices
Jaroslav Kysela [Tue, 24 Nov 2026 15:35:12 +0000 (16:35 +0100)]
ucm: do not register hw: aliases for non-hw control devices

uc_mgr_ctl_add() unconditionally registered the synthetic hw:<card> and
hw:<id> aliases into the dev_list of every opened control device. These
aliases identify the hw control interface of a card, so adding them to a
different interface (e.g. default:X) makes that handle wrongly claim the
hw name. Two cached entries then reference the same hw:<id> string and a
later hw:X request may be served by (or merged into) the default handle.

Register the hw:<card> / hw:<id> aliases only when the opened device is
actually a hw device, keeping each cache entry tied to a single control
interface.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 days agoucm: drop self-references in SupportedDevice/ConflictingDevice lists
Jaroslav Kysela [Mon, 23 Nov 2026 14:43:14 +0000 (15:43 +0100)]
ucm: drop self-references in SupportedDevice/ConflictingDevice lists

When a device lists its own name in its SupportedDevice or
ConflictingDevice list, the relationship is ambiguous: a device cannot
meaningfully support or conflict with itself. Drop such self-references
in verb_resolve_optional_devices(), after optional references have been
resolved and before the bidirectional relationships are built, so they
do not propagate to other devices.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 days agoucm: support optional ('-' prefixed) device references in Syntax 10
Jaroslav Kysela [Mon, 23 Nov 2026 14:18:12 +0000 (15:18 +0100)]
ucm: support optional ('-' prefixed) device references in Syntax 10

A device name in a SupportedDevice or ConflictingDevice list may be
prefixed with '-' to mark the reference as optional. A '-' prefixed name
that matches no device is silently dropped instead of aborting parsing;
when the device exists, the prefix is stripped and it behaves like a
normal reference. This lets shared configuration snippets reference
devices that may or may not be present without conditional blocks.

Gated on conf_format >= 10.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 weeks agoconf,ucm,topology: reject relative paths that escape their base directory
Jaroslav Kysela [Mon, 19 Oct 2026 14:31:54 +0000 (16:31 +0200)]
conf,ucm,topology: reject relative paths that escape their base directory

Apply the lexical snd_relative_path_check() guard to more places.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 weeks agoconf: reject relative include paths that escape the include directory
Jaroslav Kysela [Mon, 19 Oct 2026 14:19:58 +0000 (16:19 +0200)]
conf: reject relative include paths that escape the include directory

Note this is a lexical check only; it does not resolve symlinks (not a filesystem sandbox).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 weeks agoRevert "conf: reject absolute include paths containing /../"
Jaroslav Kysela [Mon, 19 Oct 2026 13:52:25 +0000 (15:52 +0200)]
Revert "conf: reject absolute include paths containing /../"

This reverts commit f5377bbb572d88d9a59eee8ae26bff30d5a2ebb3.

This is just a cosmetic change which does not resolve any
security issue.

Link: https://github.com/alsa-project/alsa-lib/pull/527
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 weeks agoRevert "ucm: confine sysw and cfg-save paths with realpath()"
Jaroslav Kysela [Mon, 19 Oct 2026 07:13:19 +0000 (09:13 +0200)]
Revert "ucm: confine sysw and cfg-save paths with realpath()"

This reverts commit a47c8bc3fef190e7eb463283230263c82208597a.

The sysw change is too expensive and cfg-save saves data to /var/lib/alsa tree.

Link: https://github.com/alsa-project/alsa-lib/pull/527
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7 weeks agoucm: confine sysw and cfg-save paths with realpath()
Harsh Raj Singhania [Wed, 30 Sep 2026 18:59:06 +0000 (00:29 +0530)]
ucm: confine sysw and cfg-save paths with realpath()

1: execute_sysw() concatenated the sysfs root with a caller path via
snprintf() with no traversal check. Use realpath() and reject paths
that escape the sysfs root.

2: execute_cfgsave() opened a caller-supplied filename with no
restriction. Confine writes to XDG_RUNTIME_DIR (or /tmp) via
realpath().

[ rewritten with check_realpath() helper function -- tiwai ]

Closes: https://github.com/alsa-project/alsa-lib/pull/527
Signed-off-by: Harsh Raj Singhania <raj.harshraut@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agopcm: replace multi plugin binding asserts with -EINVAL checks
Harsh Raj Singhania [Wed, 30 Sep 2026 18:58:53 +0000 (00:28 +0530)]
pcm: replace multi plugin binding asserts with -EINVAL checks

Sparse binding maps leave sidxs[i] == -1 for gap indices. The previous
assert() calls caused SIGABRT in debug builds and OOB reads under NDEBUG.
Return -EINVAL with explicit bounds and sign checks instead.

[ fixed coding style -- tiwai ]

Closes: https://github.com/alsa-project/alsa-lib/pull/527
Signed-off-by: Harsh Raj Singhania <raj.harshraut@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agopcm: cap route plugin ttable channel dimensions at 1024
Harsh Raj Singhania [Wed, 30 Sep 2026 18:58:37 +0000 (00:28 +0530)]
pcm: cap route plugin ttable channel dimensions at 1024

csize/ssize grew from config-supplied channel indices with no upper
bound before malloc(csize * ssize * sizeof(entry)). Cap both at 1024,
consistent with other PCM plugins.

[ fixed coding style -- tiwai ]

Closes: https://github.com/alsa-project/alsa-lib/pull/527
Signed-off-by: Harsh Raj Singhania <raj.harshraut@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agotopology: fix uint32_t overflow in control decoder size checks
Harsh Raj Singhania [Wed, 30 Sep 2026 18:58:15 +0000 (00:28 +0530)]
topology: fix uint32_t overflow in control decoder size checks

size2 = x->size + x->priv.size was computed in 32-bit arithmetic and could
wrap on a 64-bit host, bypassing the subsequent bounds check. Pre-check
for overflow then cast to size_t. Affects tplg_decode_control_mixer,
tplg_decode_control_enum, and tplg_decode_control_bytes.

Closes: https://github.com/alsa-project/alsa-lib/pull/527
Signed-off-by: Harsh Raj Singhania <raj.harshraut@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoconf: reject absolute include paths containing /../
Harsh Raj Singhania [Wed, 30 Sep 2026 18:57:56 +0000 (00:27 +0530)]
conf: reject absolute include paths containing /../

input_stdio_open() previously opened any absolute path without checking
for path traversal. Reject paths that contain "/../" so a planted config
cannot read arbitrary files.

Closes: https://github.com/alsa-project/alsa-lib/pull/527
Signed-off-by: Harsh Raj Singhania <raj.harshraut@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 months agocontrol: ctlparse - another fix for one-byte overrrun in __snd_ctl_ascii_elem_id_parse
Jaroslav Kysela [Sun, 30 Aug 2026 18:20:30 +0000 (20:20 +0200)]
control: ctlparse - another fix for one-byte overrrun in __snd_ctl_ascii_elem_id_parse

Follows 1e27d63ef6d1dcf7d1f1a1e1eca3ea779e7de377 .

Link: https://lore.kernel.org/alsa-devel/CACBQ=P2FhO3M6dkv3cWuKb6Qhs92ouV+FJ3SJZ_PVBSSdJWRAQ@mail.gmail.com/
Reported-by: Harsh Raj Singhania <raj.harshraut@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoAdd DCO.txt file (Developer Certificate of Origin v1.1)
Jaroslav Kysela [Mon, 3 Aug 2026 09:29:42 +0000 (11:29 +0200)]
Add DCO.txt file (Developer Certificate of Origin v1.1)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoconfigure: bumb version to 1.2.17pre1 (for alsa-utils)
Jaroslav Kysela [Fri, 31 Jul 2026 10:51:24 +0000 (12:51 +0200)]
configure: bumb version to 1.2.17pre1 (for alsa-utils)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agotopology: use snd_config_get_llong() in tplg_get_integer/unsigned()
Jaroslav Kysela [Fri, 31 Jul 2026 09:37:55 +0000 (11:37 +0200)]
topology: use snd_config_get_llong() in tplg_get_integer/unsigned()

Use new function in topology code.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoconf: eval: use snd_config_get_llong() in _to_integer()
Jaroslav Kysela [Fri, 31 Jul 2026 09:30:05 +0000 (11:30 +0200)]
conf: eval: use snd_config_get_llong() in _to_integer()

Use the new function in confeval.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoconf: add snd_config_get_llong() helper
Jaroslav Kysela [Fri, 31 Jul 2026 09:30:00 +0000 (11:30 +0200)]
conf: add snd_config_get_llong() helper

Add an universal function returning integer value that also accepts
string nodes parsed as a number (with specified base).

Use it in ucm_repeat.c's get_integer() helper.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoaserver: add 'gid' config item to set IPC SHM group ID
Jaroslav Kysela [Wed, 29 Jul 2026 09:19:01 +0000 (11:19 +0200)]
aserver: add 'gid' config item to set IPC SHM group ID

The default permissions 0666 are too open. Change default permissions
to 0660 and allow specifying a GID in the server configuration.

The group can be specified as a numeric GID or a group name via a
'gid' item in the server's config block, falling back to the 'audio'
group when not specified.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoconf: fix snd_func_imul accumulator initialization
Bojan Janjatovic [Thu, 7 May 2026 16:46:57 +0000 (18:46 +0200)]
conf: fix snd_func_imul accumulator initialization

snd_func_iops() initialized result to 0 for both iadd and imul. For
imul this made every multiplication step multiply by 0, so
snd_func_imul() returned 0 for every input since it was added in
aa7a0dd7 (2006-10-11). The doxygen example for imul therefore did not
match observed behavior.

Initialize the accumulator to 1 for imul and keep the empty integers
list result as 0. Add table-driven config tests covering iadd and imul
single, multi, zero, negative, empty, and out-of-order integer lists.

Fixes: https://github.com/alsa-project/alsa-lib/issues/456
Closes: https://github.com/alsa-project/alsa-lib/pull/511
Signed-off-by: Bojan Janjatovic <bojan.janjatovic@mamut-studio.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoFix theoretical one-byte buffer overrun
Dirk Müller [Tue, 2 Jun 2026 09:17:31 +0000 (11:17 +0200)]
Fix theoretical one-byte buffer overrun

If 64 (sizeof(buf))= or more characters were provided in the input string,
this unconditionally writes a null byte to `buf[64]`, which is one byte
past the end of the array.

Closes: https://github.com/alsa-project/alsa-lib/pull/509
Signed-off-by: Dirk Müller <dirk@dmllr.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoRelease v1.2.16.1 v1.2.16.1
Jaroslav Kysela [Fri, 12 Jun 2026 12:59:43 +0000 (14:59 +0200)]
Release v1.2.16.1

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoucm: move optional file trace into uc_mgr_config_load_into
Jaroslav Kysela [Fri, 12 Jun 2026 11:55:24 +0000 (13:55 +0200)]
ucm: move optional file trace into uc_mgr_config_load_into

Do not duplicate traces and identify correctly the optional
include in first hit.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoconf: add missing return value check in parse_def()
Jaroslav Kysela [Mon, 8 Jun 2026 12:33:19 +0000 (14:33 +0200)]
conf: add missing return value check in parse_def()

A malformed configuration may cause SIGSEGV.

Link: https://lore.kernel.org/alsa-devel/CAGt8pqBU0p2voB+qHxWGcNJrKHAcBhAyHUUBPLBN-Yj_SiV6MQ@mail.gmail.com/
Reported-by: Luigino Camastra <luigino.camastra@aisle.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoucm: pass optional flag to config load functions to suppress spurious errors
Jaroslav Kysela [Fri, 5 Jun 2026 15:53:43 +0000 (17:53 +0200)]
ucm: pass optional flag to config load functions to suppress spurious errors

Fixes: https://github.com/alsa-project/alsa-lib/issues/510
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 months agoRelease v1.2.16 v1.2.16
Jaroslav Kysela [Mon, 1 Jun 2026 08:04:24 +0000 (10:04 +0200)]
Release v1.2.16

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 months agoconfigure: update to autoconf v2.72
Jaroslav Kysela [Mon, 1 Jun 2026 07:47:44 +0000 (09:47 +0200)]
configure: update to autoconf v2.72

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 months agorawmidi: clarify no_active_sensing doc: output-only, does not filter input
Jaroslav Kysela [Thu, 28 May 2026 10:16:04 +0000 (12:16 +0200)]
rawmidi: clarify no_active_sensing doc: output-only, does not filter input

Fixes: https://github.com/alsa-project/alsa-lib/issues/29
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 months agoerror: use SND_LOG_LAST/SND_ILOG_LAST in log priority/interface bounds checks
Jaroslav Kysela [Thu, 28 May 2026 10:04:46 +0000 (12:04 +0200)]
error: use SND_LOG_LAST/SND_ILOG_LAST in log priority/interface bounds checks

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 months agopcm: fix leading space in snd_pcm_hw_param_dump for mask parameters
Jaroslav Kysela [Thu, 28 May 2026 09:37:05 +0000 (11:37 +0200)]
pcm: fix leading space in snd_pcm_hw_param_dump for mask parameters

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 months agopcm: use new logging for hw_params dump, add pcm_params log interface
Jaroslav Kysela [Thu, 28 May 2026 09:32:25 +0000 (11:32 +0200)]
pcm: use new logging for hw_params dump, add pcm_params log interface

This change was omitted.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 months agogithub: add pr-validation and label-automation workflows
Jaroslav Kysela [Wed, 27 May 2026 14:06:51 +0000 (16:06 +0200)]
github: add pr-validation and label-automation workflows

https://github.com/alsa-project/github-workflows

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 months agopcm: snd_pcm_slave_conf - fix C99 variable-length array allocation
Jaroslav Kysela [Mon, 25 May 2026 10:34:37 +0000 (12:34 +0200)]
pcm: snd_pcm_slave_conf - fix C99 variable-length array allocation

The C standard (C99 Â§6.7.5.2p1) requires VLA bounds to be greater than zero;
a bound of 0 is undefined behavior. Reported by UBSan.

Fixes: https://github.com/alsa-project/alsa-lib/issues/505
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 months agoconf, seq, ucm: fix discards const from pointer target
Rudi Heitbaum [Fri, 20 Feb 2026 11:31:02 +0000 (11:31 +0000)]
conf, seq, ucm: fix discards const from pointer target

Since glibc-2.43:

For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr,
strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers
into their input arrays now have definitions as macros that return a
pointer to a const-qualified type when the input argument is a pointer
to a const-qualified type.

https://lists.gnu.org/archive/html/info-gnu/2026-01/msg00005.html

Closes: https://github.com/alsa-project/alsa-lib/pull/496
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 months agoTopology: Add high and extended rates from Linux 6.12
Seppo Ingalsuo [Wed, 4 Mar 2026 11:10:09 +0000 (13:10 +0200)]
Topology: Add high and extended rates from Linux 6.12

This patch adds to topologies build support for the very high
sample rates 352.8 kHz, 384 kHz, 705,6 kHz, and 768 kHz. The added
extended rates those were introduced in Linux kernel version 6.12
are 12 kHz, 24 kHz, and 128 kHz.

Closes: https://github.com/alsa-project/alsa-lib/pull/497
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6 months agotopology: decoder: fix wrong sizeof for enum control allocation in dapm
Kai Vehmanen [Mon, 23 Mar 2026 15:10:33 +0000 (17:10 +0200)]
topology: decoder: fix wrong sizeof for enum control allocation in dapm

The tplg_calloc() call for enum control in the dapm widget kcontrol
decode loop used sizeof(*mt) (mixer template) instead of sizeof(*et)
(enum template). On 64-bit systems, snd_tplg_mixer_template is 72 bytes
while snd_tplg_enum_template is 80 bytes, causing an 8-byte heap buffer
overflow when the enum fields (texts, values pointers) were written past
the allocated block. This resulted in heap corruption and e.g. glibc
malloc hit an assert.

Closes: https://github.com/alsa-project/alsa-lib/pull/501
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7 months agoucm: add DefineRegex 'all' scheme for multiple pattern matches (Syntax 9)
Jaroslav Kysela [Mon, 4 May 2026 10:51:49 +0000 (12:51 +0200)]
ucm: add DefineRegex 'all' scheme for multiple pattern matches (Syntax 9)

Extend DefineRegex to support two matching schemes:
- "first" (default): matches pattern once, extracts capture groups
- "all": matches pattern multiple times, extracts all matches

The "all" scheme creates variables with naming pattern nameN for Nth
match and nameN_M for Nth match's Mth capture group, enabling
extraction of repeating patterns from strings.

Updated documentation with detailed examples and comprehensive
description of regex flags, schemes, and variable naming conventions.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7 months agoRevert "snd_tlv_convert_to_dB: Fix mute handling for MINMAX_MUTE type"
Jaroslav Kysela [Fri, 1 May 2026 05:39:58 +0000 (07:39 +0200)]
Revert "snd_tlv_convert_to_dB: Fix mute handling for MINMAX_MUTE type"

This reverts commit 41039b49ad3e20506134864028c77aeaba4c0d51.

SND_CTL_TLVT_DB_MINMAX_MUTE means that the hardware is muted on lowest
hardware volume value (not on lowest dB value).

Analysis:

Range:  min=0, max=7248
dB:     min=-2837, max=-6
dB span: 2831 centibels (28.31 dB)

Volume | After revert/origin | PR#478 behavior
-------|---------------------|----------------------
     0 |  MUTE               | MUTE
     1 |  -2837 (-28.37 dB)  | MUTE <- DIFFERS!
     2 |  -2837 (-28.37 dB)  | MUTE <- DIFFERS!
     5 |  -2836 (-28.36 dB)  |  -2836 (-28.36 dB)
    10 |  -2834 (-28.34 dB)  |  -2834 (-28.34 dB)
    50 |  -2818 (-28.18 dB)  |  -2818 (-28.18 dB)

Range:  min=0, max=999
dB:     min=0, max=390
dB span: 390 centibels (3.90 dB)

Volume | After revert/origin | PR#478 behavior
-------|---------------------|----------------------
     0 | MUTE                | MUTE
     1 |      0 (0.00 dB)    | MUTE <- DIFFERS!
     2 |      0 (0.00 dB)    | MUTE <- DIFFERS!
     5 |      1 (0.01 dB)    |      1 (0.01 dB)
    10 |      3 (0.03 dB)    |      3 (0.03 dB)
    50 |     19 (0.19 dB)    |     19 (0.19 dB)

Fixes: https://github.com/alsa-project/alsa-lib/issues/504
Link: https://github.com/alsa-project/alsa-lib/pull/478
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
8 months agoucm: fix optional include
Huang Yunxuan [Wed, 18 Mar 2026 14:36:24 +0000 (22:36 +0800)]
ucm: fix optional include

The path is not an absolute path and can't be used with `access()`.
Let's call `uc_mgr_config_load_file()` directly and mask acceptable
error numbers.

Closes: https://github.com/alsa-project/alsa-lib/pull/499
Signed-off-by: Huang Yunxuan <hyx0329@outlook.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agoucm: add show_err parameter to uc_mgr_get_variable
Jaroslav Kysela [Wed, 18 Feb 2026 12:23:26 +0000 (13:23 +0100)]
ucm: add show_err parameter to uc_mgr_get_variable

Add bool show_err parameter to uc_mgr_get_variable() to control whether
an error message is displayed when a variable is not defined. This
centralizes error reporting and eliminates redundant error messages
in callers.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agoucm: find-card,find-device - add UCM variable support for arguments (Syntax 9)
Jaroslav Kysela [Wed, 18 Feb 2026 11:13:15 +0000 (12:13 +0100)]
ucm: find-card,find-device - add UCM variable support for arguments (Syntax 9)

Add variable support for all lookup arguments in find-card and find-device
substitutions. Variables are identified by $ prefix and only enabled for
Syntax 9+ to maintain backward compatibility.

Modified arguments with variable support:
- find-card: field, regex
- find-device: type, field, stream, regex

Example usage:
  ${find-card:field=$FieldName,regex=$Pattern,return=number}
  ${find-device:type=$DevType,stream=$StreamType,field=$FieldName,regex=$Pattern}

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agoucm: add info-card substitution (Syntax 9)
Jaroslav Kysela [Mon, 9 Feb 2026 15:02:01 +0000 (16:02 +0100)]
ucm: add info-card substitution (Syntax 9)

Implement ${info-card:} substitution to retrieve specific fields from
a card's information structure by card number or ID. Unlike ${find-card:}
which searches through cards using regex, ${info-card:} directly queries
a specific card.

Arguments:
  card=<STR>   card number or card ID (string identifier)
  field=<STR>  number, id, driver, name, longname, mixername, components

Allow card and field parameters to reference UCM variables by prefixing
with $ character. When the first character is $, the value is resolved
using uc_mgr_get_variable().

Example usage:
  ${info-card:card=$MyCard,field=$MyField}

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agocontrol: remap - fix memory leak in remap_load_list()
Jaroslav Kysela [Thu, 12 Feb 2026 10:15:55 +0000 (11:15 +0100)]
control: remap - fix memory leak in remap_load_list()

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agoucm: evaluate Repeat block before If block (Syntax 9)
Jaroslav Kysela [Fri, 6 Feb 2026 17:59:30 +0000 (18:59 +0100)]
ucm: evaluate Repeat block before If block (Syntax 9)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agoucm: allow string with substitution for If.Condition block (Syntax 9)
Jaroslav Kysela [Fri, 6 Feb 2026 17:41:30 +0000 (18:41 +0100)]
ucm: allow string with substitution for If.Condition block (Syntax 9)

When If.Condition is a string type instead of compound, parse it using
snd_config_load_string with variable substitution support for syntax v9+.
This allows more flexible condition definitions using variable references.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agoucm: optimize if_eval_string with common comparison helper
Jaroslav Kysela [Fri, 6 Feb 2026 17:25:01 +0000 (18:25 +0100)]
ucm: optimize if_eval_string with common comparison helper

Refactor if_eval_string() to eliminate code duplication by introducing
a compare_strings() helper function that handles the common pattern of
retrieving, substituting, and comparing string pairs.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agoucm: add Repeat block - repetitive pattern substitution (Syntax 9)
Jaroslav Kysela [Fri, 6 Feb 2026 12:43:11 +0000 (13:43 +0100)]
ucm: add Repeat block - repetitive pattern substitution (Syntax 9)

Implements Repeat blocks for generating repetitive configuration patterns
with variable substitution. This feature allows applying a configuration
block multiple times with different variable values, significantly reducing
duplication in UCM configuration files.

iterator abstraction allows easy extension for future pattern types.

Example:

  Repeat.VolumeInit {
    Pattern {
      Variable 'ch'
      Type Integer
      First 0
      Last 7
      Step 1
    }
    Apply {
      cset "name='PCM Channel ${var:ch} Volume' 100%"
    }
  }

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agoucm: add integer comparison condition (Syntax 9)
Jaroslav Kysela [Fri, 6 Feb 2026 11:57:02 +0000 (12:57 +0100)]
ucm: add integer comparison condition (Syntax 9)

Adds support for integer comparison operations in If.Condition blocks.
Supports operators: ==, !=, <, >, <=, >= for comparing integer values.
Both values are substituted and converted from strings to 64-bit integers.
Hexadecimal (C like) strings are also accepted (like 0x1234).

Example usage:
  If.check_channels {
    Condition {
      Type Integer
      Operation ">"
      Value1 "${var:channels}"
      Value2 "2"
    }
    True { ... }
  }

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agoucm: substitute define IDs and macro arguments (Syntax 9)
Jaroslav Kysela [Thu, 5 Feb 2026 16:33:07 +0000 (17:33 +0100)]
ucm: substitute define IDs and macro arguments (Syntax 9)

It is useful to substitute the variable names and string
macro arguments. It may simplify the UCM configurations.

E.g.:

  Define."${var:Name} Suffix" "Value"
  Macro.a.DoIt "Channels=${var:PlaybackChannels}"

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agoucm: fix invalid pointer dereference in parse_open_variables()
Jaroslav Kysela [Wed, 4 Feb 2026 17:43:57 +0000 (18:43 +0100)]
ucm: fix invalid pointer dereference in parse_open_variables()

When the string with variables is not parseable, do not
try to free invalid cfg pointer.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agocontrol: remap - cosmetic code reorganization
Jaroslav Kysela [Wed, 4 Feb 2026 17:42:56 +0000 (18:42 +0100)]
control: remap - cosmetic code reorganization

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 months agocontrol: remap - fix numid lookup issue
Jaroslav Kysela [Tue, 3 Feb 2026 16:46:02 +0000 (17:46 +0100)]
control: remap - fix numid lookup issue

The 'amixer controls' and 'amixer cget numid=' combo was not working
correctly when the remapping was active. This assert was trigerred:

amixer: control.c:427: snd_ctl_elem_info: Assertion `ctl && info && (info->id.name[0] || info->id.numid)' failed

All elements must be loaded and mapping created to build
the numid -> fullid link.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 months agotopology: decoder - add boundary check for channel mixer count
Jaroslav Kysela [Thu, 29 Jan 2026 15:51:09 +0000 (16:51 +0100)]
topology: decoder - add boundary check for channel mixer count

Malicious binary topology file may cause heap corruption.

CVE: CVE-2026-25068

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 months agocontrol: ctlparse - make numid parsing more robust
Jaroslav Kysela [Thu, 29 Jan 2026 14:33:45 +0000 (15:33 +0100)]
control: ctlparse - make numid parsing more robust

Also correct the last amixer stderr printf to snd_error().

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 months agoucm: libconfig parser - fix pathname for substituted file
Jaroslav Kysela [Mon, 26 Jan 2026 14:08:54 +0000 (15:08 +0100)]
ucm: libconfig parser - fix pathname for substituted file

The path name substituted file contents and normal file contents
should be handled similary. Use correct function determining
the right base directory name.

Fixes: 8f5779eb ("ucm: add LibraryConfig support")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 months agoRelease v1.2.15.3 v1.2.15.3
Jaroslav Kysela [Tue, 13 Jan 2026 07:12:40 +0000 (08:12 +0100)]
Release v1.2.15.3

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 months agoseq: return back old snd_seq_drain_output behaviour for -EAGAIN
Jaroslav Kysela [Tue, 13 Jan 2026 07:09:47 +0000 (08:09 +0100)]
seq: return back old snd_seq_drain_output behaviour for -EAGAIN

It seems that many applications did not follow the documentation
including pyalsa sequencer module, thus return the previous
behaviour and correct documentation.

Closes: https://github.com/alsa-project/alsa-lib/issues/493
Fixes: b97a11ec ("seq: fix snd_seq_drain_output return value for partial drain")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 months agoRelease v1.2.15.2 v1.2.15.2
Jaroslav Kysela [Thu, 8 Jan 2026 14:27:57 +0000 (15:27 +0100)]
Release v1.2.15.2

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 months agoMakefile: remove dist-hook and remove tar option 'follow symlinks'
Jaroslav Kysela [Thu, 8 Jan 2026 13:49:58 +0000 (14:49 +0100)]
Makefile: remove dist-hook and remove tar option 'follow symlinks'

The dist-hook is not required for latest automake. It was
introduced in 2000, so the things were hopefully fixed now.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 months agoucm: add some traces for the config filenames
Jaroslav Kysela [Thu, 8 Jan 2026 12:56:48 +0000 (13:56 +0100)]
ucm: add some traces for the config filenames

It is handy to see the path names in the loading chain.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 months agoerror: fix the "return old snd_lib_error_set_handler() behaviour"
Jaroslav Kysela [Thu, 8 Jan 2026 12:19:34 +0000 (13:19 +0100)]
error: fix the "return old snd_lib_error_set_handler() behaviour"

The variable arguments must be handled differently. Add a conversion
routine which use the original argument call convention.

Fixes: f55eece8 ("error: return old snd_lib_error_set_handler() behaviour")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 months agoerror: fix indendation in snd_lib_log_filter()
Jaroslav Kysela [Wed, 7 Jan 2026 16:45:24 +0000 (17:45 +0100)]
error: fix indendation in snd_lib_log_filter()

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 months agoerror: return old snd_lib_error_set_handler() behaviour
Jaroslav Kysela [Wed, 7 Jan 2026 16:41:03 +0000 (17:41 +0100)]
error: return old snd_lib_error_set_handler() behaviour

Unfortunately, the case when the old application sets
own error callback using the old method, was not handled
properly in snd_lib_vlog_default() function.

Make sure that only error messages are passed to this
old callback and silent other log priorities.

Link: https://bugs.gentoo.org/968131
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoRelease v1.2.15.1 reltest v1.2.15.1
Jaroslav Kysela [Fri, 19 Dec 2025 10:31:58 +0000 (11:31 +0100)]
Release v1.2.15.1

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: cards: unify whitespace - use tabs and remove trailing spaces
Jaroslav Kysela [Wed, 10 Dec 2025 15:44:12 +0000 (16:44 +0100)]
conf: cards: unify whitespace - use tabs and remove trailing spaces

Convert leading spaces to tabs for consistent indentation,
remove trailing whitespace from all lines, and normalize
file endings across all card configuration files.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: pistachio-card: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:25:34 +0000 (16:25 +0100)]
conf: pistachio-card: define pcm configuration block only one time

There may be multiple pistachio-card soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: YMF744: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:18:22 +0000 (16:18 +0100)]
conf: YMF744: define pcm configuration block only one time

There may be multiple YMF744 soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: VX222,VXPocket: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:18:22 +0000 (16:18 +0100)]
conf: VX222,VXPocket: define pcm configuration block only one time

There may be multiple VX soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: VIA686A,VIA82xx: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:18:22 +0000 (16:18 +0100)]
conf: VIA686A,VIA82xx: define pcm configuration block only one time

There may be multiple VIA soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: TRID4DWAVENX: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:18:15 +0000 (16:18 +0100)]
conf: TRID4DWAVENX: define pcm configuration block only one time

There may be multiple TRID4DWAVENX soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: SI7018: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:18:15 +0000 (16:18 +0100)]
conf: SI7018: define pcm configuration block only one time

There may be multiple SI7018 soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: SB-XFi: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:18:15 +0000 (16:18 +0100)]
conf: SB-XFi: define pcm configuration block only one time

There may be multiple SB-XFi soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: RME96[35][26]: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:18:15 +0000 (16:18 +0100)]
conf: RME96[35][26]: define pcm configuration block only one time

There may be multiple RME96[35][26] soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: PS3: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:18:06 +0000 (16:18 +0100)]
conf: PS3: define pcm configuration block only one time

There may be multiple PS3 soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: PMac,PMacToonie: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:18:06 +0000 (16:18 +0100)]
conf: PMac,PMacToonie: define pcm configuration block only one time

There may be multiple PMac soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: PC-Speaker: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:18:06 +0000 (16:18 +0100)]
conf: PC-Speaker: define pcm configuration block only one time

There may be multiple PC-Speaker soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: NFORCE: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:18:06 +0000 (16:18 +0100)]
conf: NFORCE: define pcm configuration block only one time

There may be multiple NFORCE soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: Maestro3: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:17:57 +0000 (16:17 +0100)]
conf: Maestro3: define pcm configuration block only one time

There may be multiple Maestro3 soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: Loopback: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:17:57 +0000 (16:17 +0100)]
conf: Loopback: define pcm configuration block only one time

There may be multiple Loopback soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: ICH,ICH4,ICH-MODEM: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:17:57 +0000 (16:17 +0100)]
conf: ICH,ICH4,ICH-MODEM: define pcm configuration block only one time

There may be multiple ICH soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: ICE17[12][24]: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:17:57 +0000 (16:17 +0100)]
conf: ICE17[12][24]: define pcm configuration block only one time

There may be multiple ICE17[12][24] soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 months agoconf: HdmiLpeAudio: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:17:47 +0000 (16:17 +0100)]
conf: HdmiLpeAudio: define pcm configuration block only one time

There may be multiple HdmiLpeAudio soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>