Detailed changes v1.2.6.3 v1.2.7

From AlsaProject
Revision as of 18:49, 31 May 2022 by Perex (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Detailed changelog between 1.2.6.1 and 1.2.7 releases

Changelog between 1.2.6.3 and 1.2.7 releases

alsa-lib

Core

- Release v1.2.7 - configure: remove --with-lfs option, but keep the autodetection code - configure: add --with-lfs option

We are forcibly use the LFS (64-bit) calls in the source now. Add a new
check to the configure script and use compatibility defines when those
calls are not available for a reason.

- gitcompile: fix 32 bit compilation support - remove .travis.yml (using github actions) - github actions: move to checkout@v3 - conf: fix the export of safe_strto* functions from libasound

Only one library should define the safe_strto function. Export it
correctly and add _snd_ prefix to avoid possible clashes with the other
application code.

Config API

- ucm: add ${evali:} substitution

Example:

  Define.var1 2

  LibraryConfig.test.SubstiConfig {
          a "${evali:$var1+1}"
  }

Control API

- control: eld - add missing ctype.h header inclusion - control: shm - initialize write buffer

  ccontrol_shm.c: In function ‘snd_ctl_shm_action’:
  control_shm.c:54:23: error: invalid initializer
     54 |         char buf[1] = 0;
        |                       ^

- control: decode HDMI device name from ELD

The HDMI drivers set an uniform PCM names. Use ELD (EDID) to obtain
the HDMI device name and send this string to applications for a better
user experience.

Example (aplay -l):

  card 1: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
    Subdevices: 1/1

  vs improved:

  card 1: PCH [HDA Intel PCH], device 8: HDMI 2 [Philips 272P4]
    Subdevices: 1/1

PCM API

- pcm: hw: change rate range syntax

Allow three configuration types:

  rate 48000                    # single rate
  rate [ 48000 ]                # single rate (2nd)
  rate [ 44100 48000 ]          # range

- pcm: hw: add "min_rate" and "max_rate" as alternatives to single "rate" parameter - pcm: rate - rewrite the may_wait_for_avail_min callback for the rate plugin

Shuffle the code to avoid special conditions using the plugin type
in the generic plugin code. The rate plugin has the own
may_wait_for_avail_min callback implementation now.

- pcm: plugin - fix avail_min calculation on rate plugin

commit 88e4ae27, ff1f669d introduced a dynamic recalculation of the slave's
avail_min value.
The calculated avail_min setting did not take into account, that the avail_min value
depends on the used sampling rate and must be adapted accordingly
if the slave is using a different sampling rate.
That leads to too large/too small calculated avail_min settings and inaccurate
period wake-up events if a rate converter plugin is used.

This patch is adapting the avail_min calculation to consider a different
sampling rate between actual pcm and it's slave.

- pcm: dmix: fix wrong scaling in 32bits pcm mixing

Generic mixing function for 32bits pcm has used 8bits right shift for
pre-scaling. But this is generating wrong result if pcm data is
negative value because return value type of bswap_32() is unsigned int.

This patch adds type cast bswap_32() result to signed int.

- pcm: ladspa - Use LFS calls (readdir64)

Continue the work in commit ba86ac55 ("conf: Use LFS calls when reading
config files") and fix the PCM LADSPA code, too.

- pcm: fix for the unitialized write buffer - control: decode HDMI device name from ELD

The HDMI drivers set an uniform PCM names. Use ELD (EDID) to obtain
the HDMI device name and send this string to applications for a better
user experience.

Example (aplay -l):

  card 1: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
    Subdevices: 1/1

  vs improved:

  card 1: PCH [HDA Intel PCH], device 8: HDMI 2 [Philips 272P4]
    Subdevices: 1/1

- pcm: multi: return correct hwptr and avail from snd_pcm_multi_status()

Ensure the logic of snd_pcm_multi_status() is consistent with
snd_pcm_multi_avail_update().

- pcm: direct - allow 'off' string for hw_ptr_alignment - pcm: direct - cleanups for snd_pcm_direct_reset_slave_ptr()

- improve readability
- pass slave hw_ptr as argument - improves the code flow

- pcm: direct - add support for channel bindings in snd_pcm_direct_query_chmaps() - pcm: direct: Check xrun/suspend before the slave hwptr update

The xrun/suspend may happen at any time and we should check it right
after the slave hwptr update (but before the actual sync_ptr update in
direct pcm side).  Otherwise the hwptr value may be screwed and get
unexpected large read/write.

- pcm: direct: Move slave PCM state checks into XRUN check helper

The check of slave PCM state is always done before the client's
recoveries count check, so let's merge them to the common helper.
Also rename the helper function to snd_pcm_direct_check_xrun() as it's
checking both slave and client states now.

- pcm: direct: Improved suspend/resume support

The current resume handling in PCM direct plugins don't treat multiple
clients properly: once after the slave PCM gets resumed by one
client, the access from others at a later point is seen as already
running although the internal state isn't updated and becomes
inconsistent.  This may end up a negative size, which eventually hangs
up.

This patch is an attempt to improve the handling for resume.  Now the
suspended state is treated similarly like XRUN; namely, we keep the
slave PCM "recoveries" count that is modified at each time the slave
PCM XRUN happens, so that we can check the inconsistency against the
client's state.  As a differentiation to XRUN, we set the highest bit
of recoveries count when the slave stream hits SUSPENDED state.  This
bit is referred at comparing with clients, and the client's state is
updated to either XRUN or SUSPENDED depending on this bit.

Along with this change, the actual resume is done in
snd_pcm_direct_slave_recover(), and snd_pcm_direct_resume() rather
calls this internally.

- pcm: direct: Propagate error code from snd_pcm_direct_client_chk_xrun()

Change the snd_pcm_direct_client_chk_xrun() function to return the
current XRUN state via an error code instead of the state change.
This allows the caller more straightforwardly returning its error, and
also covers the case where XRUN has been set but the function gets
called twice.

- pcm: rate: fix drain of partial period at end of buffer

In the case that:
* the buffer size is not an integer multiple of the period size, and
* drain must flush a partial period located before the end of the buffer
  but without a full period available, where
* these conditions may pertain to the source or slave pcm buffer, and
* because rate conversion is always done on a full period,
it is necessary to check that both a full source period is available
before source pcm buffer wrap and a full slave period is available
before slave pcm buffer wrap in order to use the simple, single-commit
implementation in snd_pcm_rate_commit_area().

The alternative fix would be to change snd_pcm_rate_write_areas1() to
take size and slave_size parameters. This would be more disruptive to
the code base, tricky to get right, and is unnecessary given that
snd_pcm_mmap_commit() only commits the partial period of actually valid
converted samples.

Topology API

- src/topology/parser.c: drop duplicate safe_strtol_base

The safe_strtol_base() function is defined twice since
        f547b2e3 ("conf: introduce safe_strtol_base()") and
        5fab157a ("topology: do not call strtol directly")
resulting in the following build failure when alsa-utils is built
statically because safe_strtol_base is defined twice.

Use Case Manager API

- ucm: fix the reload call (snd_use_case_mgr_reload)

Handle the local configuration and macros trees properly.

- ucm: implement disdevall sequence command

It is useful to run all disable sequences for all
UCM devices in a verb to ensure the valid, expected
initial state.

- use-case.h: add Channels/ChannelPos values to the documentation

We have use cases, where the channel split is required. We
can use alsa-lib plugins for this job, but some sound servers
or applications may want to do the split themselves.

- ucm: fix memory leak in the error path (Include)

The included configuration tree must be freed
in the error path, too.

- ucm: Use LFS calls (stat, scandir)

Continue the work in commit ba86ac55 ("conf: Use LFS calls when reading
config files") and fix the UCM code, too.

- ucm: main - fix the compilation error (signess) - ucm: macro - make argument names shorter

It seems that the use the macro name as the variable prefix is too large.
Use just two underscores as prefix for the macro arguments to make
macro definitions more readable.

- ucm: doc - describe variants, minor corrections - ucm: implement enadev2 and disdev2 sequence commands

It may be useful to call the sequences from devices from
the verb sequences or another device sequences.

- ucm: add support for verb variants

The bellow configuration example creates two verbs ("HiFi" and "HiFi 7+1")
with different playback channels for the "Speaker" device.

        SectionUseCase."HiFi" {
                File "HiFi.conf"
                Variant."HiFi" {
                        Comment "Default"
                }
                Variant."HiFi 7+1" {
                        Comment "HiFi 7.1"
                }
        }

        SectionDevice."Speaker" {
                Value {
                        PlaybackChannels 2
                }
                Variant."HiFi 7+1".Value {
                        PlaybackChannels 8
                }
        }

- ucm: set SYNTAX_VERSION_MAX to 6 - ucm: move macros and evali substitution to Syntax 6

There should be printed an error when the new configuration
blocks are used with the older alsa-lib.

- ucm: macro - add deep call protection (recursion) - ucm: macro call inplace evaluate inside macro - ucm: macro - fix the error message, print id - ucm: return empty string for undefined "open" variables (arguments) - ucm: allow '-' prefix to avoid errors when the variable is not defined

It may be useful to check if variable is not defined.

- ucm: allow passing variables through ucm open string

It is useful to pass information like application capabilities
to the UCM configuration parser. Those variables are prefixed
with '@' for the configuration files.

An example:

   "<<<v1='a b c',x=12>>>hw:1"

Variables can substituted in the configuration:

   "${var:@v1}" -> "a b c"
   "${var:@x}" -> 12

- use-case.h: add SND_USE_CASE_DEV_DIRECT define

It may be useful to define the devices without channel remapping
(e.g. ProAudio devices).

- ucm: implement MacroDefine and Macro subtree evaluation

The arguments are set as temporary variables as /MACRO_NAME/_/ARGUMENT_NAME/.

Example:

  # define new macro MyMacro with arguments ctl_name and ctl_value
  DefineMacro.MyMacro {
    BootSequence [
      cset "name='${var:MyMacro_ctl_name}' ${var:MyMacro_ctl_value}"
    ]
  }

  # instantiate macro for Speaker control (short version)
  Macro.headphone.MyMacro "ctl_name='Speaker Switch',ctl_value=off"

  # instantiate macro for Mic control (second version)
  Macro.mic.MyMacro {
        ctl_name "Mic Switch"
        ctl_value "off"
  }

- ucm: local_config may be NULL (error path) - ucm: add ${evali:} substitution

Example:

  Define.var1 2

  LibraryConfig.test.SubstiConfig {
          a "${evali:$var1+1}"
  }

- ucm: fix the '${eval:EXPR}' substitution

There was already a variable substitution. Skip it for the eval: case.

- ucm: top-level path - set directory from symlink

It is useful to read the top-level symlink and set the configuration
directory according this symlink for the relative paths.

ALSA Server

- pcm: fix for the unitialized write buffer

Configuration

- conf: Use LFS calls when reading config files

Although at first glance it doesn't seem useful to support config
files larger than 2GB, LFS also influences inode size. Without this,
32-bit libasound may be unable to read config files on filesystems
with 64-bit inodes, such as Btrfs or NFS.

- conf: vc4-hdmi: use a proper hdmi pcm, fix broken default pcm

Userspace expects to see a HDMI pcm, so remove the somewhat broken
front and iec958 pcms and add a proper hdmi pcm instead.

The hdmi pcm supports HD/HBR audio passthrough and relays the IEC958
status bits on to the kernel driver so it can switch to HBR audio
packets if needed. The control hook is marked optional because kernels
before 5.14 didn't expose the IEC958 controls.

The default pcm never worked as dmix doesn't support the iec958 format.
So drop dmix, only use plug and softvol, and use the hdmi pcm for
iec958 formatting.

Link: https://lore.kernel.org/alsa-devel/20220430142845.229409-1-hias@horus.com/

- conf: fix memory leak in snd_config_substitute() for strings

When destination type is SND_CONFIG_TYPE_STRING, the old string
must be freed.

- conf: snd_config_merge - fix comment (overwrite / override) - conf: fix the export of safe_strto* functions from libasound

Only one library should define the safe_strto function. Export it
correctly and add _snd_ prefix to avoid possible clashes with the other
application code.

Documentation

- README: Add link to GitHub Actions

Simple Abstraction Mixer Modules

- mixer: simple module: python 3.10 PyTuple_SET_ITEM() fix

Make code compatible with Python 3.10 As noted in bpo-30459,
PyTuple_SET_ITEM() does not return a value.

Link: https://bugs.python.org/issue30459

Detailed changelog between 1.2.6 and 1.2.7 releases

Changelog between 1.2.6.3 and 1.2.7 releases

alsa-utils

Core

- Release v1.2.7 - github workflow: add libtoolize call for alsa-utils - topology: plugins - add Intel nhlt encoder plugin

Add Intel nhlt acpi table encoder plugin into topology2.0 processing.
Nhlt internal structure is defined in:
https://01.org/sites/default/files/595976_intel_sst_nhlt.pdf
Nhlt acpi table contain vendor specific binary data blobs that are used
in some Intel dsp platforms for configuring the dmic and ssp hardware.

The function of this code is mainly to generate the vendor specific
binary blobs, but as there is existing nhlt parser code and header in
kernel there's no point of re-inventing the container: just use the
existing nhlt acpi table format. Basically this code is creating similar
nhlt acpi table that you would get from: cat
/sys/firmware/acpi/tables/NHLT

This code will have implementation for dmic and ssp endpoints. Thus the
code will translate the topology dai tokens into vendor specific binary
blobs and pack them into nhlt acpi table. Ssp and dmic code is lifted
from Sound Open Firmware (sof) code base, thus it will have BSD-3
license.

This plugin can be enabled from command line with:

alsatplg -DPREPROCESS_PLUGINS="nhlt" -c foo.conf -p -o bar.tplg

You can also dump the nhlt binary into a file with additional define:

-DNHLT_BIN="nhlt.bin"

Link: https://github.com/alsa-project/alsa-utils/pull/129

ALSA Control (alsactl)

- alsactl: implement 'info' command

It may be useful to collect the basic sound card information.
The output is in the YAML structured syntax (human and machine readable).

- alsactl: add locking for per-card initialization

Introduce the -K,--lock-dir parameter to specify the locking
directory. If the locking is active, files card<NUM>.lock
are used to serialize the multiple initialization requests
(udev, service).

Allow the relative -O,--lock-file argument (it's default now).

- alsactl: lock - use alarm signal and F_SETLKW rather polling - alsactl: remove unused argument for state_lock_() - alsactl: add dbg() prints to init_ucm() - alsactl: flush stdout for monitor command

It may be useful to pipe the output to another program.

- alsactl: fix typo in comment in 00main - alsactl: fix the error path in set_controls()

Speaker Test

- speaker-test: remove sample_map.csv from Makefile - speaker-test: remove sample_map.csv

The CSV file is not used. The .wav file names are fixed
in the source code, but the directory may be specified
using --wavdir. Remove this file until there's a demand
for the more precise .wav file mapping.

alsamixer

- alsamixer: add alsamixer.rc.example file - alsamixer: Revert has_mouse() check

has_mouse() function of ncurses doesn't seem working reliably.
Revert the previous change for addressing the regressions.

BugLink: https://github.com/alsa-project/alsa-utils/issues/139

- alsamixer: Fix regression in color setup

The recent change to add the background config broke the color setup
via the config file due.  Fix the regression by restoring the
initialization order back again, and changing the logic for the
default background color to be re-initializing color pairs instead.

Link: https://github.com/alsa-project/alsa-utils/issues/137

alsatplg (topology)

- topology: nhlt plugin: second attempt to fix the .so linking - topology: nhlt plugin: fix the .so linking - topology: plugins: nhlt: fix intel dmic mode calculation

Dmic find_modes function was used with same sampling rate for both fifo
a and b parameter calculations. This bug was found in testing two
simultaneous dmic dais in topology. Fix this by introducing a sampling
rate argument for find_modes.

- topology: add missing nhlt headers to Makefile.am - topology: add missing pre-process-external.h to Makefile.am - topology: do not pass pre_processor_defs to pre_process_plugins()

This parameter is not used.

Link: https://github.com/alsa-project/alsa-utils/pull/129

- topology: plugins - add Intel nhlt encoder plugin

Add Intel nhlt acpi table encoder plugin into topology2.0 processing.
Nhlt internal structure is defined in:
https://01.org/sites/default/files/595976_intel_sst_nhlt.pdf
Nhlt acpi table contain vendor specific binary data blobs that are used
in some Intel dsp platforms for configuring the dmic and ssp hardware.

The function of this code is mainly to generate the vendor specific
binary blobs, but as there is existing nhlt parser code and header in
kernel there's no point of re-inventing the container: just use the
existing nhlt acpi table format. Basically this code is creating similar
nhlt acpi table that you would get from: cat
/sys/firmware/acpi/tables/NHLT

This code will have implementation for dmic and ssp endpoints. Thus the
code will translate the topology dai tokens into vendor specific binary
blobs and pack them into nhlt acpi table. Ssp and dmic code is lifted
from Sound Open Firmware (sof) code base, thus it will have BSD-3
license.

This plugin can be enabled from command line with:

alsatplg -DPREPROCESS_PLUGINS="nhlt" -c foo.conf -p -o bar.tplg

You can also dump the nhlt binary into a file with additional define:

-DNHLT_BIN="nhlt.bin"

Link: https://github.com/alsa-project/alsa-utils/pull/129

- topology: add simple topology plugin mechanism

Add a simple plugin interface for processing the topology tree. There
can be cases where parts of the topology need to be translated from the
original format into something else. For example one could calculate
some kind of filter coefficients from filter parameters or some other
binary interface parameters from plain text topology tokens.

Mechanism is similar as in alsa-plugins and in the plugin there should
be only 1 function exported of the form:

int _snd_topology_##pluginname##_process (snd_config_t *input, snd_config_t *output)

Input and output parameters are snd_config tree before and after topology2
pre-processing. So the plugin can modify both if needed. There are cases
where the plugin may need to get information from input tree, but make
modifications to the output.

The plugins to be used can be defined in command line with:

alsatplg -DPREPROCESS_PLUGINS="foobar" -c topology.conf -p -o topology.tplg

Multiple plugins should be separated by ":".

Plugins to be used can also be defined with "Define" clause inside the
topology file (but command line takes precedence):

Define {
       PREPROCESS_PLUGINS "foobar"
}

Link: https://github.com/alsa-project/alsa-utils/pull/129

- topology: pre-processor: fix seg fault when there no command line defines

In case there are not command line definitions, there is nothing to
merge or delete.

- topology: use a copy of the command line defines - topology: don't fail when Define section is missing in the included file - topology: create Define subtree for command line defines only - topology: the includes should be deleted not removed - topology: use cached Define subtree in pre_process_includes() - topology: fix the define section merge from the included files

The bellow commit assumed that the merge of the included file
is to the main configuration tree, but it's for the subtree.
The Define compound from the included file must be handled
separately.

Link: https://github.com/alsa-project/alsa-utils/pull/140

- topology: fix the comment for improved -D option - topology: add support for multiple -D arguments

It may be useful in the makefile rules for example.

- topology: pre-process-object: expand variables before validating attributes

With the introduction of variables in the topology files, validation of
attributes values must be done after they are expanded to their defined
values. Also, since valid values for attributes in the class definition
can also be variables, they need to be expanded as well. So, first expand
the attribute values and then check them against expanded valid values.

- topology: rename function free_pre_preprocessor to free_pre_processor

Line up this name with others.

- topology: optimization for pre_processor_defs parsing

Parse the configuration tree only one time and then reuse
it for the merge.

Also, do not pass inc_path to all functions - add it
to the pre-processor structure.

- topology: merge the pre-processor call to one function - topology: fix the command line define merge for new includes

The defines from the command line must overwrite the defines
from the included configuration files forcefully.

Link: https://github.com/alsa-project/alsa-utils/pull/129

- topology: don't allow to mix verbose level and output to stdout - topology: pre-processor: Move the call to expand variables

Remove the call to snd_config_expand_custom() to expand the top-level
input config. And replace it with calls to snd_config_evaluate_string()
for each non-compound config while processing individual objects. This
will allow retreving variable definitions from object attribute values
and global definitions.

Add a new field "current_obj_cfg" to hold the current object config
being pre-processed.

This will facilitate adding simple math expressions for computing
attribute values for objects based on other attributes. For ex: we can
set the expression for buffer size as follows:

buffer_size "$[($in_channels * 48) * 4]"

The buffer_size attribute value will be computed with the attribute
value "in_channels" based on the expression above. So if $in_channels =
2, buffer_size will be evaluated to 384.

Additionally this change also permits computing attribute values based
on previously computed values. For example:

buffer_size "$[($in_channels * 48) * 4]"
dma_buffer_size "$[$buffer_size * 2]"

dma_buffer_size will be computed as 768. Note that the order of
definitions for buffer_size and dma_buffer_size matters because the
evaluation for dma_buffer_size depends on the evaluation of buffer_size.
In order to conform to this, the tplg_object_copy_and_add_param() is
modified to add attribute configs from class config to an object using
snd_config_before() instead of snd_config_add().

With this change, we no longer need to set the auto_attr_updater for
buffer type widget objects. So remove it.

- topology: fix the file permissions for the generated files

The owner r/w file permissions are too restrictive.
Let umask do it's work and set the r/w permissions to any.

- topology: define -I option only for alsa-lib 1.2.6+

Link: https://github.com/alsa-project/alsa-utils/pull/125

- topology: Add option to pass include path for conditional includes

The include path passed with -I option will override the relative
include path based on the source file.

- topology: fix the include path parsing

When the last '/' is not found use '.' as the source path.

alsaucm

- aplay: Fix for arecord recording ghost data

When recording we should only write the amount of data read to output
file instead of copying whole buffer. This fixes glitches appearing at
the end of recorded file, when stopping recording.

- topology: pre-processor: Move the call to expand variables

Remove the call to snd_config_expand_custom() to expand the top-level
input config. And replace it with calls to snd_config_evaluate_string()
for each non-compound config while processing individual objects. This
will allow retreving variable definitions from object attribute values
and global definitions.

Add a new field "current_obj_cfg" to hold the current object config
being pre-processed.

This will facilitate adding simple math expressions for computing
attribute values for objects based on other attributes. For ex: we can
set the expression for buffer size as follows:

buffer_size "$[($in_channels * 48) * 4]"

The buffer_size attribute value will be computed with the attribute
value "in_channels" based on the expression above. So if $in_channels =
2, buffer_size will be evaluated to 384.

Additionally this change also permits computing attribute values based
on previously computed values. For example:

buffer_size "$[($in_channels * 48) * 4]"
dma_buffer_size "$[$buffer_size * 2]"

dma_buffer_size will be computed as 768. Note that the order of
definitions for buffer_size and dma_buffer_size matters because the
evaluation for dma_buffer_size depends on the evaluation of buffer_size.
In order to conform to this, the tplg_object_copy_and_add_param() is
modified to add attribute configs from class config to an object using
snd_config_before() instead of snd_config_add().

With this change, we no longer need to set the auto_attr_updater for
buffer type widget objects. So remove it.

aplay/arecord

- aplay: Fix for arecord recording ghost data

When recording we should only write the amount of data read to output
file instead of copying whole buffer. This fixes glitches appearing at
the end of recorded file, when stopping recording.

- aplay: fix a typo in warning (inaudiable -> inaudible) - topology: pre-processor: Move the call to expand variables

Remove the call to snd_config_expand_custom() to expand the top-level
input config. And replace it with calls to snd_config_evaluate_string()
for each non-compound config while processing individual objects. This
will allow retreving variable definitions from object attribute values
and global definitions.

Add a new field "current_obj_cfg" to hold the current object config
being pre-processed.

This will facilitate adding simple math expressions for computing
attribute values for objects based on other attributes. For ex: we can
set the expression for buffer size as follows:

buffer_size "$[($in_channels * 48) * 4]"

The buffer_size attribute value will be computed with the attribute
value "in_channels" based on the expression above. So if $in_channels =
2, buffer_size will be evaluated to 384.

Additionally this change also permits computing attribute values based
on previously computed values. For example:

buffer_size "$[($in_channels * 48) * 4]"
dma_buffer_size "$[$buffer_size * 2]"

dma_buffer_size will be computed as 768. Note that the order of
definitions for buffer_size and dma_buffer_size matters because the
evaluation for dma_buffer_size depends on the evaluation of buffer_size.
In order to conform to this, the tplg_object_copy_and_add_param() is
modified to add attribute configs from class config to an object using
snd_config_before() instead of snd_config_add().

With this change, we no longer need to set the auto_attr_updater for
buffer type widget objects. So remove it.

gitcompile

- topology: plugins - add Intel nhlt encoder plugin

Add Intel nhlt acpi table encoder plugin into topology2.0 processing.
Nhlt internal structure is defined in:
https://01.org/sites/default/files/595976_intel_sst_nhlt.pdf
Nhlt acpi table contain vendor specific binary data blobs that are used
in some Intel dsp platforms for configuring the dmic and ssp hardware.

The function of this code is mainly to generate the vendor specific
binary blobs, but as there is existing nhlt parser code and header in
kernel there's no point of re-inventing the container: just use the
existing nhlt acpi table format. Basically this code is creating similar
nhlt acpi table that you would get from: cat
/sys/firmware/acpi/tables/NHLT

This code will have implementation for dmic and ssp endpoints. Thus the
code will translate the topology dai tokens into vendor specific binary
blobs and pack them into nhlt acpi table. Ssp and dmic code is lifted
from Sound Open Firmware (sof) code base, thus it will have BSD-3
license.

This plugin can be enabled from command line with:

alsatplg -DPREPROCESS_PLUGINS="nhlt" -c foo.conf -p -o bar.tplg

You can also dump the nhlt binary into a file with additional define:

-DNHLT_BIN="nhlt.bin"

Link: https://github.com/alsa-project/alsa-utils/pull/129

alsa-python

Core

- Release v1.2.7 - various python3 fixes

pyalsa.alsahcontrol module

- various python3 fixes

pyalsa.alsaseq module

- alsaseq: fix 'ext' buffer fill

The `GETDICTEXT` macro used to perfom one pass on the provided int
list to check the actual item types brefore allocating and filling
the target buffer. The python list was not read again causing the
buffer to be filled with the last value read during the type check.

This patch performs the type check as well as buffer fill in one go.
The buffer is freed if an item is found to be of a wrong type.

- various python3 fixes

Detailed changelog between 1.2.6.3 and 1.2.7 releases

Changelog between 1.2.6.3 and 1.2.7 releases

alsa-ucm-conf

Configuration

- USB-Audio: reorder the match table (by USB device ID) - USB-Audio: Add Direct HW verb for Steinberg UR44 - ucm2: USB-Audio/Steinberg/UR44: use SplitPCM macro - ucm2: USB-Audio/Steinberg/UR44: initial support

Home/pro audio interface with 6 inputs and 4 outputs, which I configure
as 6 mono capture devices and 2 stereo playback devices.

- USB-Audio: Audient iD4 - add direct HW verb - USB-Audio: Audient iD4 - use SplitPCM macro - USB-Audio: add Audient iD4 configuration

hardware represents 2 stereo inputs/outputs as a single multichannel
input/output, similar to 97beee6ded9e3dddfb56580eee360088fbfa8595 we
split it using dsnoop/dshare

- USB-Audio: Arturia Minifuse 2 - rewrite to use the SplitPCM macros

More minor cleanups:

- use the standard UCM device names (see use-case.h)
- add ConflictingDevice to Mic1 and Mic2
- try to avoid duplicate priorities

- USB-Audio: Add Direct HW verb for Arturia Minifuse 2

This is the same as the fallback ucm profile. It just exposes the device,
which can be useful in some contexts, like when routing audio using jack
or pipewire.

- USB-Audio: Add Use Case for Arturia Minifuse 2

Arturia Minifuse 2
(https://www.arturia.com/products/audio/minifuse/minifuse2)
is an USB audio interface with 2 mono inputs and 2 channel outputs.
It uses 1 subinterface with 4 capture and 4 playback channels:
Capture channels:
- Mic/Line/Inst 1 (Mono)
- Mic/Line/Inst 2 (Mono)
- Loopback (Stereo, L+R)

Playback:
- Main (Stereo, L+R)
- Loopback (L+R)

The Loopback capture and playback are intended to ease recording sound
from the computer, e.g if you're doing a podcast and want to record
something that plays from the computer. Of course us linux user don't
need that, since we have many tools able to do that.

However, without a dedicated use case, alsa treats the channels as
surround 4.0, which make the card difficult to use.

At this stage, no controls are available.

TODO/FIXMEs:
- add a channel map override on the pcm device ?

- GoXLR: rewrite to use the SplitPCM macros - GoXLR: add direct HW verb - HDMI - use new Macro syntax - UMC204HD: Use newly introduced macros to simplify configs

Although the information is somehow duplicated, the current
macros support both "alsa-lib PCM channel split" and
"application side PCM channel split".

The key is the readability.

Test:

        alsaucm -c "hw:1" dump text

        vs.

        alsaucm -c "<<<SplitPCM=1>>>hw:1" dump text

- Add common/ctl/remap.conf and common/pcm/split.conf - ucm2: put disdevall to HDA/Soundwire configs

All device should be set to the sane (off) state when the verb
is selected.

Link: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1356

- GoXLR: Fixed sampler input configuration

Renamed the 'Sample' input channel to 'Sampler' to better reflect it's behaviour, and corrected channel numbers.

Link: https://github.com/alsa-project/alsa-ucm-conf/pull/155

- ucm2: sof-essx8336: use the right mixers for speaker/headphone

On es8316 and es8336, both speaker and headphone share the same
mixer. Adjust the controls to reflect the actual control names,
at the same way as bytcht-es8316.

- ucm2: sof-essx8336: drop conditional control settings

The Headphone controls are used by both speaker and headphone,
due to that, can't be used to detect if the device has Speaker
and/or headphones.

Also, all such controls are already initialized during the
BootSequence.

So, just drop them.

- ucm2: sof-essx8336: Add a boot sequence

Add a boot sequence to place the card on a reliable state.

- ucm2: sof-essx8336: Fix location of HiFi.conf

There's a typo there:

        sof-es8336 -> sof-essx8336

That causes ucm HiFi profile to not load, nor Hdmi.

- ucm2: sof-essx8336: Fill in SectionVerb session at HiFi.conf

There is an open:
        SectionVerb {

at HiFi.conf, which is not only unused, but also it is missing
its close bracket.

- USB-Audio/Realtek/ALC4080: Fix microphone on MSI boards after ASUS changes. - USB-Audio/Realtek/ALC4080: conditional S/PDIF index, add back microphone (#1)

Fixes ASUS ROG Maximus XIII support.
C/Sub port is not tested.

- USB-Audio: Match 0db0:1feb for ALC4080 profile. - USB-Audio: Additionally match 0b05:1996 and 0db0:a073 for ALC4080 profile. - USB-Audio: Add profile for MSI MPG X570S Carbon Max Wifi.

This patch depends on Linux 5.17.

This board features an Realtek ALC4080 chip. The various inputs and
outputs are distributed over multiple hardware devices:
* Input
 - hw:$card,0 loop back from speaker (called "Analog In")
 - hw:$card,1 line in at back panel
 - hw:$card,2 microphone from front AND back panel
* Output
 - hw:$card,0 speaker output at back panel (up to 7.1)
 - hw:$card,1 headerphone output at front panel
 - hw:$card,2 could not figure this one out
 - hw:$card,3 guessed S/PDIF output (sadly no way to test)

By default Mic and Line in are disabled. This confuses applications,
thus I made the profile enable them by default.

Without an UCM profile PulseAudio is not able to create output on
the front panel nor record any microphone input.

- UMC204HD: Add chmaps - Add direct hardware profile for UMC204HD - HDA-DualCodecs: Fix wrong jack control on Lenovo P520

Lenovo P520 uses the same line out switch like other dual codecs
systems, however it uses another jack control. So consolidate the switch and
separate the jacks to make its jack control work again.

- Behringer UMC204HD - change the default mixer profile

Link: https://github.com/alsa-project/alsa-ucm-conf/pull/128

- Add profile for Behringer UMC204HD

Link: https://github.com/alsa-project/alsa-ucm-conf/pull/128

- ucm2: HDA - add second Line output (Front)

BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/141

- ucm2: HDA - make Speaker device optional

BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/141

- ucm2: HDA - add support for 'Line Playback' controls

BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/141

- ucm2: sof-essx8336: add missing symlink from conf.d tree - ucm2: sof-essx8336: initial support

Loosely based on the sof-hda-dsp model for DMIC conditional handling.

- ucm2: add additional symlink for Pinebook Pro

since 907f0a305186 ASoC: simple-card: Fill in driver name of the linux
kernel, the base name is simple-card instead of rockchip_es8316

- sof-hda-dsp: fix multiple If.dmic blocks

Fix multiple If.dmic blocks - rename the first to devdmic
initialization.

- acp6x: add initial support for AMD Yellow Carp - ACP6x

Link: https://github.com/alsa-project/alsa-ucm-conf/issues/136

- HDA-acp: avoid to create 'Mic ACP LED' control for the HDMI card

BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1849#note_1210933

- HDA-DualCodecs: fix typo in Speaker condition

Description

- Release v1.2.7