Skip to content

Commit bab5d00

Browse files
committed
audio: dai: Guard DAI_INTEL_UAOL with preprocessor checks
The DAI_INTEL_UAOL configuration might not be present in Zephyr headers (or certain Zephyr branches), leading to build failures. Wrap its usage in SOF_DAI_INTEL_UAOL cases to ensure older or different Zephyr versions still compile successfully. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 4ca24fb commit bab5d00

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/audio/dai-zephyr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ __cold int dai_set_config(struct dai *dai, struct ipc_config_dai *common_config,
192192
cfg.type = DAI_IMX_MICFIL;
193193
cfg_params = &sof_cfg->micfil;
194194
break;
195+
#if defined(DAI_INTEL_UAOL)
195196
case SOF_DAI_INTEL_UAOL:
196197
cfg.type = DAI_INTEL_UAOL;
197198
cfg.channels = common_config->gtw_fmt->channels_count;
@@ -204,6 +205,7 @@ __cold int dai_set_config(struct dai *dai, struct ipc_config_dai *common_config,
204205
cfg_params = spec_config;
205206
dai_set_link_hda_config(&cfg.link_config, common_config, spec_config);
206207
break;
208+
#endif
207209
default:
208210
return -EINVAL;
209211
}

src/lib/dai.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,10 @@ static int sof_dai_type_to_zephyr(uint32_t type)
210210
return DAI_INTEL_HDA;
211211
case SOF_DAI_INTEL_ALH:
212212
return DAI_INTEL_ALH;
213+
#if defined(DAI_INTEL_UAOL)
213214
case SOF_DAI_INTEL_UAOL:
214215
return DAI_INTEL_UAOL;
216+
#endif
215217
case SOF_DAI_IMX_SAI:
216218
return DAI_IMX_SAI;
217219
case SOF_DAI_IMX_ESAI:

0 commit comments

Comments
 (0)