1
2
3
4
5
6
7
8
9 #ifndef __INCLUDE_SOUND_SOF_DAI_H__
10 #define __INCLUDE_SOUND_SOF_DAI_H__
11
12 #include <sound/sof/header.h>
13 #include <sound/sof/dai-intel.h>
14
15
16
17
18
19
20
21 #define SOF_DAI_FMT_I2S 1
22 #define SOF_DAI_FMT_RIGHT_J 2
23 #define SOF_DAI_FMT_LEFT_J 3
24 #define SOF_DAI_FMT_DSP_A 4
25 #define SOF_DAI_FMT_DSP_B 5
26 #define SOF_DAI_FMT_PDM 6
27
28 #define SOF_DAI_FMT_CONT (1 << 4)
29 #define SOF_DAI_FMT_GATED (0 << 4)
30
31 #define SOF_DAI_FMT_NB_NF (0 << 8)
32 #define SOF_DAI_FMT_NB_IF (2 << 8)
33 #define SOF_DAI_FMT_IB_NF (3 << 8)
34 #define SOF_DAI_FMT_IB_IF (4 << 8)
35
36 #define SOF_DAI_FMT_CBM_CFM (0 << 12)
37 #define SOF_DAI_FMT_CBS_CFM (2 << 12)
38 #define SOF_DAI_FMT_CBM_CFS (3 << 12)
39 #define SOF_DAI_FMT_CBS_CFS (4 << 12)
40
41 #define SOF_DAI_FMT_FORMAT_MASK 0x000f
42 #define SOF_DAI_FMT_CLOCK_MASK 0x00f0
43 #define SOF_DAI_FMT_INV_MASK 0x0f00
44 #define SOF_DAI_FMT_MASTER_MASK 0xf000
45
46
47 enum sof_ipc_dai_type {
48 SOF_DAI_INTEL_NONE = 0,
49 SOF_DAI_INTEL_SSP,
50 SOF_DAI_INTEL_DMIC,
51 SOF_DAI_INTEL_HDA,
52 SOF_DAI_INTEL_ALH,
53 SOF_DAI_IMX_SAI,
54 SOF_DAI_IMX_ESAI,
55 };
56
57
58 struct sof_ipc_dai_config {
59 struct sof_ipc_cmd_hdr hdr;
60 uint32_t type;
61 uint32_t dai_index;
62
63
64 uint16_t format;
65 uint16_t reserved16;
66
67
68 uint32_t reserved[8];
69
70
71 union {
72 struct sof_ipc_dai_ssp_params ssp;
73 struct sof_ipc_dai_dmic_params dmic;
74 struct sof_ipc_dai_hda_params hda;
75 struct sof_ipc_dai_alh_params alh;
76 };
77 } __packed;
78
79 #endif