@@ -656,6 +656,16 @@ static const struct sof_topology_token ssp_tokens[] = {
656656
657657};
658658
659+ /* ALH */
660+ static const struct sof_topology_token alh_tokens [] = {
661+ {SOF_TKN_INTEL_ALH_RATE ,
662+ SND_SOC_TPLG_TUPLE_TYPE_WORD , get_token_u32 ,
663+ offsetof(struct sof_ipc_dai_alh_params , rate ), 0 },
664+ {SOF_TKN_INTEL_ALH_CH ,
665+ SND_SOC_TPLG_TUPLE_TYPE_WORD , get_token_u32 ,
666+ offsetof(struct sof_ipc_dai_alh_params , channels ), 0 },
667+ };
668+
659669/* DMIC */
660670static const struct sof_topology_token dmic_tokens [] = {
661671 {SOF_TKN_INTEL_DMIC_DRIVER_VERSION ,
@@ -3095,13 +3105,26 @@ static int sof_link_alh_load(struct snd_soc_component *scomp, int index,
30953105 struct sof_ipc_dai_config * config )
30963106{
30973107 struct snd_sof_dev * sdev = snd_soc_component_get_drvdata (scomp );
3108+ struct snd_soc_tplg_private * private = & cfg -> priv ;
30983109 struct sof_ipc_reply reply ;
30993110 u32 size = sizeof (* config );
31003111 int ret ;
31013112
3113+ ret = sof_parse_tokens (scomp , & config -> alh , alh_tokens ,
3114+ ARRAY_SIZE (alh_tokens ), private -> array ,
3115+ le32_to_cpu (private -> size ));
3116+ if (ret != 0 ) {
3117+ dev_err (scomp -> dev , "error: parse alh tokens failed %d\n" ,
3118+ le32_to_cpu (private -> size ));
3119+ return ret ;
3120+ }
3121+
31023122 /* init IPC */
31033123 config -> hdr .size = size ;
31043124
3125+ dev_dbg (scomp -> dev , "ALH config rate %d channels %d\n" ,
3126+ config -> alh .rate , config -> alh .channels );
3127+
31053128 /* send message to DSP */
31063129 ret = sof_ipc_tx_message (sdev -> ipc ,
31073130 config -> hdr .cmd , config , size , & reply ,
0 commit comments