Skip to content

Commit 780dd79

Browse files
committed
uapi: ipc: Add clks_control field to ssp_struct
I've added clks_control field in sof_ipc_dai_ssp_params struct. I've deleted mclk/bclk/fs_keep_active field. They will be supported by clks_control field and defined macros. Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
1 parent d582a36 commit 780dd79

1 file changed

Lines changed: 21 additions & 5 deletions

File tree

src/include/uapi/ipc.h

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#define __INCLUDE_UAPI_IPC_H__
4141

4242
#include <uapi/abi.h>
43+
#include <sof/io.h>
4344

4445
/** \addtogroup sof_uapi uAPI
4546
* SOF uAPI specification.
@@ -249,6 +250,24 @@ struct sof_ipc_compound_hdr {
249250
#define SOF_DAI_INTEL_SSP_FRAME_PULSE_WIDTH_MAX 38
250251
#define SOF_DAI_INTEL_SSP_SLOT_PADDING_MAX 31
251252

253+
/* SSP clocks control settings
254+
*
255+
* Macros for clks_control field in sof_ipc_dai_ssp_params struct.
256+
*/
257+
258+
/* mclk 0 disable */
259+
#define SOF_DAI_INTEL_SSP_MCLK_0_DISABLE BIT(0)
260+
/* mclk 1 disable */
261+
#define SOF_DAI_INTEL_SSP_MCLK_1_DISABLE BIT(1)
262+
/* mclk keep active */
263+
#define SOF_DAI_INTEL_SSP_CLKCTRL_MCLK_KA BIT(2)
264+
/* bclk keep active */
265+
#define SOF_DAI_INTEL_SSP_CLKCTRL_BCLK_KA BIT(3)
266+
/* fs keep active */
267+
#define SOF_DAI_INTEL_SSP_CLKCTRL_FS_KA BIT(4)
268+
/* bclk idle */
269+
#define SOF_DAI_INTEL_SSP_CLKCTRL_BCLK_IDLE_HIGH BIT(5)
270+
252271
/** \brief Types of DAI */
253272
enum sof_ipc_dai_type {
254273
SOF_DAI_INTEL_NONE = 0, /**< None */
@@ -278,14 +297,11 @@ struct sof_ipc_dai_ssp_params {
278297

279298
/* MCLK */
280299
uint32_t mclk_direction;
281-
uint32_t mclk_keep_active;
282-
uint32_t bclk_keep_active;
283-
uint32_t fs_keep_active;
284300

285301
uint16_t frame_pulse_width;
286-
uint32_t quirks; // FIXME: is 32 bits enough ?
287-
288302
uint16_t tdm_per_slot_padding_flag;
303+
uint32_t clks_control;
304+
uint32_t quirks; // FIXME: is 32 bits enough ?
289305
/* private data, e.g. for quirks */
290306
//uint32_t pdata[10]; // FIXME: would really need ~16 u32
291307
} __attribute__((packed));

0 commit comments

Comments
 (0)