]> git.alsa-project.org Git - alsa-lib.git/log
alsa-lib.git
5 weeks agoucm: fix optional include HEAD master
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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 months agoconf: GUS: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 15:17:47 +0000 (16:17 +0100)]
conf: GUS: define pcm configuration block only one time

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

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

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

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

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

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

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

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

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

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

There may be multiple ENS137[01] soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

There may be multiple AU88[123]0 soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

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

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

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

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

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

There may be multiple AACI,ATIIXP soundcards in the system. Overwrite
the PCM configurations when loaded multiple times.

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

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

BugLink: https://github.com/alsa-project/alsa-lib/issues/488
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoconf: HDA-Intel: define pcm configuration block only one time
Jaroslav Kysela [Wed, 10 Dec 2025 11:12:47 +0000 (12:12 +0100)]
conf: HDA-Intel: define pcm configuration block only one time

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

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

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

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoRevert "conf: fix load_for_all_cards() - do not merge the card specific contents"
Jaroslav Kysela [Wed, 10 Dec 2025 11:03:29 +0000 (12:03 +0100)]
Revert "conf: fix load_for_all_cards() - do not merge the card specific contents"

This reverts commit eda76146c5653ff1d5bc4b4c53f7a2d5ccc17da2.

Also, revert additional related commits:

  Revert "conf: fix possible memory leak in config_file_open() - error path"
  This reverts commit 2f59398c83b8065fb9ff58939df3a9187746068e.

  Revert "conf: merge card specific contents per file (whole) after parsing"
  This reverts commit a6238053c4fa518b214f99d91a01b96c5ef6e3ca.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoconf: fix possible memory leak in config_file_open() - error path
Jaroslav Kysela [Tue, 9 Dec 2025 17:39:52 +0000 (18:39 +0100)]
conf: fix possible memory leak in config_file_open() - error path

Fixes: a6238053 ("conf: merge card specific contents per file (whole) after parsing")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoconf: merge card specific contents per file (whole) after parsing
Jaroslav Kysela [Tue, 9 Dec 2025 17:04:07 +0000 (18:04 +0100)]
conf: merge card specific contents per file (whole) after parsing

Unfortunately, mentioned fix caused a regression for items stored in one file.
Merge the file contents after parsing not inside parsing process.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=2420645
Fixes: eda76146 ("conf: fix load_for_all_cards() - do not merge the card specific contents")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoucm: exec - fix maxfd used warning
Jaroslav Kysela [Tue, 9 Dec 2025 16:48:34 +0000 (17:48 +0100)]
ucm: exec - fix maxfd used warning

Fixes: a068cf08 ("ucm: use closefrom instead of close_range")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoucm: use closefrom instead of close_range
Mike Gilbert [Tue, 9 Dec 2025 04:46:17 +0000 (23:46 -0500)]
ucm: use closefrom instead of close_range

closefrom is a library function with a fallback mechanism for when the
kernel does not support the close_range syscall.

Also check for the function properly instead of assuming it is available
with _GNU_SOURCE defined.

Closes: https://github.com/alsa-project/alsa-lib/pull/486
Fixes: https://github.com/alsa-project/alsa-lib/issues/485
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoRelease v1.2.15 v1.2.15
Jaroslav Kysela [Sun, 7 Dec 2025 19:41:56 +0000 (20:41 +0100)]
Release v1.2.15

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoinclude: fix typo in error.h to avoid compile error when gcc <= 2.95
SimonQian [Wed, 19 Nov 2025 06:46:45 +0000 (14:46 +0800)]
include: fix typo in error.h to avoid compile error when gcc <= 2.95

Closes: https://github.com/alsa-project/alsa-lib/pull/483
Signed-off-by: SimonQian <vsfos@qq.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoucm: add ValueGlobals section to the top configuration file
Jaroslav Kysela [Mon, 1 Dec 2025 15:39:15 +0000 (16:39 +0100)]
ucm: add ValueGlobals section to the top configuration file

