Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion include/uapi/sound/sof-ipc.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,22 @@ struct sof_ipc_compound_hdr {
#define SOF_DAI_FMT_INV_MASK 0x0f00
#define SOF_DAI_FMT_MASTER_MASK 0xf000

/* ssc1: TINTE */
#define SOF_DAI_INTEL_SSP_QUIRK_TINTE (1 << 0)
/* ssc1: PINTE */
#define SOF_DAI_INTEL_SSP_QUIRK_PINTE (1 << 1)
/* ssc2: SMTATF */
#define SOF_DAI_INTEL_SSP_QUIRK_SMTATF (1 << 2)
/* ssc2: MMRATF */
#define SOF_DAI_INTEL_SSP_QUIRK_MMRATF (1 << 3)
/* ssc2: PSPSTWFDFD */
#define SOF_DAI_INTEL_SSP_QUIRK_PSPSTWFDFD (1 << 4)
/* ssc2: PSPSRWFDFD */
#define SOF_DAI_INTEL_SSP_QUIRK_PSPSRWFDFD (1 << 5)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhigang-wu where are these used?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I talked with Keyon about this. Because the kernel and sof share the same ipc header file.
the content has to be same. so I paste here.
do you think it is ok?
Actually I am not sure of this point.

/* here is the possibility to define others aux macros */

#define SOF_DAI_INTEL_SSP_FRAME_PULSE_WIDTH_MAX 38

/* types of DAI */
enum sof_ipc_dai_type {
SOF_DAI_INTEL_NONE = 0,
Expand Down Expand Up @@ -231,8 +247,10 @@ struct sof_ipc_dai_ssp_params {
uint32_t bclk_keep_active;
uint32_t fs_keep_active;

//uint32_t quirks; // FIXME: is 32 bits enough ?
uint16_t frame_pulse_width;
uint32_t quirks; // FIXME: is 32 bits enough ?

uint16_t padding;
/* private data, e.g. for quirks */
//uint32_t pdata[10]; // FIXME: would really need ~16 u32
} __attribute__((packed));
Expand Down
2 changes: 2 additions & 0 deletions include/uapi/sound/sof-topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
#define SOF_TKN_INTEL_SSP_FS_KEEP_ACTIVE 502
#define SOF_TKN_INTEL_SSP_MCLK_ID 503
#define SOF_TKN_INTEL_SSP_SAMPLE_BITS 504
#define SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH 505
#define SOF_TKN_INTEL_SSP_QUIRKS 506

/* DMIC */
#define SOF_TKN_INTEL_DMIC_DRIVER_VERSION 600
Expand Down
6 changes: 6 additions & 0 deletions sound/soc/sof/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ static const struct sof_topology_token ssp_tokens[] = {
{SOF_TKN_INTEL_SSP_SAMPLE_BITS, SND_SOC_TPLG_TUPLE_TYPE_WORD,
get_token_u32,
offsetof(struct sof_ipc_dai_ssp_params, sample_valid_bits), 0},
{SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH, SND_SOC_TPLG_TUPLE_TYPE_SHORT,
get_token_u16,
offsetof(struct sof_ipc_dai_ssp_params, frame_pulse_width), 0},
{SOF_TKN_INTEL_SSP_QUIRKS, SND_SOC_TPLG_TUPLE_TYPE_WORD,
get_token_u32,
offsetof(struct sof_ipc_dai_ssp_params, quirks), 0},
};

/* DMIC */
Expand Down