Skip to content

Commit 219f401

Browse files
Wu Zhigangplbossart
authored andcommitted
ssp:support additional SSP register bits
add the code to support additional SSP register bits. 1.the firmware should be changed to support the feature. commit: acbf09215faf09a27e074779c665dfe8f9675516. 2.the tplg should be changed to support this feature, commit: 6ec1ffcd716e88927fdb441254000270e797439b if not, this PR will not take effect. Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com> Reviewed-by: Keyon Jie <yang.jie@linux.intel.com>
1 parent 08f7ddb commit 219f401

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

include/uapi/sound/sof-ipc.h

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,22 @@ struct sof_ipc_compound_hdr {
198198
#define SOF_DAI_FMT_INV_MASK 0x0f00
199199
#define SOF_DAI_FMT_MASTER_MASK 0xf000
200200

201+
/* ssc1: TINTE */
202+
#define SOF_DAI_INTEL_SSP_QUIRK_TINTE (1 << 0)
203+
/* ssc1: PINTE */
204+
#define SOF_DAI_INTEL_SSP_QUIRK_PINTE (1 << 1)
205+
/* ssc2: SMTATF */
206+
#define SOF_DAI_INTEL_SSP_QUIRK_SMTATF (1 << 2)
207+
/* ssc2: MMRATF */
208+
#define SOF_DAI_INTEL_SSP_QUIRK_MMRATF (1 << 3)
209+
/* ssc2: PSPSTWFDFD */
210+
#define SOF_DAI_INTEL_SSP_QUIRK_PSPSTWFDFD (1 << 4)
211+
/* ssc2: PSPSRWFDFD */
212+
#define SOF_DAI_INTEL_SSP_QUIRK_PSPSRWFDFD (1 << 5)
213+
/* here is the possibility to define others aux macros */
214+
215+
#define SOF_DAI_INTEL_SSP_FRAME_PULSE_WIDTH_MAX 38
216+
201217
/* types of DAI */
202218
enum sof_ipc_dai_type {
203219
SOF_DAI_INTEL_NONE = 0,
@@ -231,8 +247,10 @@ struct sof_ipc_dai_ssp_params {
231247
uint32_t bclk_keep_active;
232248
uint32_t fs_keep_active;
233249

234-
//uint32_t quirks; // FIXME: is 32 bits enough ?
250+
uint16_t frame_pulse_width;
251+
uint32_t quirks; // FIXME: is 32 bits enough ?
235252

253+
uint16_t padding;
236254
/* private data, e.g. for quirks */
237255
//uint32_t pdata[10]; // FIXME: would really need ~16 u32
238256
} __attribute__((packed));

include/uapi/sound/sof-topology.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
#define SOF_TKN_INTEL_SSP_FS_KEEP_ACTIVE 502
7070
#define SOF_TKN_INTEL_SSP_MCLK_ID 503
7171
#define SOF_TKN_INTEL_SSP_SAMPLE_BITS 504
72+
#define SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH 505
73+
#define SOF_TKN_INTEL_SSP_QUIRKS 506
7274

7375
/* DMIC */
7476
#define SOF_TKN_INTEL_DMIC_DRIVER_VERSION 600

sound/soc/sof/topology.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,12 @@ static const struct sof_topology_token ssp_tokens[] = {
420420
{SOF_TKN_INTEL_SSP_SAMPLE_BITS, SND_SOC_TPLG_TUPLE_TYPE_WORD,
421421
get_token_u32,
422422
offsetof(struct sof_ipc_dai_ssp_params, sample_valid_bits), 0},
423+
{SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH, SND_SOC_TPLG_TUPLE_TYPE_SHORT,
424+
get_token_u16,
425+
offsetof(struct sof_ipc_dai_ssp_params, frame_pulse_width), 0},
426+
{SOF_TKN_INTEL_SSP_QUIRKS, SND_SOC_TPLG_TUPLE_TYPE_WORD,
427+
get_token_u32,
428+
offsetof(struct sof_ipc_dai_ssp_params, quirks), 0},
423429
};
424430

425431
/* DMIC */

0 commit comments

Comments
 (0)