Skip to content

Commit cb05347

Browse files
ranj063plbossart
authored andcommitted
ASoC: SOF: merge sample_bits tokens with the rest of the ssp_tokens
Sample bits is SSP specific. So move it to be part of SSP tokens. dai_ssp_link_tokens are not need anymore. So remove it and the corresponding call to parse the tokens. Signed-off-by: Ranjani Sridharan <[email protected]>
1 parent e409473 commit cb05347

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

include/uapi/sound/sof-topology.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#define SOF_TKN_DAI_DMAC_CONFIG 153
3838
#define SOF_TKN_DAI_TYPE 154
3939
#define SOF_TKN_DAI_INDEX 155
40-
#define SOF_TKN_DAI_SAMPLE_BITS 156
4140

4241
/* scheduling */
4342
#define SOF_TKN_SCHED_DEADLINE 200
@@ -69,6 +68,7 @@
6968
#define SOF_TKN_INTEL_SSP_BCLK_KEEP_ACTIVE 501
7069
#define SOF_TKN_INTEL_SSP_FS_KEEP_ACTIVE 502
7170
#define SOF_TKN_INTEL_SSP_MCLK_ID 503
71+
#define SOF_TKN_INTEL_SSP_SAMPLE_BITS 504
7272

7373
/* DMIC */
7474
#define SOF_TKN_INTEL_DMIC_DRIVER_VERSION 600

sound/soc/sof/topology.c

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,6 @@ static const struct sof_topology_token dai_link_tokens[] = {
336336
offsetof(struct sof_ipc_dai_config, type), 0},
337337
};
338338

339-
static const struct sof_topology_token dai_ssp_link_tokens[] = {
340-
{SOF_TKN_DAI_SAMPLE_BITS, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
341-
offsetof(struct sof_ipc_dai_ssp_params, sample_valid_bits), 0},
342-
};
343-
344339
/* scheduling */
345340
static const struct sof_topology_token sched_tokens[] = {
346341
{SOF_TKN_SCHED_DEADLINE, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
@@ -414,6 +409,9 @@ static const struct sof_topology_token ssp_tokens[] = {
414409
{SOF_TKN_INTEL_SSP_MCLK_ID,
415410
SND_SOC_TPLG_TUPLE_TYPE_SHORT, get_token_u16,
416411
offsetof(struct sof_ipc_dai_ssp_params, mclk_id), 0},
412+
{SOF_TKN_INTEL_SSP_SAMPLE_BITS, SND_SOC_TPLG_TUPLE_TYPE_WORD,
413+
get_token_u32,
414+
offsetof(struct sof_ipc_dai_ssp_params, sample_valid_bits), 0},
417415
};
418416

419417
/* DMIC */
@@ -1473,16 +1471,6 @@ static int sof_link_ssp_load(struct snd_soc_component *scomp, int index,
14731471
memset(&config->ssp, 0, sizeof(struct sof_ipc_dai_ssp_params));
14741472
config->hdr.size = size;
14751473

1476-
/* get any bespoke DAI tokens */
1477-
ret = sof_parse_tokens(scomp, &config->ssp, dai_ssp_link_tokens,
1478-
ARRAY_SIZE(dai_ssp_link_tokens),
1479-
private->array, private->size);
1480-
if (ret != 0) {
1481-
dev_err(sdev->dev, "error: parse ssp link tokens failed %d\n",
1482-
private->size);
1483-
return ret;
1484-
}
1485-
14861474
ret = sof_parse_tokens(scomp, &config->ssp, ssp_tokens,
14871475
ARRAY_SIZE(ssp_tokens), private->array,
14881476
private->size);

0 commit comments

Comments
 (0)