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.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>