BootCardGroup and BootCardSyncTime variables should not be listed
by default in _identifiers. Handle them differently using
ValueGlobals section.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoucm: fix the DefineRegex issue where multiple variables were set to empty string
Jaroslav Kysela [Tue, 2 Dec 2025 09:59:19 +0000 (10:59 +0100)]
ucm: fix the DefineRegex issue where multiple variables were set to empty string

It is not required to set variables in undefined groups to empty string.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoucm: Include directive - add optional behaviour
Jaroslav Kysela [Tue, 2 Dec 2025 09:08:58 +0000 (10:08 +0100)]
ucm: Include directive - add optional behaviour

It may be useful to skip the include when the file does not exist
(make it optional).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoucm: complete dependency graphs for conflicting/supported device lists
Jaroslav Kysela [Mon, 1 Dec 2025 14:56:56 +0000 (15:56 +0100)]
ucm: complete dependency graphs for conflicting/supported device lists

Modify verb_dev_list_check() to ensure all devices in a conflicting or
supported group reference each other. Previously, the function only
ensured bidirectional relationships. Now it ensures all devices in
the same group have complete dependency lists.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoucm: implement DeviceVariant configuration extension
Jaroslav Kysela [Thu, 20 Nov 2025 15:11:32 +0000 (16:11 +0100)]
ucm: implement DeviceVariant configuration extension

It may be useful for the channel count specification for example.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoucm: implement ValueDefaults.BootCardGroup and define use
Jaroslav Kysela [Mon, 1 Dec 2025 12:32:10 +0000 (13:32 +0100)]
ucm: implement ValueDefaults.BootCardGroup and define use

We need a boot synchronization for multiple UCM cards where linking
is expected like AMD ACP or Intel AVS drivers. This method is
using a timestamp file which can be created and modified during
the boot process (e.g. from the alsactl tool).

The goal is to return a valid UCM configuration for standard
applications combining multiple ALSA cards into one UCM configuration
and cover the time window when all cards have not been probed yet.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoucm: keep original device name for logs
Jaroslav Kysela [Tue, 18 Nov 2025 13:55:25 +0000 (14:55 +0100)]
ucm: keep original device name for logs

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 months agoucm: sort devices by priority
Jaroslav Kysela [Tue, 18 Nov 2025 13:23:18 +0000 (14:23 +0100)]
ucm: sort devices by priority

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoinclude: list.h - add list_splice() and list_splice_init() functions
Jaroslav Kysela [Tue, 18 Nov 2025 13:37:45 +0000 (14:37 +0100)]
include: list.h - add list_splice() and list_splice_init() functions

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoucm: doc - add examples for device name with descriptors (colon)
Jaroslav Kysela [Tue, 18 Nov 2025 13:01:29 +0000 (14:01 +0100)]
ucm: doc - add examples for device name with descriptors (colon)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoucm: be more restrictive for device name with descriptor
Jaroslav Kysela [Tue, 18 Nov 2025 13:00:48 +0000 (14:00 +0100)]
ucm: be more restrictive for device name with descriptor

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoucm: strip device index when the device type is present only one time
Jaroslav Kysela [Tue, 18 Nov 2025 12:35:06 +0000 (13:35 +0100)]
ucm: strip device index when the device type is present only one time

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoucm: add support for device names with colon (':')
Jaroslav Kysela [Tue, 18 Nov 2025 12:13:20 +0000 (13:13 +0100)]
ucm: add support for device names with colon (':')

The colon identifier means to automatically assign
a device index for this device.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoucm: normalize device names
Jaroslav Kysela [Tue, 18 Nov 2025 09:41:06 +0000 (10:41 +0100)]
ucm: normalize device names

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoucm: add possibility to inline Verb configurations to the main configuration file
Jaroslav Kysela [Mon, 17 Nov 2025 17:36:32 +0000 (18:36 +0100)]
ucm: add possibility to inline Verb configurations to the main configuration file

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoucm: add Prepend and Append block handling for If conditions (syntax 8+)
Jaroslav Kysela [Mon, 17 Nov 2025 17:00:59 +0000 (18:00 +0100)]
ucm: add Prepend and Append block handling for If conditions (syntax 8+)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agogithub: add coverity.yml
Jaroslav Kysela [Mon, 10 Nov 2025 09:18:22 +0000 (10:18 +0100)]
github: add coverity.yml

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agocoverity.com fixes - initial round
Jaroslav Kysela [Mon, 10 Nov 2025 16:56:27 +0000 (17:56 +0100)]
coverity.com fixes - initial round

