mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 08:35:42 +01:00
f9e6010d5e
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>
55 lines
1.2 KiB
C
55 lines
1.2 KiB
C
// SPDX-License-Identifier: BSD-3-Clause
|
|
//
|
|
// Copyright(c) 2021 Intel Corporation. All rights reserved.
|
|
//
|
|
// Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
|
|
// Keyon Jie <yang.jie@linux.intel.com>
|
|
// Rander Wang <rander.wang@linux.intel.com>
|
|
// Jaska Uimonen <jaska.uimonen@linux.intel.com>
|
|
|
|
#ifndef __SSP_INTEL_H
|
|
#define __SSP_INTEL_H
|
|
|
|
#include <stdint.h>
|
|
|
|
/* struct for intel ssp nhlt vendor specific blob generation */
|
|
struct ssp_intel_config_data {
|
|
uint32_t gateway_attributes;
|
|
uint32_t ts_group[8];
|
|
uint32_t ssc0;
|
|
uint32_t ssc1;
|
|
uint32_t sscto;
|
|
uint32_t sspsp;
|
|
uint32_t sstsa;
|
|
uint32_t ssrsa;
|
|
uint32_t ssc2;
|
|
uint32_t sspsp2;
|
|
uint32_t ssc3;
|
|
uint32_t ssioc;
|
|
uint32_t mdivc;
|
|
uint32_t mdivr;
|
|
} __attribute__((packed));
|
|
|
|
#define SSP_BLOB_VER_1_5 0xEE000105
|
|
|
|
struct ssp_intel_config_data_1_5 {
|
|
uint32_t gateway_attributes;
|
|
uint32_t version;
|
|
uint32_t size;
|
|
uint32_t ts_group[8];
|
|
uint32_t ssc0;
|
|
uint32_t ssc1;
|
|
uint32_t sscto;
|
|
uint32_t sspsp;
|
|
uint32_t sstsa;
|
|
uint32_t ssrsa;
|
|
uint32_t ssc2;
|
|
uint32_t sspsp2;
|
|
uint32_t ssc3;
|
|
uint32_t ssioc;
|
|
uint32_t mdivctlr;
|
|
uint32_t mdivrcnt;
|
|
uint32_t mdivr[];
|
|
} __attribute__((packed));
|
|
|
|
#endif /* __SSP_INTEL_H */
|