Detailed changes v1.2.3.2 v1.2.4

From AlsaProject
Revision as of 17:20, 20 October 2020 by Perex (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Detailed changelog between 1.2.3.2 and 1.2.4 releases

Changelog between 1.2.1 and 1.2.4 releases

alsa-lib

Core

- Release v1.2.4 - pcm: dmix: make lockless operation optional

The recently reported (but a long-standing) bug about the
unconditional semaphore usage in the dmix implies that basically we've
had no problem with the locking in the practical usages over years.
Although the lockless operation has a clear merit, it's a much higher
CPU usage (especially on some uncached pages), and it might lead to a
potential deadlock in theory (which is hard to reproduce at will,
though).

This patch introduces a new configure option "--enable-lockless-dmix"
or "--disable-lockless-dmix" to let user choose the default dmix
operation mode.  The usage of the lockless mixing has been already
conditionally enabled via asoundrc and card config
"direct_memory_access", so we just need to set the default value based
on it.

In this patch, the default is set off to the lockless mixing, i.e. the
generic mixing is chosen.  It makes more sense from the performance
POV.  For any users who still require the lockless operation, it can
be enabled either via configure option or the asoundrc.

The magic number used in the shmem is also changed depending on the
operation mode.  It's just for safety, not to conflict both operation
modes with each other.

Control API

- control: Add documentation for snd_ctl_elem_value_*. - control: Improve general control interface documentation. - control: Add documentation for snd_ctl_elem_list_*. - control: ctlparse - fix enum values in or ""

This comit fixes the enum value string parser
(fixes aaf3a081bff1cc85635f7a3c3d4287c4addbbd84).

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/40

- ctl: improve documentation for identifier of control element

In documentation, there're two ways relevant to the identifier of control
element. However, the case of combination has the lack of parameters.

This commit improves documentation in this point.

PCM API

- pcm: file plugin - implement safe_write

The syscalls may return EINTR when a signal is handled.
Implement safe_write() function which does simple write
retry.

- pcm: fix the pcm_frames_diff -> pcm_frame_diff typo

BugLink: https://github.com/alsa-project/alsa-lib/issues/85

- pcm: dshare - apply the boundary wrap in snd_pcm_dshare_sync_area()

BugLink: https://github.com/alsa-project/alsa-lib/issues/84

- pcm: introduce pcm_frame_diff and pcm_frame_diff2 helpers - pcm: meter / s16 - add protection for the maximum copied frames

The rewind or forward may cause the stream pointer change. Although
this patch does not fix the real meter update issue, it breaks
the possible big loops when the stream pointers are desynced with
the meters. It does not make sense to copy more samples than the
pcm buffer contains.

Link: https://lore.kernel.org/alsa-devel/f56d6a67-014a-e562-c253-830c0ec03717@ivitera.com/

- dlmisc, pcm: export the old symbols (for -flto)

All old symbols must be visible (exported) for -flto.

BugLink: https://github.com/alsa-project/alsa-lib/issues/56

- pcm: fix the snd_pcm_plugin_status() avail and delay fields

The avail and delay fields in the returned status structure does not
reflect the actual hw_ptr/appl_ptr. This change correct this.

TODO: Unfortunately, the delay might contain also information about
extra hardware / buffering delay which is hidden with this change.

Link: https://lore.kernel.org/alsa-devel/d9c1f37e-5c8d-f289-270e-c6cda7a56ce3@axis.com/
Tested-by: Jonas Holmberg <jonashg@axis.com>

- pcm: dmix: fix access to sum-buffer in non-interleaved mixing mode

When dmix uses non-interleaved mixing mode the offset and step width
to sum_buffer was calculated by using the dmix channels instead of
the slave channels. This leads to audio distortions due to frame
corruption.

example:
- With below configuratio, Do aplay on both device in parallel for
audio distortion

pcm.dmix_2_channels {
        type dmix
        ipc_key 5678293
        ipc_perm 0660
        ipc_gid audio
        bindings [0 1]

        slave {
                pcm "hardware"
                channels 2
                periods  4
                period_time 40000
        }
}

pcm.dmix_1_channels {
        type dmix
        ipc_key 5678293
        ipc_perm 0660
        ipc_gid audio
        bindings [0]

        slave {
                pcm "hardware"
                channels 1
                periods  4
                period_time 40000
        }
}

pcm.hardware {
        type hw
        card 0
        channels 2
        rate 48000
        format S16_LE
}

- pcm: iec958: set channel status bits according to rate and format

This mimics snd_pcm_create_iec958_consumer in the kernel.

The rate and wordlength bits will only be modified if they are
set to "not indicated", which is now the default if no status
option is used.

This allows applications to override parameters determined from
the stream or implement channel status bits extensions without
needing to change pcm_iec958 code.

- pcm: iec958: implement HDMI HBR audio formatting

High bitrate compressed audio data like DTS HD or MAT is usually
packed into 8-channel data. The HDMI specs state this has to be
formatted as a single IEC958 stream, compared to normal multi-
channel PCM data which has to be formatted as parallel IEC958 streams.

As this single-stream formatting mode may break existing setups that
expect non-PCM multichannel data to be formatted as parallel IEC958
streams it needs to be explicitly selected by setting the hdmi_mode
option to true.

The single-stream formatting implementation is prepared to cope with
arbitrary channel counts but only limited testing was done for channel
counts other than 8.

- pcm: dmix: Fix semaphore usage with lockless operation

As Maarten Baert recently reported, the current dmix code applies the
semaphore unnecessarily around mixing streams even when the lockless
mix operation is used on x86.  This was rather introduced mistakenly
at the commit 267d7c728196 ("Add support of little-endian on
i386/x86_64 dmix") where the generic dmix code was included on x86,
too.

For achieving the original performance back, this patch changes the
semaphore handling to be checked at run time instead of statically at
compile time.

- pcm: dmix: make lockless operation optional

The recently reported (but a long-standing) bug about the
unconditional semaphore usage in the dmix implies that basically we've
had no problem with the locking in the practical usages over years.
Although the lockless operation has a clear merit, it's a much higher
CPU usage (especially on some uncached pages), and it might lead to a
potential deadlock in theory (which is hard to reproduce at will,
though).

This patch introduces a new configure option "--enable-lockless-dmix"
or "--disable-lockless-dmix" to let user choose the default dmix
operation mode.  The usage of the lockless mixing has been already
conditionally enabled via asoundrc and card config
"direct_memory_access", so we just need to set the default value based
on it.

In this patch, the default is set off to the lockless mixing, i.e. the
generic mixing is chosen.  It makes more sense from the performance
POV.  For any users who still require the lockless operation, it can
be enabled either via configure option or the asoundrc.

The magic number used in the shmem is also changed depending on the
operation mode.  It's just for safety, not to conflict both operation
modes with each other.

Topology API

- topology: straight printf and error path fixes - topology: save_config - fix the error path handling - tplg: fix the unaligned_get32/put32 helpers for big endian - topology: improve the printf buffer management

The commit d04e72c9a593015952e4858b92ab3f9d821560d9 introduced
the dynamic printf buffer allocation for each tplg_save_printf()
call.

Introduce 'struct tplg_buf' which carries extra information about
the temporary printf buffer and the destination buffer to save allocation
requests.

The printf buffer is also allocated using 1024 bytes chunks.

A comparison between 'alloc everyting' and 'cache+chunk alloc' for the
random picked topology file:

  1: 18,620 allocs, 18,620 frees, 7,239,688 bytes allocated
  2: 12,490 allocs, 12,490 frees, 962,568 bytes allocated

- topology: fix the unaligned access

Introduce unaligned_get32/put32 helpers to deal with the
packed structures.

Use the gcc __BYTE_ORDER__ defines for the endian checks.
It may be improved to support other compilation environment.

- topology: fix sort_config()

The temporary config array must be initialized for all compound types.

- topology: fix some gcc10 warnings (labs, signess) - topology: return correct value in tplg_save_printf() - topology: Make buffer for saving dynamic size

Some fields can exceed size limit, e.g. private data has no size
restriction. Therefore it needs to be dynamically increased.

- topology: decode: Add DAI name printing

DAI name is a part of topology binary. Not printing makes data loss while
converting from binary to standard ALSA configuration file.

- topology: decode: Print sig_bits field in PCM capabilities section

Not printing this field makes data loss while converting from binary
to standard ALSA configuration file.

- topology: decode: Fix decoding PCM formats and rates

Not checking _LAST format and rate, which are valid indexes in arrays,
makes data loss while converting binary to standard ALSA configuration
file.

- topology: decode: Change declaration of enum decoding function

Size constraints are always checked before invoking
tplg_decode_control_enum1. There is no need to validate it twice.
Alos moved debug print about size to invoking function, since now it's it
responsibility to check size.

- topology: decode: Fix printing texts section - topology: decode: Add enum control texts as separate element

Texts are separate sections that should referenced by enum control.

- topology: decode: Remove decoding values for enum control

Values have no representation in standard ALSA configuration files,
therefore there is no need to populate them. Also memory for values
wasn't allocated which was causing undefined behaviour.

- topology: decode: Fix infinite loop in decoding enum control

Accessing memory outside of allocated boundaries caused segmentation fault.

- topology: decode: Fix channel map memory allocation

Memory allocated on the stack was referenced outside of the function scope
caused undefined behaviour.

Use Case Manager API

- ucm: handle correctly Linked configuration

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

- ucm: rename once_list to boot_list - ucm: substitute the comment string also in the main configuration file - ucm: add a check for the empty configuration

Return an error if the UCM configuration is empty (no verbs
or no boot sequence).

- ucm: Handle 'Error' keyword in the master file

With the conditional blocks, it may be useful to terminate
the hardware detection from the configuration. Introduce
'Error' keyword for the master UCM configuration file.

- ucm: substitute the merged tree completely

We need to define the common shared configuration like for multiple
HDMI devices or so. Substitute the whole merged configuration tree
including identifiers.

- ucm: fix parse_get_safe_name() - safe name must be checked after substitution - ucm: substitution - remove duplicate allow_empty assignment

Configuration

- conf: quote also strings with '*' and '#' characters in string_print() - conf: USB-Audio: Disable IEC958 on Lenovo ThinkStation P620

Both USB audio cards on Lenovo ThinkStation P620 don't support IEC958,
so disable IEC958 accordingly.

- conf: pcm - USB - Added S/PDIF fix for Asus Xonar SE

Resolves #70

Documentation

- README: add patch submission instructions

Dynamic Loader helpers

- dlsym: use the only alsa plugins directory for the internal modules

The commit b2a4272ecb40d84556d8e043d0b6e89439acbc33 introduced a slightly
different behaviour for ALSA_PLUGIN_DIR. The fallback causes that the
alsa libraries are searched in all library directories.

It was never intended to do the system wide library lookups for
internal modules.

- dlmisc, pcm: export the old symbols (for -flto)

All old symbols must be visible (exported) for -flto.

BugLink: https://github.com/alsa-project/alsa-lib/issues/56

- dlsym: add support for ALSA_PLUGIN_DIR environment variable

In some cases, it may be useful to specify the plugin directory
using the environment variable.

BugLink: https://github.com/alsa-project/alsa-lib/issues/82

Detailed changelog between 1.2.3 and 1.2.4 releases

Changelog between 1.2.1 and 1.2.4 releases

alsa-utils

Core

- Release v1.2.4

ALSA Control (alsactl)

- alsactl: 00main - fix typo in goto label

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

- alsactl: add new -U argument text to man page - alsactl: init - add -U option to disable UCM based init

The reason is to use it with internal init extra commands like:
  alsactl -U -E CMD=info init

- alsactl: fix the syslog message - add : delimiter after function:line

Audio Transfer utility

- treewide: fix typos in manual pages

alsa-info.sh

- alsa-info: provide DMI system sku

The system sku is used in SOF machine drivers to set specific quirks,
expose it in alsa-info to help support users. Example on a SoundWire
enabled device:

cat /sys/class/dmi/id/product_sku
0A32
dmidecode -s system-sku-number
0A32

Add a variable and expose the results of both methods.

Note that the dmidecode support is very recent and might not yet be
available in all distros:

http://git.savannah.nongnu.org/cgit/dmidecode.git/commit/?id=d70d5e686148eabe90c89fbf4cdcf5258db5aa05

- alsa-info.sh: command -v cleanups

Inspired in https://github.com/alsa-project/alsa-utils/pull/29 .

- alsa-info.sh: declare variables separately from the assign (coverity)

alsaloop

- alsaloop: Fix the silence generation in xrun_sync

The silence frames generation in xrun_sync() seems to be currently
a bit off as snd_pcm_format_set_silence() uses a wrong buffer address
and size for zero-ing out the data. Consequently instead of clearing
out the last frame(s), snd_pcm_format_set_silence() ends up silencing
samples somewhere else in the buffer. This is partilarly more obvious
for higher frame sizes (e.g. more than 2 channels).

This patch fixes this issue by correcting the parameters passed to
snd_pcm_format_set_silence().

BugLink: https://github.com/alsa-project/alsa-utils/pull/58

alsamixer

- alsamixer: remove wrong free(buf) call in read_file() - alsamixer: small optimizations

textbox.c, mixer_display.c:
  - Replaced manual line drawing code `for (...) mvwaddch(...)` by the
    functions `mvwhline/mvwvline` provided by standard curses

card_select.c, proc_files.c:
  - Moved duplicate code in the create() functions to menu_widget_create()
    in menu_widget.c

card_select.c:
  - Removed redundant calls to sprintf()

device_name.c:
  - Combined multiple calls to form_opts_off()
  - Recognize ASCII DEL (127) as backspace

widget.c:
  - Uncommented code for setting a dummy key handler (all existing
    widgets do provide a key handling function)

- alsamixer: added configuration file parser

Added configparser.c and curskey.c:
  - Lines starting with arbitrary whitespace + '#' are comments
  - Words in a command name don't have a fixed order (toggle_mute is the
      same as mute_toggle)

Moved read_file() from textbox.c to utils.c, so configparser.c can make
use of it.

Added command line options:
  -f/-F to specify/disable configuration file
  -m/-M to enable/disable mouse

- alsamixer: Use a struct for storing color attributes

This commit is a preparation for the configuration file parser.

The `int attr_*` variables have been moved into a separate struct.
Members of that struct are alphabetically ordered, so an attribute can
later be accessed by its name.

Added `int get_color_pair(short fg, short bg)` for returning or
creating a color pair number.

Added call to `use_default_colors()` for enabling access to the
terminal's default color (-1).

- alsamixer: added mouse support

Mouse support has been added for mixer_widget.c, card_select.c and
proc_files.c.

In the mixer widget the mouse is handled as follows:
- After an element has been printed in mixer_display.c, a call to
  clickable_set() will store the coordinates of the drawn area plus the
  command enum that should be executed on click. An optional argument
  holds an index which points to the selected mixer control.
- on_mouse_click() searches for a matching rectangle, focuses the mixer
  control and returns the command enum.

In the menu widgets, the menu_driver() function handles mouse input.

- alsamixer: Replaced hardcoded keys by binding arrays

This commit is a preparation for making keybindings configurable.

The hardcoded keys in the switch statements of mixer_widget.c,
textbox.c, proc_files.c and card_select.c have been replaced by
command enums. The command that shall be executed is looked up in
the arrays `mixer_bindings` and `textbox_bindings`.

The channel_mask enum has been made public, since LEFT and RIGHT are
used as command arguments in bindings.c.

- alsamixer: Fix window_size_changed()

Obtaining the new window size using TIOCGWINSZ and setting it using
resize_term(), so getmaxyx() reports the actual terminal size.

alsatplg (topology)

- topology: check for the remove() error (coverity) - topology: fix the error path in load()

alsaucm

- alsaucm: Fix ending with quotes commands

If we use 'alsaucm -n -b -' with 'get "CapturePCM/Internal Mic"' then
the alsaucm will report error and stop immediately. The reason is that
the parse_line in usecase.c appends an empty argument if a command ends
with quotes.

This change adds a patch to fix the parse_line function in usecase.c.

aplay/arecord

- aplay: fix the wrong count in compute_max_peak() for 16bit+ sample widths

The count argument was renamed to samples to correctly represent
the value meaning. Also, remove the wrong count recalculation lines
for 16-bit, 24-bit and 32-bit samples.

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

- minor aplay man page correction

Fix a minor typo for the '-f cdr' description.


BugLink: https://github.com/alsa-project/alsa-utils/pull/34

- aplay: Fix typo in error message

BugLink: https://github.com/alsa-project/alsa-utils/pull/44

- treewide: fix typos in manual pages - aplay: capture: write only the amount of read frames

This patch changes the way aborted stream is being saved. Currently when
abort signal happens the write back of read samples is skipped but there
is no reason to not save them. Also, we need to know how much frames have
been read and write only those.

- aplay: pcm_read(): return read samples instead of requested upon abort

This patch changes the logic of pcm_read() when abort signal has been
detected. During such condition we should return the amount of frames
actually read instead of the size requested by caller.

Currently functions pcm_read() and pcm_readv() when aborted (in_aborting
flag set) return the amount of requested frames instead of those actually
read prior to interrupt. The consequence of this is repetition of recent X
frames where X stands for amount of frames in one period. This problem is
barely visible or rather audible when the period is small like few
milliseconds because repetition of 1 [ms] of data is not-noticeable
however if we use buffer and period sizes in seconds then the problem
becomes apparent.

- aplay: pcm_readv(): return read samples instead of requested upon abort

This patch changes the logic of pcm_readv() when abort signal has been
detected. During such condition we should return the amount of frames
actually read instead of the size requested by caller.

Currently functions pcm_read() and pcm_readv() when aborted (in_aborting
flag set) return the amount of requested frames instead of those actually
read prior to interrupt. The consequence of this is repetition of recent X
frames where X stands for amount of frames in one period. This problem is
barely visible or rather audible when the period is small like few
milliseconds because repetition of 1 [ms] of data is not-noticeable
however if we use buffer and period sizes in seconds then the problem
becomes apparent.

Example issue -> thesofproject/sof#3189

- aplay: fix possible string overflow (coverity)

bat (basic audio tester)

- alsabat: fix typo

Halve the double negative ‘if no loopback mode is not available’.

tinycompress

Core

- Release v1.2.4 - src: lib: Move functionality to compress_hw.c

Add compress_hw.c to handle all operations associated
with HW compress nodes. Move handling to compress_hw
using compress_hw_ops.

Header files

- src: lib: compress: Add support for plugins

Add compress_open_by_name() and is_codec_supported_by_name()
to support plugins. Format of name is 'hw:<card>,<device>'
for hw compress nodes and '<plugin_name>:<custom_data>'
for virtual compress nodes. It dynamically loads the plugin
library whose name is libtinycompress_module_<plugin_name>.so.
Plugin library needs to expose compress_plugin_ops.
Default path of plugin lib is /usr/lib/tinycompress-lib/ and it
can be updated by defining TINYCOMPRESS_PLUGIN_DIR in makefile.

- include: tinycompress: Add compress_ops.h

Add compress_ops.h needed to support plugins. Compress_ops
can be used to jump to either hw compress node ops or to
virtual compress node ops.

Library

- handle TINYCOMPRESS_PLUGIN_DIR environment variable

The path specified in environment variable TINYCOMPRESS_PLUGIN_DIR
can be used to modify the build-in path at runtime.

- src: lib: compress: Add support for plugins

Add compress_open_by_name() and is_codec_supported_by_name()
to support plugins. Format of name is 'hw:<card>,<device>'
for hw compress nodes and '<plugin_name>:<custom_data>'
for virtual compress nodes. It dynamically loads the plugin
library whose name is libtinycompress_module_<plugin_name>.so.
Plugin library needs to expose compress_plugin_ops.
Default path of plugin lib is /usr/lib/tinycompress-lib/ and it
can be updated by defining TINYCOMPRESS_PLUGIN_DIR in makefile.

- src: lib: Move functionality to compress_hw.c

Add compress_hw.c to handle all operations associated
with HW compress nodes. Move handling to compress_hw
using compress_hw_ops.

alsa-ucm-conf

Configuration

- ucm2: HDA-Intel - add error section when the HDA model is not supported - bdw-rt5677: add SOF support

Completes 898602208888da63d758ff3c293b5ad2ec6e6c19

- ucm2: USB-Audio: Add CaptureMixerElem for Lenovo ThinkStation P620

The Switch and Volume mixer start to work after device firmware update.
Add MixerElem to support them.

- ucm.conf: The module name may not be available when the driver in built-in.

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

- ucm2: USB-Audio: Add support for Lenovo ThinkStation P620 Rear Audio

Add proper PCM assignment to Lenovo ThinkStation P620 Rear Audio.

- ucm2: Qualcomm sdm845 fixes HDMI select card and HiFi set DigitalVol

Remove the duplicated PlaybackVolume entry.

- ucm2: Qualcomm sdm845 fixes HDMI select card and HiFi set DigitalVol - Add support for Lenovo ThinkStation P620 Main Audio

This add support for its internal speaker and front headset.

- HDA-Intel: only add the acp dmic to the sound card with analog codec

Without this change, the acp dmic will be added to both Intel sound
card (with analog codec) and Nvidia Hdmi audio sound card.

- ucm2: HDA/acp - add Capture simple mixer element to the ACP Mic device - ucm2: module - rename rk3399-gru-sound.conf => snd_soc_rk3399_gru_sound.conf

We are using the real kernel module name for the first level selection now.

- Revert "amd/renoir/acp: use the machine driver's name for top-level's conf"

This reverts commit 35277f419b1dc0f8500d3ab4bceabf6cad05c76d.

We use the snd_acp3x_rn kernel module name again with the correct
sysfs lookup.

- ucm2: ucm.conf - fix the fix the sysfs kernel module path

The idea was to use the kernel module name not the driver name which
may be different.

BugLink: https://github.com/alsa-project/alsa-lib/pull/79

- Rockchip/rk3399-gru-sound: remove zero PCM subdevice - USB-Audio: Dell-WD15-Dock: make input and output volume adjustable

Recently we found the input volume is too low for some specific
headset-mic, even we adjust the input volume to max from PA, we still
can't record the sound from that headset-mic. That is because we
change the input or output volume from PA, but the mixer's volume
is not changed, only PA's soft-volume is changed.

Checking the amixer controls for the sound card in the WD19, it
supports MixerElem, Volume and Switch, and checking the sound card in
the WD15, it doesn't have Volume and Switch for Headphone and Line,
So adding the volume and switch control in the ucm conditionally.

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/47

- HDA-Intel: HiFi-dual: Fix the Rear Mic's Jack name

On the LENOVO P520 (dual codecs machine), the Jack name of Rear Mic is
"Rear Mic Jack" instead of "Mic Jack".

Below is picked from alsa-info.txt on the LENOVO p520 machine:
        control.18 {
                iface CARD
                name 'Rear Mic Jack'
                value true
                comment {
                        access read
                        type BOOLEAN
                        count 1
                }
        }

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/46

- Correct conflicting mic in max98090

'mic' was conflicting 'mic' instead of 'headset', thus preventing correct configuration regarding microphones.

With this corrected, introducing a headset enables 'headset' mic and disables internal 'mic', whereas releasing the headset disables 'headset' mic and enables internal 'mic'

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/43

- amd/renoir/acp: Add Syntax 3 in the module/lib/Linked.conf

Otherwise the alsalib will report:
parser.c: Syntax field not found in xxx.conf

- amd/renoir/acp: use the machine driver's name for top-level's conf

On the machines with amd renoir audio, the /sys/class/sound/card2/
device/driver links to /sys/bus/platform/drivers/acp_pdm_mach.

- ucm2: Add config for Rockchip/rk3399-gru-sound

This is the internal card for a number of ChromeOS devices based on the
Gru board. Config is taken from ChromeOS sources [1] and modified to
mostly look like Rockchip/max98090. Tested on a Samsung Chromebook Plus
(rk3399-gru-kevin) running Linux 5.7+.

[1] https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/75cf7da335c11469956c84ddfa4e2ca73b268441/overlay-kevin/chromeos-base/chromeos-bsp-kevin/files/audio-config/ucm-config/rk3399-gru-sound

- update ucm2/README.md - more kernel module lookup clarifications - hda hdmi: add HDMI4,HDMI5,HDMI6 devices

- fix the duplicate index value in the comment section
- change priorities

- sof-hda-dsp: use sof-hda-dsp/Hdmi.conf

sof-hda-dsp should use sof-hda-dsp/Hdmi.conf, not HDA-Intel/Hdmi.conf.
HDA-Intel/Hdmi.conf is for legacy HDA.

- sof-hda-dsp: fixup typo in Hdmi.conf

It should be  "/codecs/hda/hdmi.conf" instead of "/codec/hda/hdmi.conf"

- DB820c: Correctly move DB820c to Qualcomm/apq8096

DB820c belongs to APQ8096 SoC, so it should be moved to ucm2/apq8096
folder rather than apq8016.

So correctly move it to apq8096 to reflect the correct SoC.

- chtrt5645: Restore stereo sound output when switching from MonoSpeaker to Headphones

Commit fe3b0bdc2f43 ("chtrt5645: merge all possible configurations to
HiFi.conf") missed the part of the removed HiFi-mono-speaker-analog-mic.conf
file which restores stereo mixing (instead of mixing left + right to the
left DAC mixer output) when switching from the mono speaker setup to the
headphones output.

This was causing both left and right channels to only be played on the
left ear of the headphones. This commit fixes this.

- cht-bsw-rt5672: Boost ADC volume a bit

Both the DMICs and the headset mic are quite soft, even with the 20 dB
IN1 boost we already congfigure for the headset.

This commit sets the ADC Boost gain (range 0-3) to 1 = 12 dB, which makes
the volume a lot better. The next step of the ADC Boost gain setting is
24 dB which is a bit too much.

This has been tested with both the builtin DMIC and with a headset mic
on the following devices:

Lenovo Miix 2 10
Lenovo Thinkpad 8
Lenovo Thinkpad 10 (gen 1)

- cht-bsw-rt5672: Add Lenovo ThinkPad 10 specific configuration

The Lenovo ThinkPad 10 (first gen) has stereo speakers and the stereo
DMICs in the top-edge of the tablet are connected to DMIC1.

Add a RegexMatch for this, so that users do not have to select the right
settings manually.

- cht-bsw-rt5672: Add Lenovo Miix 2 10 specific configuration

By default the cht-bsw-rt5672 config lets the user figure out if a device
has a Mono spaker or Stereo speakers and which DMIC input is used.

Since this is not very user-friendly we do regex matches on the DMI derived
longname to automaticaly select the right options (and to only advertise
those options).

This commit adds support for automatically selecting the right options
on the Lenovo Miix 2 10 tablet. Since this is the first device for which
we do longname matching using a DMIC on DMIC1, this also fixes a fixme :)

- Fix invalid "Regex" Type in various Condition blocks

Regex is not a valid Condition type, using it leads to errors like these:

ALSA lib ucm_cond.c:300:(if_eval) unknown If.Condition.Type
ALSA lib main.c:983:(snd_use_case_mgr_open) error: failed to import cht-bsw-rt5672 use case configuration -22
alsaucm: error failed to open sound card cht-bsw-rt5672: Invalid argument

Replacing it with "RegexMatch" fixes this.

- SDP4430: Move to OMAP/abe-twl6040/SDP4430 tree - GoogleNyan: move to Tegra/max98090 - Pandaboard(ES): move to OMAP/abe-twl6040 tree - VEYRON-I2C: move to Rockchip/max98090 tree - PAZ00/tegraalc5632: move to Tegra/alc5632 tree - DB820c/DB845c: move to Qualcomm/ tree - DB410c: move to Qualcomm/apq8016-sbc - DAISY-I2S: move to Samsung/snow/snow.conf - HDA-Intel: add support for AMD acp microphone devices

- move the generic HDA code from sof-hda-dsp to HDA-Intel
- add generic codecs/hda/hdmi.conf

- sof-hda-dsp: fix the device order (Hdmi devices) - sof-soundwire: rewrite for 'syntax 3'

The codec/ sequences must not have the platform specific checks.

- sof-soundwire: cleanups recommended by the ucm-validator - sof-soundwire: initial UCM2 version

Add support for sof-soundwire driver, with conditional inclusion of
sections for RT700, RT711, RT5682, RT1308, RT715.

- broadwell-rt286: add SOF support

Include legacy configuration using SOF driver name and card check

- bdw-rt5677: add support for legacy and SOF drivers

Use inclusion mechanism defined for Baytrail and reuse same configuration.

- sof-hda-dsp: make the boot init optional for all controls

Also don't initialize "Auto-Mute Mode" in the HiFi verb.

- sof-hda-dsp: add initial kcontrol values

This patch adds the initial values of sof-hda-dsp card.

- sof-hda-dsp: make Headphone Playback Switch conditional

The Headphone Playback Switch control is not present in all
HDA codecs. Allow the Headphones definition to work also on
such systems.

- ucm.conf: add support for the kernel module name tree

It seems that some ASoC drivers (mainly created from the DT tree)
does not offer any good identification for the common part.
This change adds the sysfs kernel module name lookup to
module/<KernelModuleName>.conf .

Also, modularize V1, V2Name, V2Module blocks. The V1 compatibility
is turned off by default now.

- chtnau8824: merge all possible configurations to HiFi.conf - cht-bsw-rt5672: merge all possible configurations to HiFi.conf - chtrt5645: merge all possible configurations to HiFi.conf - ucm2: use Include (Syntax 3)

Instead the unconditional include, use the Include configuration
directive which can load some files when evaluated (on demand only).

- sof-hda-dsp: don't fail if Auto-Mute control is not present

The "Auto-Mute Mode" control is not present in all HDA codecs.
The generic SOF HDA UCM file should be robust enough to handle
these cases as well.

- chtrt5645: Add ASUSTeKCOMPUTERINC.-T101HA-1.0.conf symlink to chtrt5645-dmic1.conf

The Asus T101HA uses a digital mic connected to the dmic1 pin, rather then
the default analog mic on in2 (just like the Asus T100HA).

Add a long name symlink to chtrt5645-dmic1.conf for this, so that
the right config is used.

- bytcr-rt5651: Fix high noise level + soft input on DMIC

The DMIC needs to have the DMIC ASRC enabled, otherwise capturing audio
from it results in mostly capturing noise + the actual recorded voice
very soft in the background of the noise.

This has been tested on a Point of View P1006W v1.0 tablet, which is the
only RT5651 X86 device using a DMIC that I am aware of.

- bytcr-rt5640: Fix DMIC1 not working when connected over AIF2

The RT5640 codec has 2 ADC-s which are caled the Stereo ADC and the
Mono ADC (even though the mono ADC seems to be stereo too?). The Stereo
ADC is connected to the AIF1 interface of the codec and the Mono ADC
to the AIF2 interface.

Almost all X86 BYT/CHT design use the AIF1 interface, but a few models
use the AIF2 interface. For this reason the IN?-InternalMic.conf bits
not only select/enable the microphone input on the Stereo ADC, but
also on the Mono ADC, so that the analog mic. inputs also work in devices
using the AIF2 interface.

Before this commit DigitalMics.conf was only setting up the DMIC input
on the Stereo ADC and not on the Mono ADC, causing DMIC1 to not work
when connected over AIF2.

This commit adds selecting / enabling DMIC1 on the Mono ADC.
This fixes the internal microphone not working on the Toshiba Encore WT10A.

Note that for devices which use the AIF1 interface this is a no-op since
the AIF1 interface is not connected to anything, there is no complete
chain so DAPM will not enable any of the elements in the chain.

alsa-topology-conf

Configuration files

- topology: hda-dsp: Remove srcintc module from HDA DSP topology

The main goal of this topology is to handle every device with hda-dsp
configuration on Skylake SST driver.

The module_id value for srcintc module varies by FW branch, which makes
it impossible to have one universal topology with srcintc module for all of them.

Remove srcintc from this topology to make it truly universal.

Detailed changelog between 1.2.1 and 1.2.4 releases

Changelog between 1.2.1 and 1.2.4 releases

alsa-firmware

Core

- Release v1.2.4 - add _AC_LANG_COMPILER_GNU workaround to m4/ax_prog_cc_for_build.m4 - autoconf: handle $(EXEEXT) - introduce Makefile.loader - introduce Makefile.hotplug - introduce Makefile.fw_writer - upgrade ax_prog_cc_for_build.m4 to serial 18 - Get cross compilation to work

Rebased version of original patch by Ding Xiang Fei found in
https://github.com/NixOS/nixpkgs/pull/63866. This version applies in
alsa-firmware-1.2.1.

Co-authored-by: Ding Xiang Fei <dingxiangfei2009@users.noreply.github.com>

AICA (Dreamcast) Firmware

- introduce Makefile.hotplug

AudioScience ASIHPI Firmware

- introduce Makefile.hotplug - Add missing license.txt and licence.txt to EXTRA_DIST

They were forgotten in the release tarball.

Digigram Echo Audio Firmware

- autoconf: handle $(EXEEXT) - introduce Makefile.fw_writer - Get cross compilation to work

Rebased version of original patch by Ding Xiang Fei found in
https://github.com/NixOS/nixpkgs/pull/63866. This version applies in
alsa-firmware-1.2.1.

Co-authored-by: Ding Xiang Fei <dingxiangfei2009@users.noreply.github.com>

- Add missing license.txt and licence.txt to EXTRA_DIST

They were forgotten in the release tarball.

Digigram MixArt Firmware

- introduce Makefile.loader

Digigram PCXHR Firmware

- introduce Makefile.loader

EMU Firmware

- autoconf: handle $(EXEEXT) - introduce Makefile.fw_writer - Get cross compilation to work

Rebased version of original patch by Ding Xiang Fei found in
https://github.com/NixOS/nixpkgs/pull/63866. This version applies in
alsa-firmware-1.2.1.

Co-authored-by: Ding Xiang Fei <dingxiangfei2009@users.noreply.github.com>

- Add missing license.txt and licence.txt to EXTRA_DIST

They were forgotten in the release tarball.

RME HDSP Firmware

- autoconf: handle $(EXEEXT) - introduce Makefile.loader - introduce Makefile.fw_writer - Get cross compilation to work

Rebased version of original patch by Ding Xiang Fei found in
https://github.com/NixOS/nixpkgs/pull/63866. This version applies in
alsa-firmware-1.2.1.

Co-authored-by: Ding Xiang Fei <dingxiangfei2009@users.noreply.github.com>