summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-04-16 00:23:22 +0100
committerMark Brown <broonie@kernel.org>2020-04-16 00:23:22 +0100
commit217a5879e10a381d06311702f8bbb9060d3c4b89 (patch)
tree0a3507676a3a1c7d23564cf9d6d314b32feaac96 /include/sound
parent72161e0eea64bb2b5a7a834ed5a76425aac4cdd1 (diff)
parenta1687c68c3089ed746c18f2121c8e63e2cf22c00 (diff)
downloadlinux-217a5879e10a381d06311702f8bbb9060d3c4b89.tar.bz2
Merge series "ASoC: SOF: topology and firmware IPC updates for 5.8" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
Long series made of a relatively small changes from multiple SOF contributors. I didn't find a good way to split this series since it tracks SOF minor ABI changes (backwards-compatible with older firmware files) and needs to be kept in-order. Future series should be much shorter. The main addition is support for an extended firmware manifest, which helps retrieve capabilities directly from the firmware file instead of the current IPC mechanism (still supported but will be deprecated). The IPC is realigned with the firmware, along with type cleanups, and the DMIC interface is simplified. The topology changes are mainly about a multi-cpu DAI fix, a new DC blocking component, better parsing of tuples and new parameters for ALH (SoundWire) and HDaudio DAIs. New tokens are also added to clarify the firmware behavior in the case of dependent pipelines, e.g. for echo reference generation. Artur Kloniecki (1): ASoC: SOF: Add XRUN flags field to struct sof_ipc_buffer. Bard Liao (5): ASoC: SOF: topology: fix: handle DAI widget connections properly with multiple CPU DAI's ASoC: SOF: align sof_ipc_dai_alh_params with FW ASoC: SOF: topology: Get ALH rate amd channels from topology ASoC: SOF: topology: fix: parse hda_tokens to &config->hda ASoC: SOF: topology: Get HDA rate and channels from topology Jaska Uimonen (2): ASoC: SOF: topology: stop parsing when all tokens have been found ASoC: SOF: topology: handle multiple sets of tuple arrays Karol Trzcinski (6): ASoC: SOF: Mark get_ext* function ext_hdr arguments as const ASoC: SOF: Introduce offset in firmware data ASoC: SOF: Introduce extended manifest ASoC: SOF: ext_manifest: parse firmware version ASoC: SOF: ext_manifest: parse windows ASoC: SOF: ext_manifest: parse compiler version Pan Xiuli (6): ASoC: SOF: add probe support extend data ASoC: SOF: add debug ABI version ASoC: SOF: change type char to uint8_t in info.h ASoC: SOF: change type char to uint8_t in trace.h ASoC: SOF: change type char to uint8_t in topology.h ASoC: SOF: make sof_ipc_cc_version to fixed length Sebastiano Carlucci (1): ASoC: SOF: topology: Add support for DC Blocker Seppo Ingalsuo (3): ASoC: SOF: Intel: Fix typo in header file comment text ASoC: SOF: Intel: Change DMIC load IPC to fixed length ASoC: SOF: Intel: Rename deprecated DMIC IPC struct field include/sound/sof.h | 3 + include/sound/sof/dai-intel.h | 20 +- include/sound/sof/info.h | 26 ++- include/sound/sof/topology.h | 16 +- include/sound/sof/trace.h | 2 +- include/uapi/sound/sof/abi.h | 2 +- include/uapi/sound/sof/ext_manifest.h | 91 ++++++++ include/uapi/sound/sof/tokens.h | 8 + sound/soc/sof/intel/hda-loader.c | 9 +- sound/soc/sof/loader.c | 226 ++++++++++++++++-- sound/soc/sof/topology.c | 323 ++++++++++++++++---------- 11 files changed, 568 insertions(+), 158 deletions(-) create mode 100644 include/uapi/sound/sof/ext_manifest.h base-commit: 83b35f4586e235bfb785a7947b555ad8f3d96887 -- 2.20.1
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/sof.h3
-rw-r--r--include/sound/sof/dai-intel.h20
-rw-r--r--include/sound/sof/info.h26
-rw-r--r--include/sound/sof/topology.h16
-rw-r--r--include/sound/sof/trace.h2
5 files changed, 56 insertions, 11 deletions
diff --git a/include/sound/sof.h b/include/sound/sof.h
index a0cbca021230..969f554b0b7d 100644
--- a/include/sound/sof.h
+++ b/include/sound/sof.h
@@ -27,6 +27,9 @@ struct snd_sof_pdata {
struct device *dev;
+ /* indicate how many first bytes shouldn't be loaded into DSP memory. */
+ size_t fw_offset;
+
/*
* notification callback used if the hardware initialization
* can take time or is handled in a workqueue. This callback
diff --git a/include/sound/sof/dai-intel.h b/include/sound/sof/dai-intel.h
index 04e48227f542..896db2243d87 100644
--- a/include/sound/sof/dai-intel.h
+++ b/include/sound/sof/dai-intel.h
@@ -49,6 +49,9 @@
/* bclk idle */
#define SOF_DAI_INTEL_SSP_CLKCTRL_BCLK_IDLE_HIGH BIT(5)
+/* DMIC max. four controllers for eight microphone channels */
+#define SOF_DAI_INTEL_DMIC_NUM_CTRL 4
+
/* SSP Configuration Request - SOF_IPC_DAI_SSP_CONFIG */
struct sof_ipc_dai_ssp_params {
struct sof_ipc_hdr hdr;
@@ -85,15 +88,19 @@ struct sof_ipc_dai_ssp_params {
struct sof_ipc_dai_hda_params {
struct sof_ipc_hdr hdr;
uint32_t link_dma_ch;
+ uint32_t rate;
+ uint32_t channels;
} __packed;
/* ALH Configuration Request - SOF_IPC_DAI_ALH_CONFIG */
struct sof_ipc_dai_alh_params {
struct sof_ipc_hdr hdr;
uint32_t stream_id;
+ uint32_t rate;
+ uint32_t channels;
/* reserved for future use */
- uint32_t reserved[15];
+ uint32_t reserved[13];
} __packed;
/* DMIC Configuration Request - SOF_IPC_DAI_DMIC_CONFIG */
@@ -135,7 +142,7 @@ struct sof_ipc_dai_dmic_pdm_ctrl {
* version number used in configuration data is checked vs. version used by
* device driver src/drivers/dmic.c need to match. It is incremented from
* initial value 1 if updates done for the to driver would alter the operation
- * of the microhone.
+ * of the microphone.
*
* Note: The microphone clock (pdmclk_min, pdmclk_max, duty_min, duty_max)
* parameters need to be set as defined in microphone data sheet. E.g. clock
@@ -170,12 +177,13 @@ struct sof_ipc_dai_dmic_params {
uint32_t fifo_fs; /**< FIFO sample rate in Hz (8000..96000) */
uint32_t reserved_1; /**< Reserved */
uint16_t fifo_bits; /**< FIFO word length (16 or 32) */
- uint16_t reserved_2; /**< Reserved */
+ uint16_t fifo_bits_b; /**< Deprecated since firmware ABI 3.0.1 */
uint16_t duty_min; /**< Min. mic clock duty cycle in % (20..80) */
uint16_t duty_max; /**< Max. mic clock duty cycle in % (min..80) */
- uint32_t num_pdm_active; /**< Number of active pdm controllers */
+ uint32_t num_pdm_active; /**< Number of active pdm controllers. */
+ /**< Range is 1..SOF_DAI_INTEL_DMIC_NUM_CTRL */
uint32_t wake_up_time; /**< Time from clock start to data (us) */
uint32_t min_clock_on_time; /**< Min. time that clk is kept on (us) */
@@ -184,8 +192,8 @@ struct sof_ipc_dai_dmic_params {
/* reserved for future use */
uint32_t reserved[5];
- /**< variable number of pdm controller config */
- struct sof_ipc_dai_dmic_pdm_ctrl pdm[0];
+ /**< PDM controllers configuration */
+ struct sof_ipc_dai_dmic_pdm_ctrl pdm[SOF_DAI_INTEL_DMIC_NUM_CTRL];
} __packed;
#endif
diff --git a/include/sound/sof/info.h b/include/sound/sof/info.h
index 438a11fcf272..d5eff3179a39 100644
--- a/include/sound/sof/info.h
+++ b/include/sound/sof/info.h
@@ -31,6 +31,8 @@ enum sof_ipc_ext_data {
SOF_IPC_EXT_UNUSED = 0,
SOF_IPC_EXT_WINDOW = 1,
SOF_IPC_EXT_CC_INFO = 2,
+ SOF_IPC_EXT_PROBE_INFO = 3,
+ SOF_IPC_EXT_USER_ABI_INFO = 4,
};
/* FW version - SOF_IPC_GLB_VERSION */
@@ -109,9 +111,27 @@ struct sof_ipc_cc_version {
/* reserved for future use */
uint32_t reserved[4];
- char name[16]; /* null terminated compiler name */
- char optim[4]; /* null terminated compiler -O flag value */
- char desc[]; /* null terminated compiler description */
+ uint8_t name[16]; /* null terminated compiler name */
+ uint8_t optim[4]; /* null terminated compiler -O flag value */
+ uint8_t desc[32]; /* null terminated compiler description */
} __packed;
+/* extended data: Probe setup */
+struct sof_ipc_probe_support {
+ struct sof_ipc_ext_data_hdr ext_hdr;
+
+ uint32_t probe_points_max;
+ uint32_t injection_dmas_max;
+
+ /* reserved for future use */
+ uint32_t reserved[2];
+} __packed;
+
+/* extended data: user abi version(s) */
+struct sof_ipc_user_abi_version {
+ struct sof_ipc_ext_data_hdr ext_hdr;
+
+ uint32_t abi_dbg_version;
+} __packed;
+
#endif
diff --git a/include/sound/sof/topology.h b/include/sound/sof/topology.h
index 402e0250c508..08267d284edc 100644
--- a/include/sound/sof/topology.h
+++ b/include/sound/sof/topology.h
@@ -37,6 +37,7 @@ enum sof_comp_type {
SOF_COMP_SELECTOR, /**< channel selector component */
SOF_COMP_DEMUX,
SOF_COMP_ASRC, /**< Asynchronous sample rate converter */
+ SOF_COMP_DCBLOCK,
/* keep FILEREAD/FILEWRITE as the last ones */
SOF_COMP_FILEREAD = 10000, /**< host test based file IO */
SOF_COMP_FILEWRITE = 10001, /**< host test based file IO */
@@ -75,11 +76,23 @@ struct sof_ipc_comp {
#define SOF_MEM_CAPS_CACHE (1 << 6) /**< cacheable */
#define SOF_MEM_CAPS_EXEC (1 << 7) /**< executable */
+/*
+ * overrun will cause ring buffer overwrite, instead of XRUN.
+ */
+#define SOF_BUF_OVERRUN_PERMITTED BIT(0)
+
+/*
+ * underrun will cause readback of 0s, instead of XRUN.
+ */
+#define SOF_BUF_UNDERRUN_PERMITTED BIT(1)
+
/* create new component buffer - SOF_IPC_TPLG_BUFFER_NEW */
struct sof_ipc_buffer {
struct sof_ipc_comp comp;
uint32_t size; /**< buffer size in bytes */
uint32_t caps; /**< SOF_MEM_CAPS_ */
+ uint32_t flags; /**< SOF_BUF_ flags defined above */
+ uint32_t reserved; /**< reserved for future use */
} __packed;
/* generic component config data - must always be after struct sof_ipc_comp */
@@ -206,6 +219,7 @@ enum sof_ipc_process_type {
SOF_PROCESS_CHAN_SELECTOR, /**< Channel Selector */
SOF_PROCESS_MUX,
SOF_PROCESS_DEMUX,
+ SOF_PROCESS_DCBLOCK,
};
/* generic "effect", "codec" or proprietary processing component */
@@ -218,7 +232,7 @@ struct sof_ipc_comp_process {
/* reserved for future use */
uint32_t reserved[7];
- unsigned char data[0];
+ uint8_t data[0];
} __packed;
/* frees components, buffers and pipelines
diff --git a/include/sound/sof/trace.h b/include/sound/sof/trace.h
index fda6e8f6ead4..8056f214946d 100644
--- a/include/sound/sof/trace.h
+++ b/include/sound/sof/trace.h
@@ -72,7 +72,7 @@ struct sof_ipc_dma_trace_posn {
struct sof_ipc_panic_info {
struct sof_ipc_hdr hdr;
uint32_t code; /* SOF_IPC_PANIC_ */
- char filename[SOF_TRACE_FILENAME_SIZE];
+ uint8_t filename[SOF_TRACE_FILENAME_SIZE];
uint32_t linenum;
} __packed;