This commit tries to fix a bunch of issues found
by coverity.com.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agomixer: abst - reshuffle snd_mixer_simple_basic_register code to be more logical
Jaroslav Kysela [Wed, 12 Nov 2025 09:20:21 +0000 (10:20 +0100)]
mixer: abst - reshuffle snd_mixer_simple_basic_register code to be more logical

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoseq: fix snd_seq_drain_output return value for partial drain
Jaroslav Kysela [Tue, 11 Nov 2025 15:17:16 +0000 (16:17 +0100)]
seq: fix snd_seq_drain_output return value for partial drain

The processed value was not properly updated thus the partial
flush was not notified properly.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoseq: hw - notify if running mode / pversion ioctl fails
Jaroslav Kysela [Tue, 11 Nov 2025 15:10:59 +0000 (16:10 +0100)]
seq: hw - notify if running mode / pversion ioctl fails

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agopcm: plugin - avoid 32-bit to 64-bit return value conversions
Jaroslav Kysela [Tue, 11 Nov 2025 17:33:41 +0000 (18:33 +0100)]
pcm: plugin - avoid 32-bit to 64-bit return value conversions

Several functions were affected. Simplify code without
any functionality change.

Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
5 months agoadd missing return value changes for snd_config_get_string() calls
Jaroslav Kysela [Tue, 11 Nov 2025 15:40:36 +0000 (16:40 +0100)]
add missing return value changes for snd_config_get_string() calls

Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
5 months agoadd missing return value changes for snd_config_get_id() calls
Jaroslav Kysela [Tue, 11 Nov 2025 15:01:17 +0000 (16:01 +0100)]
add missing return value changes for snd_config_get_id() calls

Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
5 months agosnd_tlv_convert_to_dB: Fix mute handling for MINMAX_MUTE type
qaqland [Mon, 15 Sep 2025 06:01:18 +0000 (14:01 +0800)]
snd_tlv_convert_to_dB: Fix mute handling for MINMAX_MUTE type

Ensure the SND_CTL_TLV_DB_GAIN_MUTE value is returned when the calculated
gain equals the minimum dB value for the SNDRV_CTL_TLVT_DB_MINMAX_MUTE type.
The previous check based solely on the volume value could miss cases where
the linear calculation resulted in the minimum gain.

Closes: https://github.com/alsa-project/alsa-lib/pull/478
Signed-off-by: qaqland <anguoli@uniontech.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agodoc: add missing include pcm_plugin.h to source files
Jaroslav Kysela [Fri, 7 Nov 2025 20:52:31 +0000 (21:52 +0100)]
doc: add missing include pcm_plugin.h to source files

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoucm: add missing stdbool.h include to ucm_local.h
Jaroslav Kysela [Fri, 7 Nov 2025 20:51:43 +0000 (21:51 +0100)]
ucm: add missing stdbool.h include to ucm_local.h

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agodoxygen: fix warnings and add missing ALSA_LIBRARY_BUILD define
Jaroslav Kysela [Fri, 7 Nov 2025 20:30:32 +0000 (21:30 +0100)]
doxygen: fix warnings and add missing ALSA_LIBRARY_BUILD define

BugLink: https://github.com/alsa-project/alsa-lib/pull/480
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
5 months agoconf/pistachio: fix syntax
Olivier Blin [Fri, 1 Aug 2025 16:02:57 +0000 (18:02 +0200)]
conf/pistachio: fix syntax

It was missing closing brackets since its introduction.

Closes: https://github.com/alsa-project/alsa-lib/pull/470
Fixes: 4dfa8f08fb83 ("conf/cards: add support for pistachio-card.")
Signed-off-by: Olivier Blin <olivier.blin@softathome.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>