Commit graph

6 commits

Author SHA1 Message Date
Jaroslav Kysela
153d185822 topology: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:33:19 +02:00
Jaska Uimonen
096920264e topology: plugins: nhlt: remove dmic error print
Remove "fs not set" print from dmic processing. The message is printed out
when pdm is enabled but not configured. Many sof topologies enable all
pdms even if not used as it is a requirement for some Intel firmware
versions to work correctly.

Fixes: https://github.com/alsa-project/alsa-utils/pull/218
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-01 09:46:47 +02:00
Seppo Ingalsuo
a4c25e4710 Topology: NHLT: Intel: Update DMIC FIR coefficients
The previous version contained some hand edit mistakes those
impacted the filter frequency response. The used generator script
is found from directory:

https://github.com/thesofproject/sof/tree/main/tools/tune/dmic .

Use command "dmic_batch.h" to generate these and copy new version
to alsa-utils.

Fixes: https://github.com/alsa-project/alsa-utils/pull/218
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-01 09:46:33 +02:00
Jaska Uimonen
5cdb598f59 topology: plugins: nhlt: set dmic stereo mode only in hw version 1
Dmic stereo mode should be set only in hw version 1. In later hw
versions this bit is reserved.

Fixes: https://github.com/alsa-project/alsa-utils/pull/222
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.ntel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-01 09:34:19 +02:00
Jaska Uimonen
96ddc346e0 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.

Fixes: https://github.com/alsa-project/alsa-utils/pull/148
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2022-05-31 14:10:25 +02:00
Jaska Uimonen
f9e6010d5e 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
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2022-05-03 13:24:03 +02:00