@@ -150,6 +150,20 @@ static const struct sof_topology_token dai_tokens[] = {
150150 offsetof(struct sof_ipc4_copier , dai_index )},
151151};
152152
153+ static int get_token_u32_d (void * elem , void * object , u32 offset )
154+ {
155+ struct snd_soc_tplg_vendor_value_elem * velem = elem ;
156+ struct snd_sof_widget * sw = object ;
157+ struct snd_soc_dapm_widget * w = sw -> widget ;
158+ u32 * val = (u32 * )((u8 * )object + offset );
159+
160+ * val = le32_to_cpu (velem -> value );
161+
162+ printk ("%s:%s %u" , w -> sname , w -> name , * val );
163+
164+ return 0 ;
165+ }
166+
153167/* Component extended tokens */
154168static const struct sof_topology_token comp_ext_tokens [] = {
155169 {SOF_TKN_COMP_UUID , SND_SOC_TPLG_TUPLE_TYPE_UUID , get_token_uuid ,
@@ -160,11 +174,11 @@ static const struct sof_topology_token comp_ext_tokens[] = {
160174 offsetof(struct snd_sof_widget , comp_domain )},
161175 {SOF_TKN_COMP_DOMAIN_ID , SND_SOC_TPLG_TUPLE_TYPE_WORD , get_token_u32 ,
162176 offsetof(struct snd_sof_widget , domain_id )},
163- {SOF_TKN_COMP_HEAP_BYTES_REQUIREMENT , SND_SOC_TPLG_TUPLE_TYPE_WORD , get_token_u32 ,
177+ {SOF_TKN_COMP_HEAP_BYTES_REQUIREMENT , SND_SOC_TPLG_TUPLE_TYPE_WORD , get_token_u32_d ,
164178 offsetof(struct snd_sof_widget , heap_bytes )},
165- {SOF_TKN_COMP_STACK_BYTES_REQUIREMENT , SND_SOC_TPLG_TUPLE_TYPE_WORD , get_token_u32 ,
179+ {SOF_TKN_COMP_STACK_BYTES_REQUIREMENT , SND_SOC_TPLG_TUPLE_TYPE_WORD , get_token_u32_d ,
166180 offsetof(struct snd_sof_widget , stack_bytes )},
167- {SOF_TKN_COMP_STATIC_BYTES_REQUIREMENT , SND_SOC_TPLG_TUPLE_TYPE_WORD , get_token_u32 ,
181+ {SOF_TKN_COMP_STATIC_BYTES_REQUIREMENT , SND_SOC_TPLG_TUPLE_TYPE_WORD , get_token_u32_d ,
168182 offsetof(struct snd_sof_widget , static_bytes )},
169183};
170184
0 commit comments