Skip to content

Commit b4be427

Browse files
dbalutabroonie
authored andcommitted
ASoC: SOF: imx: Describe ESAI parameters to be sent to DSP
Introduce sof_ipc_dai_esai_params to keep information that we get from topology and we send to DSP FW. Also bump the ABI minor to reflect the changes on DSP FW. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191008164443.1358-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 8b160dc commit b4be427

4 files changed

Lines changed: 38 additions & 3 deletions

File tree

‎include/sound/sof/dai-imx.h‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2+
/*
3+
* Copyright 2019 NXP
4+
*
5+
* Author: Daniel Baluta <daniel.baluta@nxp.com>
6+
*/
7+
8+
#ifndef __INCLUDE_SOUND_SOF_DAI_IMX_H__
9+
#define __INCLUDE_SOUND_SOF_DAI_IMX_H__
10+
11+
#include <sound/sof/header.h>
12+
13+
/* ESAI Configuration Request - SOF_IPC_DAI_ESAI_CONFIG */
14+
struct sof_ipc_dai_esai_params {
15+
struct sof_ipc_hdr hdr;
16+
17+
/* MCLK */
18+
uint16_t reserved1;
19+
uint16_t mclk_id;
20+
uint32_t mclk_direction;
21+
22+
uint32_t mclk_rate; /* MCLK frequency in Hz */
23+
uint32_t fsync_rate; /* FSYNC frequency in Hz */
24+
uint32_t bclk_rate; /* BCLK frequency in Hz */
25+
26+
/* TDM */
27+
uint32_t tdm_slots;
28+
uint32_t rx_slots;
29+
uint32_t tx_slots;
30+
uint16_t tdm_slot_width;
31+
uint16_t reserved2; /* alignment */
32+
} __packed;
33+
34+
#endif

‎include/sound/sof/dai.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include <sound/sof/header.h>
1313
#include <sound/sof/dai-intel.h>
14+
#include <sound/sof/dai-imx.h>
1415

1516
/*
1617
* DAI Configuration.
@@ -73,6 +74,7 @@ struct sof_ipc_dai_config {
7374
struct sof_ipc_dai_dmic_params dmic;
7475
struct sof_ipc_dai_hda_params hda;
7576
struct sof_ipc_dai_alh_params alh;
77+
struct sof_ipc_dai_esai_params esai;
7678
};
7779
} __packed;
7880

‎include/uapi/sound/sof/abi.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
/* SOF ABI version major, minor and patch numbers */
2828
#define SOF_ABI_MAJOR 3
29-
#define SOF_ABI_MINOR 10
29+
#define SOF_ABI_MINOR 11
3030
#define SOF_ABI_PATCH 0
3131

3232
/* SOF ABI version number. Format within 32bit word is MMmmmppp */

‎include/uapi/sound/sof/tokens.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
/* TODO: Add SAI tokens */
112112

113113
/* ESAI */
114-
#define SOF_TKN_IMX_ESAI_FIRST_TOKEN 1100
115-
/* TODO: Add ESAI tokens */
114+
#define SOF_TKN_IMX_ESAI_MCLK_ID 1100
116115

117116
#endif

0 commit comments

Comments
 (0)