18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright 2019 NXP
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Author: Daniel Baluta <daniel.baluta@nxp.com>
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef __INCLUDE_SOUND_SOF_DAI_IMX_H__
98c2ecf20Sopenharmony_ci#define __INCLUDE_SOUND_SOF_DAI_IMX_H__
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <sound/sof/header.h>
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci/* ESAI Configuration Request - SOF_IPC_DAI_ESAI_CONFIG */
148c2ecf20Sopenharmony_cistruct sof_ipc_dai_esai_params {
158c2ecf20Sopenharmony_ci	struct sof_ipc_hdr hdr;
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci	/* MCLK */
188c2ecf20Sopenharmony_ci	uint16_t reserved1;
198c2ecf20Sopenharmony_ci	uint16_t mclk_id;
208c2ecf20Sopenharmony_ci	uint32_t mclk_direction;
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci	uint32_t mclk_rate;	/* MCLK frequency in Hz */
238c2ecf20Sopenharmony_ci	uint32_t fsync_rate;	/* FSYNC frequency in Hz */
248c2ecf20Sopenharmony_ci	uint32_t bclk_rate;	/* BCLK frequency in Hz */
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci	/* TDM */
278c2ecf20Sopenharmony_ci	uint32_t tdm_slots;
288c2ecf20Sopenharmony_ci	uint32_t rx_slots;
298c2ecf20Sopenharmony_ci	uint32_t tx_slots;
308c2ecf20Sopenharmony_ci	uint16_t tdm_slot_width;
318c2ecf20Sopenharmony_ci	uint16_t reserved2;	/* alignment */
328c2ecf20Sopenharmony_ci} __packed;
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci/* SAI Configuration Request - SOF_IPC_DAI_SAI_CONFIG */
358c2ecf20Sopenharmony_cistruct sof_ipc_dai_sai_params {
368c2ecf20Sopenharmony_ci	struct sof_ipc_hdr hdr;
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci	/* MCLK */
398c2ecf20Sopenharmony_ci	uint16_t reserved1;
408c2ecf20Sopenharmony_ci	uint16_t mclk_id;
418c2ecf20Sopenharmony_ci	uint32_t mclk_direction;
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci	uint32_t mclk_rate;	/* MCLK frequency in Hz */
448c2ecf20Sopenharmony_ci	uint32_t fsync_rate;	/* FSYNC frequency in Hz */
458c2ecf20Sopenharmony_ci	uint32_t bclk_rate;	/* BCLK frequency in Hz */
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci	/* TDM */
488c2ecf20Sopenharmony_ci	uint32_t tdm_slots;
498c2ecf20Sopenharmony_ci	uint32_t rx_slots;
508c2ecf20Sopenharmony_ci	uint32_t tx_slots;
518c2ecf20Sopenharmony_ci	uint16_t tdm_slot_width;
528c2ecf20Sopenharmony_ci	uint16_t reserved2;	/* alignment */
538c2ecf20Sopenharmony_ci} __packed;
548c2ecf20Sopenharmony_ci#endif
55